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

Why does PARDISO get wrong result when parallel reordering for METIS(iparm(28)) is set to 1?

rudaho
Beginner
212 Views
Hello~

I tried to embed PARDISO to our project and I tried to set iparm(28) to 1 to parallel reordering the matrix, but the solver obtained wrong results. The iprams and the benchmarking matrix is as below. Is there any issue I should consider for setting iparm(28)? Thanks a lot...

iparms :
iparm[1] = 2;
iparm[2] = atoi(thread_num);//mkl_get_max_threads();
iparm[3] = 0; /* No iterative-direct algorithm */
iparm[4] = 0; /* No user fill-in reducing permutation */
iparm[5] = 0; /* Write solution into b */
iparm[6] = 0; /* Not in use */
iparm[7] = 0; /* Max numbers of iterative refinement steps */
iparm[8] = 0; /* Not in use */
iparm[9] = 13; /* Perturb the pivot elements with 1E-13 */
iparm[10] = 1; /* Use nonsymmetric permutation and scaling MPS */
iparm[11] = 0; /* Not in use */
iparm[12] = 1; /* Maximum weighted matching algorithm is switched-on (default for non-symmetric) */
iparm[13] = 0; /* Output: Number of perturbed pivots */
iparm[14] = 0; /* Not in use */
iparm[15] = 0; /* Not in use */
iparm[16] = 0; /* Not in use */
iparm[17] = 0;
iparm[18] = 0;
iparm[19] = 0; /* Output: Numbers of CG Iterations */
iparm[23] = 1; /* Parallel Numerical Factorization */
iparm[24] = 1; /* Parallel Forward/Backward Solve */

//iparm[27] = 1;

maxfct = 1; /* Maximum number of numerical factorizations. */
mnum = 1; /* Which factorization to use. */
msglvl = 1; /* Print statistical information in file */
error = 0; /* Initialize error flag */

Matrix :
size 23x23
23 real
1 1 0.778355
1 2 -0.042857
1 22 -0.042857
1 23 -0.692641
2 1 -0.042857
2 2 2.554663
2 3 -0.337027
2 22 -2.174778
3 2 -0.337027
3 3 5.345847
3 4 -4.008819
3 9 -1.000000
4 3 -4.008819
4 4 4.461020
4 5 -0.452200
5 4 -0.452200
5 5 1.278992
5 6 -0.100000
5 7 -0.726792
6 5 -0.100000
6 6 1.893122
6 7 -0.100000
6 8 -1.693122
7 5 -0.726792
7 6 -0.100000
7 7 0.826792
8 6 -1.693122
8 8 1.693187
9 3 -1.000000
9 9 8.187367
9 10 -7.187367
10 9 -7.187367
10 10 7.828516
10 11 -0.641149
11 10 -0.641149
11 11 1.641149
11 12 -1.000000
12 11 -1.000000
12 12 1.752293
12 13 -0.752293
13 12 -0.752293
13 13 0.818959
13 14 -0.066667
14 13 -0.066667
14 14 0.735718
14 15 -0.216822
14 18 -0.452229
15 14 -0.216822
15 15 0.361605
15 16 -0.144783
16 15 -0.144783
16 16 0.148342
16 17 -0.003559
17 16 -0.003559
17 17 0.003559
18 14 -0.452229
18 18 0.551187
18 19 -0.098958
19 18 -0.098958
19 19 0.189639
19 20 -0.090681
20 19 -0.090681
20 20 0.092738
20 21 -0.002058
21 20 -0.002058
21 21 0.002058
22 1 -0.042857
22 2 -2.174778
22 22 2.217635
23 1 -0.692641
23 23 0.692641
0 0 0.0 // end mark
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
2.831456e-04
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00
0.000000e+00

result with iparm[27] = 1 :
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.7332564e+307
-4.73325426e+307
2.12046915e-314
0
0
0
0
0
0
0
0
0
0
0

result with iparm[27] = 0 :
4.29004179
4.29004179
4.29005452
4.29005452
4.29006401
4.29008684
4.29006677
4.29008937
4.2900631
4.29006429
4.29007768
4.29008626
4.29009766
4.29016202
4.29016202
4.29016202
4.29016202
4.2901715
4.29021486
4.29026217
4.29026217
4.29004179
4.29004179

Thanks for any suggestion in advance... ^^

Ruda



0 Kudos
3 Replies
Gennady_F_Intel
Moderator
212 Views
Ruda,
one of the cause of such behaviormay be, if iparm(28) == 1 ( iparm[27] in C notation),then the input arrays (matrix a, vectors x and b) as well as all internal arrays are supposed to be in single precision.
--Gennady

0 Kudos
rudaho
Beginner
212 Views
Got it, thanks...

So, it seems the argument table is different from PARDISO 4.0.0? In PARDISO version 4.0.0, it says iparm(28) stands for parallel reordering for METIS, this is different from the meaning of controlling single/double precision.

Ruda
0 Kudos
Gennady_F_Intel
Moderator
212 Views
Ruda,
the newest version of Olaf's Pardiso ( v 4.0) is not compatible with our version of PARDISO. Olaf changed the API since this version.
--Gennady
0 Kudos
Reply