Using the ILP64 Interface vs. LP64 Interface
The ILP64 libraries use the 64bit integer type (necessary for indexing large arrays, with more than 2^{31}1 elements), whereas
the LP64 libraries index arrays with the 32bit integer type.
Intel® oneAPI Math Kernel Library
The
LP64 and ILP64 interfaces are implemented in the Interface layer. Link with the
following interface libraries for the LP64 or ILP64 interface, respectively:
 libmkl_intel_lp64.aorlibmkl_intel_ilp64.afor static linking
 libmkl_intel_lp64.soorlibmkl_intel_ilp64.sofor dynamic linking
The
ILP64 interface provides for the following:
 Support large data arrays (with more than 2^{31}1 elements)
 Enable compiling your Fortran code with thecompiler optioni8
The LP64 interface provides compatibility with the previous versions because "LP64" is just a new name for the only interface that the versions lower than 9.1 provided. Choose the ILP64 interface if your application uses for calculations with large data arrays or the library may be used so in future.
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
Compiling for LP64/ILP64
The
table below shows how to compile for the ILP64 and LP64 interfaces:
Fortran
 

Compiling for ILP64
 ifort
i 8
 I<mkl directory> / include
... 
Compiling for LP64
 ifort
 I<mkl directory> / include ... 
C or C++
 
Compiling for ILP64
 ic c
 DMKL_ILP64
 I<mkl directory> / include ... 
Compiling for LP64
 ic c
 I<mkl directory> / include ... 
Linking of an application
compiled with the
or
option
to the LP64 libraries may result in unpredictable consequences and erroneous
output.
i
8
DMKL_ILP64Coding for ILP64
You
do not need to change existing code if you are not using the ILP64 interface.
To migrate to ILP64 or write new code for ILP64, use appropriate types for parameters of the functions and subroutines:
Intel® oneAPI Math Kernel Library
Integer Types
 Fortran
 C or C++


32bit integers
 INTEGER*4 or
INTEGER(KIND=4)  int 
Universal integers for
ILP64/LP64:
 INTEGER without specifying
KIND  MKL_INT 
Universal integers for
ILP64/LP64:
 INTEGER*8 or
INTEGER(KIND=8)  MKL_INT64 
FFT interface integers for
ILP64/LP64
 INTEGER without specifying
KIND  MKL_LONG 
To determine the type of an integer parameter of a
function, use appropriate include files. For functions
that support only a Fortran interface, use the C/C++ include files
*.h
.
The above table explains which integer parameters of functions become 64bit and which remain 32bit for ILP64. The table applies to most functions except some Vector Mathematics and Vector Statistics functions, which require integer parameters to be 64bit or 32bit regardless of the interface:
Intel® oneAPI Math Kernel Library
 Vector Mathematics:Themodeparameter of the functions is 64bit.
 Random Number Generators (RNG):All discrete RNG exceptviRngUniformBits64are 32bit.TheviRngUniformBits64generator function andvslSkipAheadStreamservice function are 64bit.
 Summary Statistics:Theestimateparameter of thevslsSSCompute/vsldSSComputefunction is 64bit.
Refer to the
Developer Reference for more
information.
Intel® oneAPI Math Kernel Library
To better understand ILP64 interface details, see
also examples.
Limitations
All function domains support ILP64 programming but FFTW interfaces to :
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
 FFTW 2.x wrappers do not support ILP64.
 FFTW 3.x wrappers support ILP64 by a dedicated set of functionsplan_guru64.