Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

MKL_USE_STATIC_LIBS broken #18255

@leezu

Description

@leezu

Description

If we compile mxnet via cmake -GNinja -DUSE_MKLDNN=0 -DMKL_USE_STATIC_LIBS=0 -DUSE_CUDA=0 ..; ninja, running an operation that requires MKL will cause termination.

Error Message

INTEL MKL ERROR: /opt/intel/mkl/lib/intel64/libmkl_vml_avx512.so: undefined symbol: mkl_lapack_dspevd.
Intel MKL FATAL ERROR: cannot load libmkl_vml_avx512.so or libmkl_vml_def.so.
terminate called without an active exception

To Reproduce

python3 -c 'import mxnet as mx; print(mx.nd.square(mx.nd.random.uniform(shape=(1024,))))'

Discussion

The missing symbol is defined in /opt/intel/mkl/lib/intel64/libmkl_core.so: 000000000095ad00 T mkl_lapack_dspevd. libmxnet.so does depend on libmkl_core.so:

% ldd libmxnet.so
[...]
        libmkl_intel_lp64.so => /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007fe082883000)
        libmkl_intel_thread.so => /opt/intel/mkl/lib/intel64/libmkl_intel_thread.so (0x00007fe080317000)
        libmkl_core.so => /opt/intel/mkl/lib/intel64/libmkl_core.so (0x00007fe07bff7000)
[...]

Thus it's unclear why MKL complains that the symbol is missing when attempting to dlopen libmkl_vml_avx512.so

cc: @pengzhao-intel

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions