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

Slower performance of new iterative sparse solvers (cg and fgmres)

HCH298
Novice
390 Views

Hi there,

I have an "old" fortran code (written about 10 years ago during my PhD study) that was developed to solve a large linear algebraic equation system. The coefficient matrix of the equation system is sparse and SPD. Therefore, I used the conjugate gradient (CG) iterative sparse solver based on the spblas2 function of mkl_dcsrsymv. At the time when the code was initially developed, this is the right function to use in the CG routine for RCI_request = 1. Recently, when I was working on improving the performance of the solver by providing a conditioner to the solver and noticed a change. This function, i.e., mkl_dcsrsymv, and other similar functions are now deprecated. Instead, it is now replaced by a new spblas2 function mkl_sparse_d_mv. I noticed the change, in terms of using these two function, is not that significant. So, I decided to update the code to use the new function. The update is easy and pretty straightforward. However, after comparing the computation time between using these two functions, i.e., mkl_dcsrsymv vs mkl_sparse_d_mv, to solve the same large equations system, I noticed the time is more than doubled, i.e., the new cg routine uses more than twice of the amount of time of the old cg routine. But the only difference is the use of mkl_sparse_d_mv function replacing mkl_dcsrsymv function.

 

I'm not quite sure the double time increase for the same equation system is due to indeed the only change of the aforementioned function, or it is because I'm not using the correct package for optimum performance of the new function. I have installed the OneAPI Base and HPC Toolkits for Linux back in 2020. Any insights will be much appreciated.

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
377 Views

I think your question is more suited for Intel® oneAPI Math Kernel Library - Intel Communities as it does not seem related to the Fortran compiler.

0 Kudos
HCH298
Novice
366 Views

Thanks for pointing this out. I have reposted the question on the MKL forum.

0 Kudos
Reply