自从某次更新后Openmp不能使用,直到最近刚刚在讨论组求助高人得以解决,掰掰指头大概都有两年了吧,我的可怕的拖延症之严重程度可见一斑了,废话不多说,献上牛人的三步走解决方法。
(一)
$ ./configure --prefix=~/rsf API=c++,fortran,python CPPPATH=/usr/local/include LIBPATH=/usr/local/lib CC=gcc-4.9 PPMPATH=/usr/local/include/netpbm CFLAGS="-O2 -flax-vector-conversions ‘-D__has_extension(x)=0‘ -D__VFORCE_H" CXX=‘g++-4.9‘ CXXFLAGS="-O2 -flax-vector-conversions ‘-D__has_extension(x)=0‘ -D__VFORCE_H"
(二)
$ sudo vim /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/dispatch/object.h
commented out this line:
/*typedef void (^dispatch_block_t)(void);*/
And then I added this below it:
typedef void* dispatch_block_t;
(三)
Modified the following files in /usr/local/Cellar/open-mpi/1.8.4/share/openmpi :
mpic++-wrapper-data.txt
mpicc-wrapper-data.txt
mpicxx-wrapper-data.txt
Make sure that compiler= points directly to gcc-5/g++-5, not just gcc.
Well done!
感谢大牛 Vladimir Bashkardin!