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

MKL equivalent to IMSL lin_sol_gen

Brian_Murphy
New Contributor II
320 Views

Is MKL/gesv an appropriate replacement for IMSL/lin_sol_gen?  I believe both do an LU decomposition to get the solution.  If I merely replace CALL LIN_SOL_GEN(A,B,X) with CALL GESVX(A,B,X), how close should I reasonably expect the solutions to match for double precision problems with, say 100x100, coefficient matrix. 

0 Kudos
3 Replies
mecej4
Honored Contributor III
320 Views

What needs to be done to answer your question is to read the IMSL documentation for the routine in question, and then search for an MKL routine with the same capability. Given that both IMSL and MKL have hundreds of routines, it is not surprising that there is no cross-over table. You may find the following new tool helpful:

      Intel® Math Kernel Library LAPACK Function Finding Advisor

Your second question does not have an answer, because the error in the solution of A x = b varies considerably with the condition of the matrix that you pass to the solver. There exist Lapack routine to find out: https://software.intel.com/en-us/mkl-developer-reference-fortran-estimating-the-condition-number-lapack-computational-routines .

0 Kudos
Brian_Murphy
New Contributor II
320 Views

Thanks again, mecej4.  Looking in the documentation was how I came up with the driver routine gesvx.  When I apply it to what ought to be a well conditioned problem, results match to about 10 digits.  That's not bad out of 15 or so digits, but I was expecting better.  The MKL function finding tool is very nice.  That leads to gesv, gesvx and gesvxx.  I had selected gesvx because it nicely matched the calling syntax of lin_sol_gen.  gesvxx is described as using extra precise refinement, but that routine proving to be elusive.  It is not in lapack.f90.  Does this mean having to call dgsevxx and passing it all 27 arguments?

0 Kudos
Brian_Murphy
New Contributor II
320 Views

False alarm.  I checked the forward error, ferr, and it was otoo E-14.  So I redid my pair of comparison runs, and now they match to 14 or so digits, and I'm entirely happy with that.  I guess I got sloppy with my comparison runs.  gesvx is looking like a great replacement for lin_sol_gen. :)

0 Kudos
Reply