Replaceability
Intel MKL provides PARDISO (short for "PARallel DIrect SOlver", single-node mode) and PARDISO-Cluster (cluster mode). PARDISO is a parallel solver for large sparse linear systems of equations on shared-memory architectures, while PARDISO-Cluster, like SCADSS, supports solving large sparse linear systems of equations in clusters where MPI and OpenMP technologies are used. Direct solvers generally have three phases: analyze, factorize, and solve. Each phase can be called independently based on your requirements. For example, when you solve a partial differential equation that involves a temporal part and the coefficient matrix remains unchanged, you need to call the analyze and factorize phases only once and the solve phase repeatedly. If a value of the coefficient matrix changes, but the location of the non-zero elements of the matrix does not change, the analyze phase needs to be called only once and the solve phase needs to be repeatedly called. The following table describes the mapping between MKL's direct solver interfaces and SCADSS interfaces.
PARDISO-Cluster Interface |
SCADSS Interface |
|---|---|
mtype=2; or mtype = 4; phase = 11; cluster_sparse_solver(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &comm, &error); |
KmlScadssSpdAnalyzeDI(&handle), or KmlScadssHpdAnalyzeDI(&handle); |
mtype=2; or mtype = 4; phase = 22; cluster_sparse_solver(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &comm, &error); |
KmlScadssSpdFactorizeDI(&handle), or KmlScadssSpdFactorizeDI(&handle); |
mtype=2; or mtype = 4; phase = 33; cluster_sparse_solver(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &comm, &error); |
KmlScadssSpdSolveDI(&handle), or KmlScadssSpdSolveDI(&handle); |
mtype=2; or mtype = 4; phase = -1; cluster_sparse_solver(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &comm, &error); |
KmlScadssSpdCleanDI(&handle), or KmlScadssSpdCleanDI(&handle); |
- The direct solver in MKL uses the mtype parameter to specify the type of the input sparse matrix. mtype=2 indicates that the input matrix is a symmetric positive definite matrix, and mtype=4 indicates that it is a Hermitian positive definite matrix.
- The phase parameter controls the operations performed by MKL's direct solver. The values of phase in the table above are for reference only. You can set it to other values as required. For example, the value 12 indicates that the analyze and factorize phases are executed.
PARDISO Interface |
SCADSS Interface |
|---|---|
mtype=2; or mtype = 4; phase = 11; pardiso(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &error); |
KmlScadssSpdAnalyzeDI(&handle), or KmlScadssHpdAnalyzeDI(&handle); |
mtype=2; or mtype = 4; phase = 22; pardiso(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &error); |
KmlScadssSpdFactorizeDI(&handle), or KmlScadssHpdFactorizeDI(&handle); |
mtype=2; or mtype = 4; phase = 33; pardiso(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &error); |
KmlScadssSpdSolveDI(&handle), or KmlScadssHpdSolveDI(&handle); |
mtype=2; or mtype = 4; phase = -1; pardiso(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &perm, &nrhs, iparm, &msglvl, b, x, &error); |
KmlScadssSpdCleanDI(&handle), or KmlScadssHpdCleanDI(&handle); |