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

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

woshiwuxin's picture

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!

CPU: Intel Core 2 Duo 2.4 GHz OS: Mac OS X 10.5.8 Linux: Debian 5.0 x86_64 Compiler: Intel Fortran Compiler 11.1 & Intel C++ Compiler 11.1 (with Intel MKL included)
6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Gennady Fedorov (Intel)'s picture
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.
woshiwuxin's picture

Gennady, thanks! The functions are all BLAS and LAPACK functions. It seems that I have to do the labor work. :(

CPU: Intel Core 2 Duo 2.4 GHz OS: Mac OS X 10.5.8 Linux: Debian 5.0 x86_64 Compiler: Intel Fortran Compiler 11.1 & Intel C++ Compiler 11.1 (with Intel MKL included)
Victor Pasko (Intel)'s picture

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.

Thanks, -- Victor
woshiwuxin's picture

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).

CPU: Intel Core 2 Duo 2.4 GHz OS: Mac OS X 10.5.8 Linux: Debian 5.0 x86_64 Compiler: Intel Fortran Compiler 11.1 & Intel C++ Compiler 11.1 (with Intel MKL included)
Victor Pasko (Intel)'s picture

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.

Thanks, -- Victor

Login to leave a comment.