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

quadruple precision in Lapack

Heng_T_
Beginner
1,486 Views

Recently due to my research project, I want to calculate the inverse of an matrix in higher precision. I think it is best to use quadruple precision. 

I learned that the ifort can define DOUBLE PRECISION declaration as REAL(KIND=16) ,i.e. in quadruple precision.

It seems that the source code of Lapack and my code which calls the subroutine in Lapack, can be compiled using -double-size 128 option. 

However, I do not think Intel MKL offers quadruple precision version of Lapack.

Can this be done with MKL? If not, what is the possible way?

0 Kudos
5 Replies
mecej4
Honored Contributor III
1,486 Views
There are many algorithms (including some in Lapack) that contain tuning parameters in the source code. These tuning parameters differ from single-precision to double-precision, and their values for quad-precision may be unknown. Merely compiling these sources using a compiler-provided automatic promotion from double to quad-precision will not produce a quad-precision Lapack library that will deliver true quad-precision.
0 Kudos
TimP
Honored Contributor III
1,486 Views
I don't see the objection against compiling lapack and blas with the quad precision promotion option. Needless to say, it will be a lot slower than MKL double precision. Addition of OpenMP parallelism should help, but it's not necessarily straightforward. Also presumably needless to say, explicit inversion of a matrix is neither an efficient nor most accurate way to solve most matrix algebra problems. Among the options for cases where double precision isn't sufficiently accurate would be iterative improvement.
0 Kudos
Heng_T_
Beginner
1,486 Views
Thanks very much for all replies! Now I realize that in my project, even though I do not need the inversion of a matrix, however, I have to solve the general eigenvalue problem in higher precision. Still, this can not be done with present Intel MKL, according to what mecej4 & TimP (Intel) said. So I think I should figure out another way.
0 Kudos
yuriisig
Beginner
1,486 Views
I have the fast program of diagonalization of quad-precision accuracy which is partially based on BLAS and LAPACK (x64). For example, my qgemm only in 13 times more slowly dgemm Intel MKL.
0 Kudos
Heng_T_
Beginner
1,486 Views
yuriisig wrote:

I have the fast program of diagonalization of quad-precision accuracy which is partially based on BLAS and LAPACK (x64). For example, my qgemm only in 13 times more slowly dgemm Intel MKL.

Thanks very much! If you like, could you share your code with me? I have PM you my email account.
0 Kudos
Reply