diff --git a/pardiso_schur.c b/pardiso_schur.c index 63953b1..0d10b08 100644 --- a/pardiso_schur.c +++ b/pardiso_schur.c @@ -36,6 +36,7 @@ int main (void) { +#if 0 /* Matrix data. */ MKL_INT n = 8; MKL_INT ia[9] = { 1, 5, 8, 10, 12, 15, 17, 18, 19}; @@ -57,11 +58,30 @@ int main (void) 11.0, 5.0 }; +#endif + + + MKL_INT n = 80000; + MKL_INT ia[n+1]; + for (int index = 0; index < (n+1); index++) + { + ia[index] = index+1; // 1,2,3,4,...,n, n+1 + } + MKL_INT ja[n]; + double a[n]; + for (int index = 0; index < n; index++) + { + ja[index] = index+1; // 1,2,3,4,...,n + a[index] = 1.0; // 1,1,1,1,1,...,1 + } + + int matrix_order=LAPACK_ROW_MAJOR; char uplo = 'U'; MKL_INT mtype = -2; /* Real symmetric matrix */ /* RHS and solution vectors. */ - double b[8], x[8]; + // double b[8], x[8]; + double b[n], x[n]; MKL_INT nrhs = 1; /* Number of right hand sides. */ /* Internal solver memory pointer pt, */ /* 32-bit: int pt[64]; 64-bit: long int pt[64] */ @@ -75,11 +95,24 @@ int main (void) double ddum; /* Double dummy */ MKL_INT idum; /* Integer dummy. */ /* Schur data */ +#if 0 double schur[4] = {0.0, 0.0, 0.0, 0.0 }; MKL_INT perm[8] = {0, 0, 0, 0, 0, 0, 1, 1}; MKL_INT ipiv[2]; MKL_INT n_schur = 2; /* Schur complement solution size */ +#endif + MKL_INT n_schur = 825; /* Schur complement solution size */ + MKL_INT ipiv[n_schur]; + MKL_INT perm[n]; + for (int index = 0; index < n; index++) + { + if (index < n_schur) + perm[index]=1; + else + perm[index]=0; + } + double schur[n_schur*n_schur]; /* -------------------------------------------------------------------- */ /* .. Setup Pardiso control parameters. */ /* -------------------------------------------------------------------- */ @@ -136,6 +169,7 @@ int main (void) } printf ("\nFactorization completed ... "); printf("\nSchur matrix: \n"); fflush(0); +#if 0 for(i=0; i