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

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

Hainan_W
Beginner
160 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
160 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

2 Replies
Kirill_V_Intel
Employee
161 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 

Hainan_W
Beginner
160 Views

Thank you, Kirill. That works :)

Regards,

Hainan

Reply