How to build boost::mpi library with Open MPI on W

2020-04-23 06:45发布

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?

2条回答
神经病院院长
2楼-- · 2020-04-23 07:28

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
查看更多
\"骚年 ilove
3楼-- · 2020-04-23 07:37

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...

查看更多
登录 后发表回答