Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

PARDISO optimization?

$
0
0

Here goes,

Relevant information (I hope):

  • Using Pardiso to solve linear set of equations Ax = b
  • matrix A can be extremely large & sparse, nonsymmetric, and is also put into csr format using mkl routine

Below is the section of code where I call Pardiso, it works great everything is fine. I was really hoping someone could look at my set up and let me know if there is something I can do to make it even faster, or if it is as fast as it's going to get.

I also use mkl_set_num_threads(n) above the code to make use of multiple cores according to the desired n.

CODE

//    Call pardiso solver

        MKL_INT pt[64], iparm[64];

        for(i = 0; i < 64; i++) {

            pt[i] = 0;

            iparm[i] = 0;

        }

        MKL_INT *perm;

        perm = (MKL_INT*)mkl_malloc(m*sizeof(MKL_INT),16);

        if (perm == NULL) 

        {

            cout << ">>> error allocating perm"<< endl;

            return (0);

        }       

MKL_INT maxfct, mnum, mtype, phase, nrhs, msglvl, error;

        maxfct = 1;

        mnum = 1;

        mtype = 11;

        nrhs = 1;

        msglvl = 1;

        iparm[0] = 1;

        iparm[1] = 3;

        iparm[26] = 1;

        iparm[34] = 1;

        iparm[60] = 0;

        error = 0;

        

        //    Pardiso Direct Solver

        phase = 13;

        pardiso (pt, &maxfct, &mnum, &mtype, &phase, &n, acsr, ia, ja, perm, &nrhs, iparm, &msglvl, b, solution, &error);

        if (error != 0) {

            cout << "ERROR during symbolic factorization: "<< error << endl;

        }

 

Again all I am really seeking is whether or not my call could be any better, or if this is optimal. Let me know if there is any additional information needed, and I will be checking my email frequently today to respond quickly.

Sincerely, Jared


Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>