- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am trying to compile and run an OpenMP code (that worked under Linux) from the command line from Mac without success so far:
to compile I enter (F77):
" ifort -o 'executable' 'sourcecode.f' -openmp "
export OMP variable (for example):
" export OMP_NUM_THREADS=2 "
and to run the code:
" ./'executable' "
This gives me the following error message:
"
"
What am I doing wrong?
Does the path for the omp libraries have to be included in the .bashrc? This is the line in my .bashrc so far:/opt/intel/Compiler/11.1/080/bin/ifortvars.sh intel64.
How does the procedure look like, if F90 is used?
Thank you!
Andreas
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error was caused by missing ifort environment variables. The correct line is:
source /opt/intel/Compiler/11.1/080/bin/ifortvars.sh intel64
If you want to set it up in your login shell the line needs to be put into ".bash_login" or ".bash_profile" instead of ".bashrc".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found two simple solutions for this drawback:
Solution 1 : using install_name_tool fort for libiomp5.dylib in your executable file only (if you recompile you'll need to do this again...)
install_name_tool -change libiomp5.dylib /opt/intel/composer_xe_2013_sp1.2.139/compiler/lib/libiomp5.dylib /executable_file
solution 2 : it's a similar solution provided by xiaoping-duan (valid until reboot only) if you don't use any other fortran compile on mac as I, put it .bash_profile. Take care only .bash_profile to run on MAC OS x is a little bit weird! Please check the following link http://apple.stackexchange.com/questions/107441/os-x-mavericks-bash-profile-paths-dont-work
source /opt/intel/composer_xe_2013_sp1.2.139/bin/ifortvars.sh intel64
and now it`s working fine...
Best wishes,
ileao

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page