64 bit integer support on Windows* 64 bit Operating Systems

Submit New Article

December 7, 2010 6:30 AM PST


The Intel Math Kernel Library (Intel MKL) provides two interfaces on 64-bit systems. The interfaces are embodied in interface layer libraries with suffixes lp64 and ilp64. This article explains how to use MKL with huge arrays on Windows* 64-bit.

The Intel MKL is mainly targeting Fortran and C/C++ users, facilitating mixed programming and migration between compilers of different vendors. These two languages associate different size with integer types, so the Intel MKL interfaces are featured with new types, MKL_INT and MKL_LONG, to simplify Fortran-C interoperability. The following table summarizes size of the types on Windows* 64-bit OS:

Integral type

Size

Fortran INTEGER

32 or 64 bit, depending on compiler option

Fortran INTEGER*4

32 bit

Fortran INTEGER*8

64 bit

C/C++ int

32 bit

C/C++ long

32 bit (!)

C/C++ MKL_INT

32 or 64 bit, depending on compiler option

C/C++ MKL_LONG

32 or 64 bit, depending on compiler option


Fortran compiler option that triggers 64-bit interpretation of default INTEGER type is /4I8.

C/C++ compiler option that triggers 64-bit interpretation of MKL_INT and MKL_LONG types is /DMKL_ILP64.

The choice of names LP64 and ILP64 for the Intel MKL interfaces is related to common interpretation of LP64 as "long and pointer are 64-bit" and ILP64 as "int, long, and pointer are 64-bit". This interpretation is followed on on most *nix systems, but it does not hold on Windows* 64-bit, where ‘long' is 32-bit type.   


 Limitations

 All Intel MKL function domains support ILP64 programming with the following exceptions:

• FFTW interfaces to Intel MKL:

- FFTW 2.x wrappers do not support ILP64.
- FFTW 3.2 wrappers support ILP64 for Fortran users by using default INTEGER type, and for C/C++ users by  
  a dedicated set of functions plan_guru64.

• GMP* arithmetic functions do not support ILP64.



Do you need more help?


This article applies to: Intel® Math Kernel Library Knowledge Base