17#include "fasp_functs.h"
20#include "mkl_pardiso.h"
21#include "mkl_spblas.h"
51 MKL_INT n = ptrA->
col;
52 MKL_INT* ia = ptrA->
IA;
53 MKL_INT* ja = ptrA->
JA;
60 MKL_INT maxfct, mnum, phase, error, msglvl;
68 printf(
"### DEBUG: %s ...... [Start]\n", __FUNCTION__);
69 printf(
"### DEBUG: nr=%d, nc=%d, nnz=%d\n", ptrA->
row, ptrA->
col, ptrA->
nnz);
72 PARDISOINIT(pt, &mtype, iparm);
85 REAL start_time, end_time;
89 PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nrhs, iparm,
90 &msglvl, &ddum, &ddum, &error);
92 printf(
"### ERROR: %d, %s %d\n", error, __FUNCTION__, __LINE__);
93 printf(
"### ERROR: PARDISO symbolic factorization failed!\n");
98 PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nrhs, iparm,
99 &msglvl, &ddum, &ddum, &error);
101 printf(
"### ERROR: %d, %s %d\n", error, __FUNCTION__, __LINE__);
102 printf(
"### ERROR: PARDISO numeric factorization failed!\n");
107 PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nrhs, iparm,
108 &msglvl, f, x, &error);
111 printf(
"### ERROR: %d, %s %d\n", error, __FUNCTION__, __LINE__);
112 printf(
"### ERROR: Solution failed!\n");
122 PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, &ddum, ia, ja, &idum, &nrhs, iparm,
123 &msglvl, &ddum, &ddum, &error);
126 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
133 printf(
"### ERROR: PARDISO is not available!\n");
157 MKL_INT n = ptrA->
col;
158 MKL_INT* ia = ptrA->
IA;
159 MKL_INT* ja = ptrA->
JA;
165 MKL_INT phase, error, msglvl;
168 printf(
"### DEBUG: %s ...... [Start]\n", __FUNCTION__);
169 printf(
"### DEBUG: nr=%d, nc=%d, nnz=%d\n", ptrA->
row, n, ptrA->
nnz);
174 PARDISOINIT(pdata->
pt, &(pdata->mtype), pdata->iparm);
175 pdata->iparm[34] = 1;
179 pdata->iparm[2] = fasp_get_num_threads();
192 REAL start_time, end_time;
196 PARDISO(pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase, &n, a,
197 ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, &ddum, &ddum, &error);
199 printf(
"### ERROR: %d, %s %d\n", error, __FUNCTION__, __LINE__);
200 printf(
"### ERROR: PARDISO symbolic factorization failed!\n");
205 PARDISO(pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase, &n, a,
206 ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, &ddum, &ddum, &error);
209 printf(
"### ERROR: %d, %s %d\n", error, __FUNCTION__, __LINE__);
210 printf(
"### ERROR: PARDISO numeric factorization failed!\n");
220 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
246 MKL_INT n = ptrA->
col;
247 MKL_INT* ia = ptrA->
IA;
248 MKL_INT* ja = ptrA->
JA;
255 MKL_INT phase, error, msglvl;
257 REAL start_time, end_time;
267 PARDISO(pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase, &n, a,
268 ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, f, x, &error);
271 printf(
"### ERROR: %d, %s %d\n", error, __FUNCTION__, __LINE__);
272 printf(
"### ERROR: PARDISO solve failed!\n");
282 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
307 MKL_INT phase, error, msglvl;
310 printf(
"### DEBUG: %s ...... [Start]\n", __FUNCTION__);
314 PARDISO(pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase, &idum,
315 &ddum, ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, &ddum, &ddum, &error);
318 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
void fasp_cputime(const char *message, const REAL cputime)
Print CPU walltime.
void fasp_gettime(REAL *time)
Get system time.
INT fasp_solver_pardiso(dCSRmat *ptrA, dvector *b, dvector *u, const SHORT prtlvl)
Solve Ax=b by PARDISO directly.
Main header file for the FASP project.
#define SHORT
FASP integer and floating point numbers.
#define FASP_SUCCESS
Definition of return status and error messages.
#define ERROR_SOLVER_MISC
#define ERROR_SOLVER_EXIT
Data for Intel MKL PARDISO interface.
void * pt[64]
Internal solver memory pointer.
Sparse matrix of REAL type in CSR format.
INT col
column of matrix A, n
REAL * val
nonzero entries of A
INT row
row number of matrix A, m
INT * IA
integer array of row pointers, the size is m+1
INT nnz
number of nonzero entries
INT * JA
integer array of column indexes, the size is nnz
Vector with n entries of REAL type.
REAL * val
actual vector entries