How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010

若如初见. 提交于 2019-12-02 08:26:53

问题


I installed Open MPI 1.5.4 (64 bit) and I am trying to rebuild boost libraries (1.48) with bjam.

I changed user-config.jam file, by adding using mpi line with explicit compiler path (although mpic++ is already in PATH environment variable):

using mpi : "C:/Program Files (x86)/OpenMPI_v1.5.4-x64/bin/mpic++.exe" ;

Then I tried to run from command prompt the following command:

bjam toolset=msvc --build-type=complete --with-mpi --address-model=64 stage

Unfortunately, the build process still needs more hints. Part of the error reporting looks like:

MPI auto-detection failed: unknown wrapper compiler C:/Program Files (x86)/OpenMPI_v1.5.4-x64/bin/mpic++.exe

Did anybody managed to compile Boost MPI with Open MPI under Windows? Am I missing something?


回答1:


I've found the solution to this in an older blog:

What worked for me (tested only with OpenMPI):

  1. add the c:\OpenMPI_v1.6.2-win32\bin\ to the path variable
  2. inside BOOST_ROOT\tools\build\v2\user-config.jam: using msvc ; using mpi ;
  3. inside mpi.jam I've changed local cluster_pack_path_native = "C:\Program Files\Microsoft Compute Cluster Pack" ; to local cluster_pack_path_native = "c:\OpenMPI_v1.6.2-win32" ;
  4. run bjam --with-mpi



回答2:


Might be working for me... I used Microsoft MPI instead of OpenMPI.

  1. Install Microsoft MPI
  2. edit project-config.jam and add using mpi ;
  3. edit tools\build\v2\map.jam and find Microsoft Computer Cluster and change the path to C:\Program Files\Microsoft MPI
  4. rename the Inc folder in C:\Program Files\Microsoft MPI to Include
  5. run bjam --with-mpi

gives me link errors, but I'm posting what I got...



来源:https://stackoverflow.com/questions/9383357/how-to-build-boostmpi-library-with-open-mpi-on-windows-with-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!