Trouble building an MKL evironment
I'm trying to build and MKL environment, replacing -lopenblas with
BLAS_LIBS='-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl'
LAPACK_LIBS='-Wl,--no-as-needed -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl'
for MKL BLAS/LAPACK. This is with the appropriate library paths from the mkl/2020.0.166 in place.
I am currently stuck in the custom build of matplotlib (tried to get help debugging this from IRC, freenode #python channel … they are not very fond of the custom setup.py/setupext.py there). It stumbles over MKL libs the wrong way:
set build/lib.linux-x86_64-3.6/matplotlib/_version.py to '3.1.2'
running build_ext
INTEL MKL ERROR: /sw/env/system-gcc/intel-mkl/2020.0.166/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64_lin/libmkl_avx.so: undefined symbol: mkl_sparse_optimize_bsr_trsm_i8.
Intel MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.
This really hard to debug as I got no clue on what the build actually tries there. There is no useful info on
- which extension it is trying to build
- which frikkinn' command it is using for compile and link
Maybe some of you being more closer to python stuff can help? The code relating to the version in pkgsrc I'm trying to build is available under https://github.com/matplotlib/matplotlib/tree/v3.1.x .
Using strace, I see that at some point, it accesses the core MKL libraries (including that providing the symbol it is missing above).
I faintly remember something about tracing in python … might try that. But I consider it a bug that matplotlib's setup.py seems to offer no way to seet what is going in.