Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

PARDISO error -3 (reordering problem)

michel_lestrade
Beginner
1,466 Views
Hi,

Tried to post this yesterday without success. Hopefully, this won't end up as a double post.

I am having trouble using PARDISO code that previously worked successfully for asymmetric matrices and that I am now applying to symmetric marices. The error returned indicates a reordering problem (-3) but that does not tell me much. From what I can tell, the output of mkl_dcsrcoo satisifies the requirements for PARDISO if I give use the upper half of the matrix in my original COO format. The error persists if I try various values of iparm(2).

Is there something I am not getting about the storage requirements for symmetric matrices ? Attached is a sample program reproducing the error with ifort version 12.0.2.154 Build 20110112.

Thanks.

Michel Lestrade
0 Kudos
1 Solution
Sergey_Solovev__Inte
New Contributor I
1,466 Views

Hi, Michel,
Actually both for unsymmetric (mtype=11,13) and structurally symmetric matrices (mtype=1,3) you should set full input matrix. Upper triangular part is appropriate for symmetric matrices (mtype=2,-2,4,-4 and 6). So, please use the following code:

integer:: n=4,nz=10
integer:: jrn(10), jcn(10)
doubleprecision:: matA_coo(10)
.
jrn = (/1,2,3,4,1,2,3,2,3,4/)
jcn = (/1,2,3,4,2,3,4,1,2,3/)
matA_coo = (/1.0d0,2.0d0,3.0d0,4.0d0,5.0d0,6.0d0,7.0d0,5.0d0,6.0d0,7.0d0/)

Best regards,
Sergey Solovev

View solution in original post

0 Kudos
5 Replies
Sergey_Solovev__Inte
New Contributor I
1,467 Views

Hi, Michel,
Actually both for unsymmetric (mtype=11,13) and structurally symmetric matrices (mtype=1,3) you should set full input matrix. Upper triangular part is appropriate for symmetric matrices (mtype=2,-2,4,-4 and 6). So, please use the following code:

integer:: n=4,nz=10
integer:: jrn(10), jcn(10)
doubleprecision:: matA_coo(10)
.
jrn = (/1,2,3,4,1,2,3,2,3,4/)
jcn = (/1,2,3,4,2,3,4,1,2,3/)
matA_coo = (/1.0d0,2.0d0,3.0d0,4.0d0,5.0d0,6.0d0,7.0d0,5.0d0,6.0d0,7.0d0/)

Best regards,
Sergey Solovev

0 Kudos
michel_lestrade
Beginner
1,466 Views
Hi Sergey,

Thanks for pointing out the difference between structurally symmetric and symmetric.

My intention is to benchmark PARDISO using the best possible settings so as to get a fair comparison to other solvers. The target data this time is in the MatrixMarket format which store only half of the matrix when it is symmetric. Which will be faster (in general): expanding the data as above or switching to mtype=-2 ?

I am pretty sure I cannot use mtype=2 since I do not know ahead of time if the matrix is positive definite or not: that kind of information is not in the banner header of the MatrixMarket format. The other types are not relevant for me since we are sticking to real-valued problems for the time being.

Thanks.

Michel Lestrade
Crosslight Software
0 Kudos
Konstantin_A_Intel
1,466 Views
Hi Michel,
Please use mtype=-2 for symmetric matrices if you don't know either it's positive definite or indefinite. In general, it should be faster than to solve symmetrical matrix as unsymmetrical.
Regards,
Konstantin
0 Kudos
michel_lestrade
Beginner
1,466 Views
Hi Sergei,

Following up on my own question for a related problem. What about skew-symmetric matrices ? That is Aij=-Aji with the diagonal equal to zero: that is the last matrix type from the Matrix Market format I have to consider.

Once expanded to full storage, shouldn't this matrix type work with m_type=1 since it has pattern symmetry ? However, I get this -3 error again and I am forced to fall back to m_type=11 to make it work.

Attached is a new version of my test program to demonstrate the problem.
0 Kudos
Sergey_Solovev__Inte
New Contributor I
1,466 Views
Hi Michel,
There are some restrictions for symmetric and unsymmetric matrices. One of them is:

"No diagonal element can be omitted from the values array for any symmetric or structurally symmetric matrix."
This restriction implies that if symmetric or structurally symmetric matrices have zero diagonal elements, then they must be explicitly represented in the values array. (See Sparse Matrix Storage Formats part in MKL manual.)
So, you should add zero elements into the diagonal.

0 Kudos
Reply