As I have been trying to build numexpr using MKL-linked numpy, I came across a post in this group which was apparently the source of site.cfg.example included in version 2.2.2. That example did not work for me, since my home-grown numpy was linked to ILP64 libraries from MKL, not LP64, although older examples in that file refering to ILP64 libraries seemed to indicate that doing so was possible.
Upon investigation, it appeared that interpreter.cpp has a bunch of typedefs like
typedef void (*FuncFFPtr_vml)(int, const float*, float*);
However, according to /opt/intel/mkl/include/mkl_vml_functions.h, MKL defines first input as MKL_INT which means (see mkl_types.h) long long for ILP64 and int for LP64.
So I solved my problem by cloning typedefs with a bunch of #ifdef MKL_ILP64 (since the way to tell numpy to link to ILP64 MKL is via -DMKL_ILP64 compiler flag). So far seems to be working but I have not tested too extensively.
Not sure if that is the right way to handle a situation like this, but I think something needs to be done to allow either kind of MKL work with numexpr
Cheers,
Sergei