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

Can MKL support both ilp64 and lp64 at the same time?

woshiwuxin
Novice
751 Views
Hi! This question is not weird due to the merger of two packages. One with 64-bit integer (e.g. int64_t) and the other with 32-bit integer (e.g. int), and both use MKL functions (linked with -lmkl_intel_ilp64 and -lmkl_intel_lp64, respectively). One painful solution is to convert one to the other manually. :( Could anyone give me a better solution? Thank you!

0 Kudos
5 Replies
Gennady_F_Intel
Moderator
751 Views
It possible to do only if you, for example, want to use lapack routines with LP64 API ( 32 bit INTEGER ) and pardiso_64wich support 64 bit INTEGER. In this casebefore callingpardiso_64, you need to copy all original INTEGER data to INTEGER*8 and pass these parameters topardiso_64.
0 Kudos
woshiwuxin
Novice
751 Views
Gennady, thanks! The functions are all BLAS and LAPACK functions. It seems that I have to do the labor work. :(
0 Kudos
barragan_villanueva_
Valued Contributor I
751 Views
Hi,

In general mixture of LP64 with ILP64 interfaces is problematic. If your machine is Intel 64 (x86_64) then using native 64-bit integers is preferable in one application.

In order to use for example the same LAPACK functions in two packages simultaneously in one applicationit needs tohave different entry points for LP64 and ILP64 functions.
0 Kudos
woshiwuxin
Novice
751 Views
Hi, Victor! Thanks for the suggestion. I've decided to port the 32-bit integer to 64-bit. I'm doing scientific computation. If the involved matrix is really huge, a signed 32-bit integer (up to 2^31-1) will be a problem for indexing the element (if double precision is used, arrays greater than 16 GB might be problematic).
0 Kudos
barragan_villanueva_
Valued Contributor I
751 Views
Hi,

My syggestion was to use 64-bit integers just for integer argument which pass to MKL functions only.
All other integers in your appication packagesmay be unchanged. Therefore you can link with ILP64 MKL intefraces.
0 Kudos
Reply