Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Pardiso unable to solve a symmetric matrix

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

bryce155

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-09-2013
02:35 PM

143 Views

Pardiso unable to solve a symmetric matrix

Hello MKL tech support,

I have a positive definite matrix and using Pardiso to solve the problem. I kept receiving the error -4 for the solver. It is interative refinement problem in phase 33.

My params for pardiso are:

iparm[7] = 15;

iparm[10] = 0;

iparm[12] = 0;

iparm[0] = 1;

iparm[1] = 0;

iparm[3] = 0;

iparm[4] = 0;

iparm[5] = 0;

iparm[6] = 0;

iparm[9] = 13;

iparm[11] = 0;

iparm[13] = 0;

iparm[17] = -1;

iparm[18] = 0;

iparm[19] = 0;

iparm[20] = 0;

iparm[26] = 1;

iparm[27] = 0;

iparm[34] = 1;

iparm[59] = 0;

I am trying to solve Ax = y but there was no error in the factorization phase until the phase 33.

Thanks,

Link Copied

14 Replies

Zhang_Z_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-09-2013
03:53 PM

143 Views

Please show us the code snippet that calls pardiso, in particular:

- value of mtype?
- value of phase?
- Please set msglvl = 1 to produce statistical report

Check your iparm:

- Check the value of iparm[29] on output to see if there're any zero or negative pivots.
- Because you set iparm[0] = 1, then you must make sure you supply *all* values in iparm[1] through iparm[63].

Also, please let us know your MKL version, OS, compiler, and CPU type. Thanks.

bryce155

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-09-2013
08:30 PM

143 Views

Hi Zhang,

mtype = -2;

Please find the code snippet attached. The matrix was attached in the zip file in the previous post under CRS format. stiffness.txt is the values, and I tried to solve Ax = y.

I am using vc10 compiler, MKL 11.0.3. The error only produced at the phase = 33. No zero pivot was detected.

Even when I set the maximum number of refinement iterative to 15 but it still stop at 4.

Thanks,

Zhang_Z_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-10-2013
03:13 PM

143 Views

Thanks for providing the code. Your matrix can be solved using PARDISO. Please change the following iparm parameters:

iparm[7] = -5; // negative number means accumulation with extended precision

iparm[9] = 8; // pivot perturbation eps, 10^{-8} is recommended for symmetric indifinite matrices

iparm[20] = 1; // pivotting method, Bunch-Kaufman is recommended for symmetric indifinite matrices

Thanks.

bryce155

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-10-2013
09:00 PM

143 Views

Hi Zhang,

Thank you for your prompt response. I tried with your suggestion but it still stopped at 4 iterative refinement. I just wonder that if you really tried to solve the matrix. I attached a smaller matrix with similar problem. also stop at 4 refinement steps even when I increased the iparm[7] to -10.

Thank you for your helps,

Zhang_Z_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-10-2013
09:52 PM

143 Views

Of course I solved the matrix successfully before posting my response! See my full program attached. It's based on your original version.

Note that iparm[7] sets the *maximum* number of iterative refinement steps. It doesn't mean it always goes through that many steps.

In my program, it actually needed 5 steps.

Do you still get an error in the solving step? What is it?

Zhang_Z_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-10-2013
10:04 PM

143 Views

By the way, I'm using MKL 11.0.2 and the compiler is ICC 13.1.0. This is how I build the code:

icc -std=c99 -DMKL_ILP64 -I$MKLROOT/include pardiso_code.c -L$MKLROOT/lib/intel64 -lmkl_rt -lpthread -lm

Hoang_Kien_D_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-11-2013
05:30 PM

143 Views

Thanks Zhang.

Ididnt have the intel compiler so I created a projectfrom your code with Microsoft Visual Studio 10 and Intel Composer XE 13 in 64 machine with 64bits library . It compiled successfully but when I ran the program it crashed right at the first call to PARDIO (phase = 11). (both with single dynamic layer (mkl_rt) or with the lirary from the Advisor line) (with both the interger32 and 64)

However, linking with 32bit with 32bit library was working fine. It didnt have enough memoryto solve for the first one that I sent you but for the second one it could solve the matrix.

My MKL version is 11.0.3 and intel composer XE 13 (the latest update for both)

Thanks

Hoang_Kien_D_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-11-2013
05:37 PM

143 Views

Roman_A_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-12-2013
12:56 AM

143 Views

Hi Bryce,

I have checked your matrix with the following settings:

iparm[0] =1, iparm[1]=2, iparm[7]=2, iparm[9]=13, iparm[34]=1, all other iparm set to 0. With this setting the relative residual of the solution is equal to 1.12e-12.

Increasing the number of iterations for this matrix cannot improve the solution of the system, that's why solving step return error. Nevertheless, as wrote above, norm of residual quite good, so you can switch off iterative refinement

Regards, Roman

Hoang_Kien_D_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-12-2013
05:16 AM

143 Views

bryce155

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-12-2013
03:10 PM

143 Views

Zhang_Z_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-15-2013
09:30 AM

143 Views

I was able to reproduce this problem. The execution ended abruptly in the analysis step (phase=11). I'm conducting more investigations and will update here as soon as possible.

Thanks!

bryce155 wrote:

Sorry I attached a wrong file. The correct project was attached.

I figured out that if we use the ilp64 library (with the option /DMKL_ILP64) the pardiso library has linking problem (I guess)

Thanks,

Kien

Zhang_Z_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-16-2013
10:39 AM

143 Views

Finally, we know what's wrong with the code. You need to use "%lld" as the format string in those fscanf statements when reading integers from input files. This is because you want to use the 64-bit version of PARDISO (by either calling pardiso_64 or by defining MKL_ILP64). Then you must make sure every integer you read in is 64-bit!

After fixing this fscanf format problem, the code runs like a charm.

bryce155

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-17-2013
02:42 PM

143 Views

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.