- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am interested in using mkl for a code that involves solution of a system of linear equations: {x} = {b}, where , {b} are given and we want to find vector {x}. My code has to solve this system of equations repeatedly (for many iterations), for THE SAME MATRIX , but for different values of {b}. The value of {b} at each iteration depends on the value of {x} from the previous iteration, so the algorithm is something like this:
Initialize {x}
do i = 1,Niter
[Find {b}, given {x}]
[Solve {x} = {b} and find updated {x}]
end do !i
Given that the coefficient array does not change during the specific iterative algorithm, I would like to ask whether and how exactly I could use the DGESV and PARDISO routines (I am interested in both full and sparse -arrays) to only "invert" once (in the first iteration), then maintain the "inversion" information stored into and then simply call mkl routines to only do the "back-substitution" in all subsequent iterations i = 2,3,...,Niter.
I need to mention that I have previously used DGESV and PARDISO, but have not figured out how to employ them for "back-substitution only".
Thanks in advance!!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page