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

Using mkl functions for solving system of linear equations with UPDATED RHS vector

1 Reply
Black Belt

Instead of using a "driver routine" such as Dgesv, use "computational routines" such as dgetrf+dgetrs. The first, Dgetrf, needs only to be called once, to factor A into its upper and lower triangular factors, an operation that takes O(N3) operations. Subsequently, Whenever you have a new value of b available, call Dgetrs to obtain the solution x, an operation that takes O(N2) operations.

You can organize your work similarly in the sparse matrix case. Pardiso organizes its work into "phases". The first two phases need only be performed once, and Pardiso will have stored the factors at that point. The third phase can be called as often as needed with different R.H.S. vectors to obtain the corresponding solutions.