安装OpenMp Mac Os X 10.10

时间:2015-06-05 15:49:49

标签: macos openmp

我使用brew install clang-omp

安装了OpenMp

关于设置path variables

export PATH=/install/prefix/bin:$PATH
export C_INCLUDE_PATH=/install/prefix/include:<OpenMP include path>:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/install/prefix/include:<OpenMP include path>:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=/install/prefix/lib:<OpenMP library path>:$LIBRARY_PATH
export LD_LIBRARY_PATH=/install/prefix/lib:<OpenMP library path>:$LD_LIBRARY_PATH

如何找出<OpenMp include path>

的内容

1 个答案:

答案 0 :(得分:0)

如果您使用Homebrew安装clang-omp,则在安装clang-omp后无需修改$ PATH。只需在#include <omp.h>中加入标题,然后使用g++4.9 -fopenmp进行编译即可。这在Mac OSX 10.9上至少适用于我。

因此你正在使用10.10,如果你真的必须将你的安装广告用你的$ PATH使用brew list clang-omp作为@ mark-setchell已经提到找到你的安装目录。您还可以使用-I /usr/local/Cellar/clang-omp标志将所需的头文件传递给g ++编译器,或者使用-L /usr/local/lib/somelib的库传递所需的头文件。