如何在MinGW上使用MPICH2编译Boost

时间:2013-03-13 11:37:05

标签: c++ boost mingw mpi mpich

我尝试使用最新版本的MPICH2编译Boost.MPI,遗憾的是这个版本在mpicxx.h中有一个错误。所以我使用了这些命令行:

  • b2 toolset = gcc --j4 --layout = system release --prefix = C:\ librairies \ boost-1.53​​.0 --user-config = user-config.jam cxxflags = - DMPICH_SKIP_MPICXX install < / p>

  • b2 toolset = gcc --j4 --layout = system release --prefix = C:\ librairies \ boost-1.53​​.0 --user-config = user-config.jam define = MPICH_SKIP_MPICXX install

我的user-config.jam看起来像:

import toolset : using ;
using python : 2.7 : "C:/Python273" : "C:/Python273/include" :
"C:/Python273/libs" ;

using mpi : :
<find-static-library>mpi
<library-path>"C:/librairies/MPICH2-3.0.2/lib"
<include>"C:/librairies/MPICH2-3.0.2/include"
:
"\"C:\\librairies\\MPICH2-3.0.2\\bin\\mpiexec\""
;

几分钟后编译失败并出现此错误:

  

gcc.link.dll bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libmpi.dll.a   bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ skeleton_and_content.o:noble_and_content.cpp :(。text + 0x718):未定义引用` imp < / EM> __ ZN5boost3mpi6python6detail24skeleton_proxy_base_typeE”   collect2.exe:错误:ld返回1退出状态

     

“g ++” - L“C:\ Python273 \ libs”-L“C:\ librairies \ MPICH2-3.0.2 \ lib”-Wl,-R -Wl,“C:\ Python273 \ libs”“ - Wl, - out-implib,bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libmpi.dll.a“-o”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ mpi.pyd“-shared -Wl, - start-group”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ collectives.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ py_communicator.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ datatypes.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ documentation .o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ py_environment.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7 .2 \ release \ threading-multi \ python \ py_nonblocking.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ py_exception.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ module.o“”bin.v2!   libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ py_request.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ skeleton_and_content.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ python \ status.o“”bin.v2 \ libs \ mpi \ build \ gcc -mingw-4.7.2 \ release \ threading-multi \ python \ py_timer.o“”bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libboost_mpi_python.dll.a“ “bin.v2 \ libs \ python \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libboost_python.dll.a”“bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libboost_mpi.dll.a“”bin.v2 \ libs \ serialization \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libboost_serialization.dll.a“-Wl,-Bstatic -lmpi -Wl,-Bdynamic -lpython27 -Wl, - end-group -mthreads

     

...失败gcc.link.dll bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libmpi.dll.a bin.v2 \ libs \ mpi \ build \ GCC-MinGW的-4.7.2 \发布\线程,多\ mpi.pyd ...   ...删除bin.v2 \ libs \ mpi \ build \ gcc-mingw-4.7.2 \ release \ threading-multi \ libmpi.dll.a   ...由于缺少mpi.pyd而跳过了mpi.pyd ...   ...因缺少libmpi.dll.a而跳过了libmpi.dll.a ...

有人知道为什么我有这个错误?或者是可以使用MinGW编译Boost.MPI?如果是,步骤是什么?

提前致谢。

0 个答案:

没有答案