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

Can MKL handle vectors larger than 2 billion ?

Hi all,

I'm new to intel compiler tools and I would like to use MKL for accelerating some multi-gigapixel processing software I developed.

However, from a first glance at some of the MKL example programs it looks like vector/matrix sizes and dimensions are specified as plain "integers" in the C/C++ interface.

This would mean that the length of vectors/arrays etc. is inherently limited to 2 billion, even in the 64-bit version of the library (because on windows 64-bit model, the plain 'integer' data type is 32 bit only) despite the presence of enough RAM (e.g. 128 GB) to store vectors of dozens of billions of floating point numbers.

So my question is: what is the maximum size/length of vectors that can be handled by the most important MKL routines such as sparse-matrix-vector multiply, DFT and PARDISO solver ?
Are there special call interfaces (such as in FFTW-lib) that allow true 64-bit-sized input dimensions ?

Thanks in advance for any answers.
0 Kudos
1 Reply
yes, MKL handles huge data arrays more then 2 billion elements. You have to use ILP64 API for that. Please refer to user's guide or as an example to this article for more information.
0 Kudos