PARDISO: different results each time I solve the same system
I am comparing several solvers, and while some ones give expected results, PARDISO keeps giving very different results each time I run the program, or even different results if I call it two consecutive times.
It happens mainly with large matrices (80000 rows, 1000000 nonzeros) while other tests I made with very small matrices (eg: 5x5) give correct results.
With some settings it even crashes.
I mainly use default options for iparm.
I also tried DSS interface, and I get almost the same behavior.
But I changed from: setting all iparm to 0 except iparm(3) to the number of cores, to setting all iparm to 0 except iparm(1) to 1 and iparm(3) to the number of cores and iparm(27) to 1, and now it gives a more-less correct solution with an estimated error of 0.6 %
Anyway, it still crashes with a symmetric matrix passed as unsymmetric...
Am I right that you try to solve matrix A by PARDISO with mtype=2 or -2 and mtype=11 with similar ia,ja? If so the solution must not be the same because for mtype 2 and -2 PARDISO needs only lower part of initial matrix. Also I need to underline that if you set iparm(0) = 0 than matrix checker wouldn't work because default iparm(27) = 0. If you want to turn it on you need to set iparm(1) = 1 and set other iparm manually.
I set all iparm to 0 before calling
pardiso, anyway iparm should have some random values before is
initialized, so it does not hurt setting it to 0, I think.
And yes, I did set iparm(1) = 1 and iparm(27) = 1
For mtype I use 6 and 13 because they are complex matrices.
mtype=6 I pass only the UPPER part of the matrix, with diagonal
included, as it is said in the manual. Do you say the LOWER part?
I am using now MKL version 10.2.5.035
In my last tests It worked for iparm(1) = 1; iparm(27) = 1 and symmetric (error: 1e-4 %) and crashed for unsymmetric,
and worked for iparm(1) = 0 and unsymmetric (but with an error of 5%) and crashed for symmetric.
Thanks. With those parameters, it did not crash, and it did not give NaN. For symmetric case, I computed an relative mean error of 0.0001% to 0.7%, which is relatively high, and for unsymmetric case it gave from 6 to 9%, although this one was done with a symmetric matrix (with both upper and lower part) passed as unsymmetric. (well, the errors were calculated on a postprocessed field)
But, should not PARDISO work well with default parameters ?
PARDISO work well with default parameters. The one reason I've asked you to change default parameters is turn on matrix checker. Moreover, as I understood the problem with default parameters was only in simmetric case. Is matrix checker helped to resolved the problem?
If you can make the erroneous behavior occur with a matrix size slightly greater than 5 X 5 (and definitely far smaller than 80000 X 80000), there will be better chances of pinpointing the reasons. How are your matrices generated?