Skip to content

Cannot seek mkl-dynamic-*-iomp when Intel-MKL is not located in /opt/intel #111

@Ionizing

Description

@Ionizing

Hi, I just found intel-mkl-tool may not work well with libiomp5.so when Intel MKL suite is not installed to /opt/intel.

If I didn't misunderstand the code, the function seek_directory just finds the paths of MKL libraries with given root_dir. When Intel MKL suite is installed to /opt/intel, seek_directory just can find the correct path of libiomp5.so since Library::new() already includes /opt/intel, and everything works well. However, libiomp5.so doesn't lie in MKLROOT, but in oneapi/compiler/${version}/${platform}/compiler/lib, leading to the failure.

There might be two possible solution:

  • I found intel-mkl-tool used pkg-config to find alternative of MKLROOT, but it may be easier to parse the output of pkg-config --libs mkl-dynamic-lp64-iomp, since the corresponding .pc files are provided by Intel and can work as expected in most environments;
  • For the case that pkg-config is not found, just add an additional root_dir=$MKLROOT/../../ and use seek_directory to find the right path. There may be some issues when multiple versions of oneAPI is installed to one root_dir, but this can be resolved by using the same version of MKL and compiler. It seems you've implemented Library::version function but not used it, so here comes the role of it.

I can make an PR to fix this but it would be better to fix it by the author since my coding style may not match this repo very well....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions