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

PARDISO unsymmetric solver returns wrong answer

jaewonj
Novice
2,918 Views
1) Go to the following URL and download Zhao2.mtx.

http://www.cise.ufl.edu/research/sparse/matrices/Zhao/Zhao2.html

2) Unzip the attached zip file (pardiso2.tar.gz), compile it, and run.

$ pardiso Zhao2.mtx

3) Check the solution vector (x) printed at the end.

x[0] = -3.0621e+10
x[1] = 3.24486e+12
x[2] = -1.00442e+13
x[3] = 1.00625e+12
x[4] = 1.77057e+11

However, correct solution shoud be

x[0] = 19.1245
x[1] = 39.2731
x[2] = 134.8958
x[3] = 582.7064
x[4] = 596.7820

I used mtype = 11 and default parameters.

iparm[0] = 1;
iparm[1] = 2;
iparm[9] = 13;
iparm[10] = 1;
iparm[12] = 1;


Is this yet another bug within PARDISO or should I use different parameters ?






0 Kudos
8 Replies
Gennady_F_Intel
Moderator
2,918 Views
How about the condition number of this matrix? Did you check it?

0 Kudos
jaewonj
Novice
2,918 Views
How about the condition number of this matrix? Did you check it?

Hi Gennady,

Actually I did not check the condition number. However, I checked ...

1) The matrix A has structural full rank.

2) The residual normusing the solution generated by UMFPACK is

|b - A*x| = 3.623e-12

while the residual normusing PARDISO is

|b - A*x| = 2.7e70

which clearly suggests that the solution is wrong.

I understand a small conditioner numbersuggests the problem is well posed, but what else can we know from the actual value of the condition nubmer which is approximately 1.0e5 for this case?

Jaewon

0 Kudos
okamenik
Beginner
2,918 Views
I can confirm the similar problem. I have a 10x10 matrix, whose 2-norm condition number is 8.0e5. Not good but not very bad. The right hand side is such that the solution would be a vector of ones. I am using mkl dss, maybe I am doing something wrong.

Here is the c++ program: test_mkl_dss.cpp

Here is the compile and link command on my linux:

cc -Wall -I/opt/intel/mkl/10.2.1.017/include -o test_mkl_dss test_mkl_dss.cpp -s /opt/intel/mkl/10.2.1.017/lib/32/libmkl_solver_sequential.a -Wl,--start-group /opt/intel/mkl/10.2.1.017/lib/32/libmkl_intel.a /opt/intel/mkl/10.2.1.017/lib/32/libmkl_sequential.a /opt/intel/mkl/10.2.1.017/lib/32/libmkl_core.a -Wl,--end-group -lpthread -lstdc++

Here is a matlab session showing the solution, condition number and residual: matlab-session.txt

Here is the matrix: small_bla.mtx

Many thanks,

Ondra K.


0 Kudos
jaewonj
Novice
2,918 Views


Ondra, I never used DSS interface before so I don't know what is exactly going on but I found PARDISO interface produces a correct answer.

Jaewon


0 Kudos
Konstantin_A_Intel
2,918 Views

Hi Ondra,

Jaewon is right. PARDISO successfully solves your problem when we set iparm[12]=1 (matching is ON). This parameter is used specifically for highly indefinite matrices. Another option you could use is just increasing the value of iparam[9] (pivot perturbation value) from 1.0e13 (default) to 1.0E10. It's turned out that it works fine.

Regarding the problem of Jaewon, we found out that the matching, on the contrary,is a reason of getting incorrect answers. (Switching it OFF resolves the issue).We're investigating either this is a bug or specific behavior of algorithm for this matrix.

Generally, solving of hilgly indefinite matrices with big condition numbers could lead to computational problems and at first you should try different approaches available in PARDISO for such cases (as matching, scaling, pivot perturbation and so on). Possibly, it will help you to solve the problem.

Regards,
Konstantin
0 Kudos
okamenik
Beginner
2,918 Views
Jaewon,

many thanks. I also have never used dss, this is my first time :-).

However, have you, or anybody else solved your problem? I am thinking of using pardiso in my app, but I really need to have some assessment how it is robust.

Ondra K.
0 Kudos
okamenik
Beginner
2,918 Views

Hi Ondra,

Jaewon is right. PARDISO successfully solves your problem when we set iparm[12]=1 (matching is ON). This parameter is used specifically for highly indefinite matrices. Another option you could use is just increasing the value of iparam[9] (pivot perturbation value) from 1.0e13 (default) to 1.0E10. It's turned out that it works fine.

Regarding the problem of Jaewon, we found out that the matching, on the contrary,is a reason of getting incorrect answers. (Switching it OFF resolves the issue).We're investigating either this is a bug or specific behavior of algorithm for this matrix.

Generally, solving of hilgly indefinite matrices with big condition numbers could lead to computational problems and at first you should try different approaches available in PARDISO for such cases (as matching, scaling, pivot perturbation and so on). Possibly, it will help you to solve the problem.

Regards,
Konstantin

Konstantin,

many thanks. I guess that passing options to pardiso cannot be done through dss interface. Correct?

Ondra K.
0 Kudos
Konstantin_A_Intel
2,918 Views

Ondra,

I'm sorry for the late reply.

No, DSS interface was designed to provide the simpest way to call PARDISO functionality (that's its advantage), but it has no flexibility of PARDISO interface. So, if you want to vary any parameters - you should use PARDISO interface. In fact, solving highly indefinite matrices you may need tochange some parametersto obtain correct solution. For PARDISO, they are:
iparm[9] - perturbation value
iparm[10] - scaling
iparm[12] - matching

For your test, there are two ways to solve the matrix:
1) increase iparm[9] up to 1.0E-10
2) set iparm[12]=1

From our side, we are investigatingpossible reasonsof such computational behaviorof PARDISO for your 10x10 matrix and for the matrix Zhao.mtx provided by Jaewon.

Regards,
Konstantin
0 Kudos
Reply