## SCALAPACK: Making a matrix symmetric again

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

### SCALAPACK: Making a matrix symmetric again

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
jamabr

Posts: 7
Joined: Thu May 27, 2010 6:53 am
Location: Bonn, Germny

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

I would be interested in knowing how to do this as well.
naromero

Posts: 11
Joined: Wed Jan 14, 2009 7:20 pm

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

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
jamabr

Posts: 7
Joined: Thu May 27, 2010 6:53 am
Location: Bonn, Germny

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

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
jamabr

Posts: 7
Joined: Thu May 27, 2010 6:53 am
Location: Bonn, Germny

Return to Algorithm / Data

### Who is online

Users browsing this forum: No registered users and 2 guests