- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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".
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
