Scalapack: Version of PDLASET that doesn't affect diag?

Open discussion regarding features, bugs, issues, vendors, etc.

Scalapack: Version of PDLASET that doesn't affect diag?

Postby rpmuller » Fri Jan 26, 2007 2:36 pm

I'm interested in using the PDLASET routine to only zero the lower triangle of a matrix, and *not* the diagonal itself. Is there a routine (or a way to call PDLASET) that does this? I've been hunting through the ScaLAPACK source, but haven't had any luck.

Thanks in advance for any help you can offer.

Rick
rpmuller
 
Posts: 2
Joined: Fri Jan 26, 2007 2:33 pm

Re: Scalapack: Version of PDLASET that doesn't affect diag?

Postby rpmuller » Mon Jan 29, 2007 3:16 pm

rpmuller wrote:I'm interested in using the PDLASET routine to only zero the lower triangle of a matrix, and *not* the diagonal itself. Is there a routine (or a way to call PDLASET) that does this? I've been hunting through the ScaLAPACK source, but haven't had any luck.



A helpful user emailed the following to me. I'm posting it here in case anyone else runs into the same problem. It's a cute trick: the idea is to point to the first off diagonal element, and then zero M-1 elements instead of M.

CALL PDLASET( 'Lower triangular', M-1, M-1, ZERO, ZERO, A, IA+1, JA, DESCA )

This call will make A in upper Hessenberg form (given that the upper triangular part, including the diagonal, contains something nonzero).

I've tested this out in my own code and can confirm that it works. For the Upper triangle you call:

CALL PDLASET( 'Upper triangular', M-1, M-1, ZERO, ZERO, A, IA, JA+1, DESCA )
rpmuller
 
Posts: 2
Joined: Fri Jan 26, 2007 2:33 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 5 guests