Hi,

I

am trying to use PARDISO (in Intel C++ compiler 12.0) as sparse direct

solver in our application. For testing purposes, I am first assembling

the coefficient matrix in the normal dense form and solve it using

normal direct solver (getrf, getrs) then I convert it into CSR format

and again solve the equation using PARDISO to get the answer and compare

it with two solvers. PARDISO results match very well with direct

solvers, but in some problems they are totally different and I know that

PARDISO returns wrong results. I save the coefficient matrix "M" in the

equation which is non-symmetric and in complex format and

is a "Msize x Msize" matrix:

Mx=b

and then convert it to CSR format as below:

int nnz=0;

for (int i=0; i if (M[i]!=(dcmx)0.0)

++nnz;

dcmx *a;

int *ia;

int *ja;

a=new dcmx[nnz];

ia=new int[Msize+1];

ja=new int[nnz];

int p1=0;

int p2=0;

for (int i=0; i{

bool f=true;

for (int j=0; j {

if (M[j*Msize+i]!=(dcmx)0.0)

{

// first element in this row is detected

if (f)

{

ia[p2]=p1+1;

++p2;

f=false;

}

a[p1]=M[j*Msize+i];

ja[p1]=j+1;

++p1;

}

}

}

ia[p2]=p1+1;

when formatting is done, I call PARDISO with the following parameters:

iparm[0]=1; // no solver default

iparm[1]=2; // fill-in reordering from parallel METIS

iparm[2]=1; // not used

iparm[3]=0; // use direct solver

iparm[4]=0; // no user fill-in reducing permutation

iparm[5]=0; // Write solution into x

iparm[6]=0; // not used

iparm[7]=2; // max numbers of iterative refinement steps

iparm[8]=0; // not used

iparm[9]=13; // Perturb the pivot elements with 1E-13

iparm[10]=1; // Use nonsymmetric permutation and scaling MPS

iparm[11]=0; // not used

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 used

iparm[15]=0; // not used

iparm[16]=0; // not used

iparm[17]=-1;// output: number of nonzeros in the factor LU

iparm[18]=-1;// output: Mflops for LU factorization

iparm[19]=0; // output: numbers of CG Iterations

maxfct=1; // maximum number of numerical factorizations

mnum=1; // which factorization to use

msglvl=1; err=0;

As

I stated some times PARDISO results wrong solution and when this

happens and I re-run the tests I get different answers from PARDISO,

even different from before and that's very odd! Can you please help me

to verify where the formatting to CSR or PARDISO parameters that I use

are incorrect or there can be something else?

Regards,

D.