Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Banu__Alexandru
Beginner
227 Views

Error building application with mkl

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
227 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.

Banu__Alexandru
Beginner
227 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

Gennady_F_Intel
Moderator
227 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
 

Banu__Alexandru
Beginner
227 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?

Gennady_F_Intel
Moderator
227 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).

Banu__Alexandru
Beginner
227 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.

Reply