uncomplicate / neanderthal-native

Eclipse Public License 1.0
10 stars 6 forks source link

MKLROOT in linker #3

Open burbma opened 3 years ago

burbma commented 3 years ago

In trying to contribute and find a root cause to my issue in https://github.com/uncomplicate/neanderthal/issues/102#issuecomment-790225441 I'm wondering how neanderthal-mkl is built. I'm interested in particular in this line: https://github.com/uncomplicate/neanderthal-native/blob/a681ad3dba7207b9ea194e96dcdfb6cd87cc472b/neanderthal-mkl/pom.xml#L129

How is MKLROOT set? Is it something you pass in at build time? I'm assuming you run builds for Linux/Mac/Windows separately and so they may each have a different MKLROOT? I'm wondering if in the Mac case it is set to /opt/intel/compilers_and_libraries_2018.3.185/mac/mkl. This is where the neanderthal-mkl.jnilib on my machine appears to be looking for dylibs. The libs would only be there if I had a system install of mkl of that particular 2018 version, but since I'm trying to use only the bytedeco dependency the dylibs are not in /opt/intel/....

blueberry commented 3 years ago

MKLROOT is an environment variable that the one building the library that uses MKL sets per Intel's documentation. It does (or, better said, should not) affect the users of the program once it's been built. I don't have that machine at hand at this moment, but I am pretty sure that the path "...2018..." was used there. Obviously there is a connection, although there shouldn't be one...

Thank you for investigating this. You can find the wizard for building that option set here, so you might discover a better way to build this: https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl/link-line-advisor.html