17#include "fasp_functs.h"
20#include "mkl_pardiso.h"
22#include "mkl_spblas.h"
54 MKL_INT n = ptrA->
col;
55 MKL_INT *ia = ptrA->
IA;
56 MKL_INT *ja = ptrA->
JA;
63 MKL_INT maxfct, mnum, phase, error, msglvl;
71 printf(
"### DEBUG: %s ...... [Start]\n", __FUNCTION__);
72 printf(
"### DEBUG: nr=%d, nc=%d, nnz=%d\n", m, n, nnz);
75 REAL start_time, end_time;
78 PARDISOINIT(pt, &mtype, iparm);
86 PARDISO (pt, &maxfct, &mnum, &mtype, &phase,
87 &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, &ddum, &ddum, &error);
89 printf (
"### ERROR: Symbolic factorization failed %d!\n", error);
94 PARDISO (pt, &maxfct, &mnum, &mtype, &phase,
95 &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, &ddum, &ddum, &error);
97 printf (
"\n### ERROR: Numerical factorization failed %d!\n", error);
102 PARDISO (pt, &maxfct, &mnum, &mtype, &phase,
103 &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, f, x, &error);
106 printf (
"\n### ERROR: Solution failed %d!\n", error);
116 PARDISO (pt, &maxfct, &mnum, &mtype, &phase,
117 &n, &ddum, ia, ja, &idum, &nrhs,
118 iparm, &msglvl, &ddum, &ddum, &error);
121 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
128 printf(
"### ERROR: PARDISO is not available!\n");
155 MKL_INT n = ptrA->
col;
156 MKL_INT *ia = ptrA->
IA;
157 MKL_INT *ja = ptrA->
JA;
163 MKL_INT phase, error, msglvl;
166 printf(
"### DEBUG: %s ...... [Start]\n", __FUNCTION__);
167 printf(
"### DEBUG: nr=%d, nc=%d, nnz=%d\n", m, n, nnz);
172 PARDISOINIT(pdata->
pt, &(pdata->mtype), pdata->iparm);
173 pdata->iparm[34] = 1;
177 pdata->iparm[2] = fasp_get_num_threads();
180 REAL start_time, end_time;
189 PARDISO (pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase, &n,
190 a, ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, &ddum, &ddum, &error);
192 printf (
"### ERROR: Symbolic factorization failed %d!\n", error);
197 PARDISO (pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase, &n,
198 a, ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, &ddum, &ddum, &error);
201 printf (
"\n### ERROR: Numerical factorization failed %d!\n", error);
211 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
240 MKL_INT n = ptrA->
col;
241 MKL_INT *ia = ptrA->
IA;
242 MKL_INT *ja = ptrA->
JA;
249 MKL_INT phase, error, msglvl;
251 REAL start_time, end_time;
257 PARDISO (pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase,
258 &n, a, ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, f, x, &error);
261 printf (
"### ERROR: Solution failed %d!\n", error);
271 printf(
"### DEBUG: %s ...... [Finish]\n", __FUNCTION__);
296 MKL_INT phase, error, msglvl;
301 printf(
"### DEBUG: %s ...... [Start]\n", __FUNCTION__);
305 PARDISO (pdata->
pt, &(pdata->maxfct), &(pdata->mnum), &(pdata->mtype), &phase,
306 &idum, &ddum, ia, ja, &idum, &nrhs, pdata->iparm, &msglvl, &ddum,
310 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_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 * IA
integer array of row pointers, the size is m+1
INT * JA
integer array of column indexes, the size is nnz
Vector with n entries of REAL type.
REAL * val
actual vector entries