Parallel processing 打开MPI编译错误

Parallel processing 打开MPI编译错误,parallel-processing,mpi,openmpi,Parallel Processing,Mpi,Openmpi,我试图在安装了Xcode 4.1的Macbook Pro(OS X Lion)上从源代码编译OpenMPI(1.5.4版)。我使用以下选项配置openmpi ../configure CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64 --with-wrapper-cflags=-m64 --with-wrapper-cxxflags=-m64 在新的/干净的目录中。当我尝试make时,它会给我以下错误 Making all in ot

我试图在安装了Xcode 4.1的Macbook Pro(OS X Lion)上从源代码编译OpenMPI(1.5.4版)。我使用以下选项配置openmpi

../configure CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64 --with-wrapper-cflags=-m64 --with-wrapper-cxxflags=-m64
在新的/干净的目录中。当我尝试
make
时,它会给我以下错误

    Making all in otfprofile
  CXX    otfprofile-otfprofile.o
  CXX    otfprofile-CSVParse.o
  CXX    otfprofile-DataStructure.o
  CXX    otfprofile-Handler.o
  CXX    otfprofile-Prodtex.o
  CXX    otfprofile-Summary.o
  CXXLD  otfprofile
Undefined symbols for architecture x86_64:
  "___builtin_expect", referenced from:
      _main.omp_fn.0 in otfprofile-otfprofile.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[9]: *** [otfprofile] Error 1
make[8]: *** [all-recursive] Error 1
make[7]: *** [all-recursive] Error 1
make[6]: *** [all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
我有
gcc版本4.2.1(基于苹果公司5658版)(LLVM版本2335.15.00)
,gfortran
GNU Fortran(gcc)4.2.1(苹果公司5666版)(dot 3)

我听说我可以使用MacPorts进行简单的安装,但我想自己从源代码处编译它。有人能建议我是否需要设置一些额外的标志,或者是什么导致了这个错误吗?如果你需要进一步的信息,请告诉我。谢谢。

\uuuu内置\uu expect
是一个gcc扩展。我猜苹果的clang/LLVM行动并不支持这一点,但认为它仍然是gcc


OpenMPI中有一个宏是有条件设置的,但这里很可能不正确。由于
\u builtin\u expect
只是对分支预测的一个优化提示,您可能可以通过强制宏
OMPI\u CXX\u在构建过程中未定义builtin\u expect
来修复构建。

亲爱的awoodland,感谢您的回复。如果我必须在“prefetch.h”或其他地方这样做,你能告诉我吗?@UCU110我想我会在
之前把
\undef OMPI\u CXX\u BUILTIN\u EXPECT
放在线路上,如果OMPI\u CXX\u BUILTIN\u EXPECT
放在prefetch.h中,但我对OpenMPI的内部不太熟悉。亲爱的Awdland,非常感谢您的时间,但它不起作用。这肯定是您想要解决它的事情-您不会因为摆脱
\u builtin\u expect
的所有用法而失去任何重要的东西。亲爱的awoodland,“配置”中的“--disable vt”已经完成了这项工作。