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

PARDISO seems to fail with a very simple problem

ldovrat
Beginner
414 Views
Hi,

This problem might be my own fault, but PARDISO gives erroneous results.

In my own program I copied the solution procedure and parameters from the example file pardiso_unsym.c, and I seem to get bad results.

To eliminate any chance that my own code is wrong, I reproduced this error by replacing the matrix data in the example file with the data below, and also changed the "b" right-hand-side vector (it contained all ones originally).

The results PARDISO returns are way off the true solution (see below).

Since I see PARDISO is capable of solving even 200000 equations, this clearly is the result of some of my wrong doing, but I can't seem to find what it is.

Any help would be kindly appreciated.

Liat Dovrat

PARDISO returns:
x[0] = -37.0641
x[1] = -37.0641
x[2] = 37.1324
x[3] = -74.1574
x[4] = -74.0891
x[5] = -37.1324
x[6] = -198.74
x[7] = -35.8923
x[8] = -133.601
x[9] = -5.02505e+11
x[10] = 3.32281
x[11] = 68.4619
x[12] = -65.1391
x[13] = -111.163
x[14] = 35.8923
x[15] = 71.7847

and the true solution (obtained in Matlab) is:
0.0995
0.0995
-0.0995
0.1989
0.1989
0.0995
-0.1248
0.0651
-0.0488
-0.1736
-0.1031
-0.0271
-0.0759
0.2984
-0.0651
-0.1302

/* Matrix Data in C */

int n=16; /* number of equations */
int ia[17] = {1, 3, 7, 9, 12, 15, 17, 22, 25, 29, 38, 46, 49, 52, 55, 59, 62};
int ja[61] = {1, 2,
2, 3, 4, 5,
3, 6,
5, 6, 14,
7, 9, 13,
8, 15,
8, 9, 10, 12, 16,
11, 12, 13,
11, 14, 15, 16,
1, 2, 3, 6, 7, 9, 11, 12, 14,
1, 2, 3, 6, 10, 11, 12, 14,
1, 2, 4,
3, 5, 6,
9, 12, 13,
8, 11, 12, 15,
11, 12, 16};
double a[61]={0.5, -0.5,
0.5, 0.5, 0.5, -0.5,
-0.5, -0.5,
0.5, 0.5, -0.5,
0.5, -0.5, -0.5,
-0.5, -0.5,
0.5, 0.5, 0.5, -0.5, -0.5,
-0.5, 0.5, 0.5,
0.5, 0.5, 0.5, 0.5,
-1, -1, 1, -1, 1, 1, 1, 1, -1,
-1, -1, 1, -1, 1, 1, 1, -1,
1, 1, -1,
-1, -1, 1,
1, 1, -1,
1, 1, 1, -1,
1, 1, -1};

double b[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0};
0 Kudos
0 Replies
Reply