Any chance to support ILP64 MKL in the future?
Describe the feature you would like to be implemented.
Eigen can benefit from external BLAS and LAPACK libraries to further speed up matrix operations, including Intel MKL. However, according to https://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html:
on a 64bits system, you must use the LP64 interface (not the ILP64 one)
Is there any chance to support the ILP64 one as well in the future?
Would such a feature be useful for other users? Why?
In general, it's fine and the user's responsibility to use a "supported" 3rd party BLAS library, but there's a special case: when writing MEX functions for MATLAB.
MATLAB ships and makes use of ILP64 variant MKL as BLAS library, which is clearly unsupported by Eigen. However, MEX files run in the same process as MATLAB and are linked to the bundled ILP64 MKL as well. It's at least tricky, if not impossible, to use any external BLAS for MEX.
Any hints on how to implement the requested feature?
N/A
Additional resources
Error message throw by MKL with MKL_VERBOSE=1, when performing a matrix-vector multiplication implemented in MEX with Eigen and #define EIGEN_USE_BLAS:
Intel MKL ERROR: Parameter 6 was incorrect on entry to DGEMV .
MKL_VERBOSE oneMKL 2021.0 Update 3 Product build 20210617 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors, Lnx 3.60GHz ilp64 intel_thread
MKL_VERBOSE DGEMV(N,25769803780,17179869190,0x7f7bb2bf9fd0,0x7f77b4af3bb0,4294967300,0x7f77b4b418c0,4294967297,0x7f7bb2bfa030,0x7f77b4bf4e80,1) 693ns CNR:AVX2 Dyn:1 FastMM:1 TID:0  NThr:4