Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26755 Discussions

Problem running openmp with ifort - dyld: Library not loaded: @rpath/libiomp5.dylib

sergio_o_
Beginner
276 Views

 

Hi, my name is Sergio Ocampo, I'm currently migrating my fortran code from gfortran to ifort. My code uses openmp and I'm getting  the following error when I try to run it:    

  ifort -qopenmp -I./Compiled_Files GKK_Main.f90  -o ./Compiled_Files/GKK_Main.a

  ./Compiled_Files/GKK_Main.a

  dyld: Library not loaded: @rpath/libiomp5.dylib

  Referenced from: /Users/sergioocampo/Documents/GKKC_Code/./Compiled_Files/GKK_Main.a

  Reason: image not found


I have checked other forums for answers but I do not understand the steps they recommend taking. It seems that I need to tell the compiler where the omp library is located. But I don't know how to do it. 

Thanks for your help.

Sergio

 

0 Kudos
3 Replies
mecej4
Black Belt
276 Views

See if the following article provides a solution to your issue: https://software.intel.com/en-us/articles/dyld-library-not-loadedlibiomp5dylib .

Kevin_D_Intel
Employee
276 Views

The cause could just be that DYLD_LIBRARY_PATH is not set You may not have source'd the /opt/intel/bin/compilervars.sh script?

Use this command:  source /opt/intel/bin/compilervars.sh intel64

and then try running the executable again.

 

Doerner__Edgardo
Beginner
276 Views

as stated above the DYLD_LIBRARY_PATH is not set. In my system I place the following statement on .bash_profile file:

# Load Intel OpenMP library
    export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/opt/intel/compilers_and_libraries_2017.1.126/mac/compiler/lib/"

 

Reply