Page 1 of 1

### SCALAPACK: Making a matrix symmetric again

Posted: Wed Nov 17, 2010 1:08 pm
Dear all,

Probably someone can help me with a relatively simple question. I need to convert a matrix to a full symmetric matrix again, after using for example pdsyrk. So in general copying the upper triangular part of the matrix to the lower (or vice versa). Is there a simpler way then using pdgeadd and manipulating the diagonal again? If not, can I use pdgeadd with C==A to do this operation in place, so that I do not need the matrix twice in memory?
If someone has a suggestion it would be great.

Thanks a lot,
Jan Martin

### Re: SCALAPACK: Making a matrix symmetric again

Posted: Tue Dec 21, 2010 2:23 pm
I would be interested in knowing how to do this as well.

### Re: SCALAPACK: Making a matrix symmetric again

Posted: Wed Dec 22, 2010 9:02 am
hallo again,

within the last weeks i had no time to deal with this issue. But I will try to find the solution within the christmas holidays. So I will let you know if I find a solution.

Regards,
Jan Martin

### Re: SCALAPACK: Making a matrix symmetric again

Posted: Fri Jan 07, 2011 8:30 am
Hallo again,

I decided to implement a simple but not very efficient solution for my problem. It has the disadvantage, that one needs the matrix twice in memory. Until now, I implemented it

1. Make sure that the upper/lower triangular part of the matrix really contains zeros.
2. Modify the diagonal elements of the matrix with a multiplication of 0.5.
3. Copy the modified matrix A into a temporary matrix Acopy
4. use pdtran to compute A<—1.0*C+1.0*Acopy'
5. destroy the temporal copy Acopy

This solution works, but as mentioned above, the matrix needs to be copied (I found the statment "The matrices must have no common elements; otherwise, results are unpredictable." in IBMs description of the scalapack routine in the ESSL and Parallel ESSL library).
If sombody has an idea how to do this operations without the copy, it would be fine to know. Nevertheless I liked to provide my (temporary) solution.

Regards,
Jan Martin