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
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.
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.
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/"