Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Error building application with mkl

Banu__Alexandru
Beginner
1,378 Views

I am having issues with build an application. When running make, it runs successfully until linking the executable. There I encounter the following error: "ld: library not found for -liomp5". I tried building the examples in mkl library and there were no problems. The MKLROOT has been set to the intel's default install location. Any idea how could I solve this issue?

I am using MacOS 10.13.6.

0 Kudos
6 Replies
Gennady_F_Intel
Moderator
1,378 Views

libiomp5 is compiler's run time libs, therefore to link with this RTL you need to set systems path to this lib. The easiest way to do that to source compilervars.sh intel64 command.

0 Kudos
Banu__Alexandru
Beginner
1,378 Views

Gennady F. (Intel) wrote:

libiomp5 is compiler's run time libs, therefore to link with this RTL you need to set systems path to this lib. The easiest way to do that to source compilervars.sh intel64 command.

 

Okay, so I ran "source compilervars.sh intel64" in the /opt/intel/compilers_and_libraries_2019.2.184/mac/bin directory and I also tried the same thing for "/mac/mkl/bin" mklvars.sh, but I'm still getting the same error. Any ideas why

0 Kudos
Gennady_F_Intel
Moderator
1,378 Views

Then you need to check the installation and your system paths. 

e.x : ls /opt/intel/compilers_and_libraries_2019.2.187/linux/bin/intel64/ | grep libiomp5
 

0 Kudos
Banu__Alexandru
Beginner
1,378 Views

Okay, so I ran "ls /opt/intel/compilers_and_libraries_2019.2.184/mac/bin/ | grep libiomp5", but no result has been shown. Is there any chance that it wouldn't install if there was no result shown?

0 Kudos
Gennady_F_Intel
Moderator
1,378 Views

actually here is the first time we hear about such problem. Yes, you certainly You may try to reinstall this package ( reinstall or update).

0 Kudos
Banu__Alexandru
Beginner
1,378 Views

Okay, so I reinstalled the MKL package and I found some issues. When trying to set up the env variables using the mklvars.sh, when running "printenv" none of those are showing up (INCLUDE, MKLROOT, etc.). Any ideas why? Also, is there a difference between the /opt/intel/mkl path and the /opt/intel/compilers_and_libraries_2019.2.184/mac/mkl ? Do they both point to the mkl root or there is a difference between these two?

And again, when trying to build the application it fails for -liomp5. I used finder to search for "libiomp5" and this is the only perfect match result that I got: /opt/intel/compilers_and_libraries_2019.2.184/mac/compiler/lib/libiomp5.dylib . Hope it helps with something. Am I doing something wrong? I mean, surely I am, but I can't figure out what.

0 Kudos
Reply