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

pardiso_schur.c with MKL_PARDISO

bopeng
Employee
360 Views

Hi,

 

I am using 2021.04 oneAPI release.

/opt/intel/oneapi/mkl/latest/examples/c/sparse_directsolvers/source/pardiso_schur.c

 

currently the setting are:

MKL_INT perm[8] = {0, 0, 0, 0, 0, 0, 1, 1};

 

It assumes the last two row and col 2x2 will be think as A22.

 

If I change that to

    MKL_INT perm[8] = {1, 1, 0, 0, 0, 0, 0, 0};

I thought it will do reordering for me, but after change that, the calculated results are wrong.

Can you point out what's wrong?

@Kirill_V_Intel 

 

I am an employee of Intel, ping me directly if any need.

Thanks so much!

-------------------------------------------------------------------------

The reason I am doing this:

My own matrix is

    A11=1482x1482, A22=78281x78381

 

If I want to reuse this pardiso_schur.c, S=A22-A21 * A11-1 * A12 will be 78281x78281

 

in such situation, S*xl=bl need to solve 78281x78281, it needs huge computation time.

0 Kudos
1 Solution
bopeng
Employee
331 Views

Applying following patch will make it works, fixed, thanks for your support!

===============================================================================

 

- MKL_INT perm[8] = {0, 0, 0, 0, 0, 0, 1, 1};
+ MKL_INT perm[8] = {1, 1, 0, 0, 0, 0, 0, 0};
MKL_INT ipiv[2];
MKL_INT n_schur = 2; /* Schur complement solution size */
/* -------------------------------------------------------------------- */
@@ -191,7 +191,7 @@ int main (void)
printf("info after LAPACKE_dsytrf = " IFORMAT " \n", info);
return 1;
}
- info = LAPACKE_dsytrs(matrix_order,uplo,n_schur,nrhs,schur,n_schur,ipiv,&b[n-n_schur],nrhs);
+ info = LAPACKE_dsytrs(matrix_order,uplo,n_schur,nrhs,schur,n_schur,ipiv,&b[0],nrhs);

 

 

 

 

View solution in original post

2 Replies
bopeng
Employee
332 Views

Applying following patch will make it works, fixed, thanks for your support!

===============================================================================

 

- MKL_INT perm[8] = {0, 0, 0, 0, 0, 0, 1, 1};
+ MKL_INT perm[8] = {1, 1, 0, 0, 0, 0, 0, 0};
MKL_INT ipiv[2];
MKL_INT n_schur = 2; /* Schur complement solution size */
/* -------------------------------------------------------------------- */
@@ -191,7 +191,7 @@ int main (void)
printf("info after LAPACKE_dsytrf = " IFORMAT " \n", info);
return 1;
}
- info = LAPACKE_dsytrs(matrix_order,uplo,n_schur,nrhs,schur,n_schur,ipiv,&b[n-n_schur],nrhs);
+ info = LAPACKE_dsytrs(matrix_order,uplo,n_schur,nrhs,schur,n_schur,ipiv,&b[0],nrhs);

 

 

 

 

VidyalathaB_Intel
Moderator
311 Views

Hi,


Glad to know that your issue is resolved and thanks for letting us know.

As the issue is resolved we are closing this thread. Please post a new question if you need any additional information from Intel as this thread will no longer be monitored.


Have a Nice Day!


Regards,

Vidya.


Reply