- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Thanks Roman. Could you take alook at the ms project file to see that why it crashed when compile in 64 bits?Many thanks for your help.Kien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page