Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

How to get the number of nonzeros (nnz) after pardiso factorization

Hainan_W
Beginner
447 Views

Hi all,

Is there a way to directly get the number of nonzeros after pardiso factorization? By setting msglvl = 1, solver statics including nnz will be printed to screen.

pardiso (pt, maxfct, mnum, mtype, phase, n, a, ia, ja, perm, nrhs, iparm, msglvl, b, x, error)

But can we directly get value of nnz in code?

Thanks,

Hainan

0 Kudos
1 Solution
Kirill_V_Intel
Employee
447 Views

Hello Hainan,

You can set iparm[17] < 0 before calling the factorization phase. Then, the number of nnz in the factors will be reported in iparm[17].

Please, refer to https://software.intel.com/en-us/mkl-developer-reference-c-pardiso-iparm-parameter for the description of many other parameters for PARDISO.

Best,
Kirill 

View solution in original post

0 Kudos
2 Replies
Kirill_V_Intel
Employee
448 Views

Hello Hainan,

You can set iparm[17] < 0 before calling the factorization phase. Then, the number of nnz in the factors will be reported in iparm[17].

Please, refer to https://software.intel.com/en-us/mkl-developer-reference-c-pardiso-iparm-parameter for the description of many other parameters for PARDISO.

Best,
Kirill 

0 Kudos
Hainan_W
Beginner
447 Views

Thank you, Kirill. That works :)

Regards,

Hainan

0 Kudos
Reply