I have installed openmpi in C:\Program Files\OpenMPI_v1.5.4-win32\ and want to compile boost to produce graph-parallel library. But got the following error:
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
MPI auto-detection failed: unknown wrapper compiler C:/Program Files/OpenMPI_v1.
5.4-win32/bin/mpic++.exe
Please report this error to the Boost mailing list: http://www.boost.org
You will need to manually configure MPI support.
MPI launcher: mpirun -np
when I ran in a Visual Studio 2010 command prompt:
b2 --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=32 stage --debug-configuration
I added the MPI config in boost_1_48_0\tools\build\v2\user-config.jam as below:
using mpi : "C:/Program Files/OpenMPI_v1.5.4-win32/bin/mpic++.exe" ;
I believe this similar question has been asked before but got no answer:
How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010
I encountered the same problem and solved it with Microsoft MPI. I use boost 1.61.0 and Microsoft MPI v7.1 (available at https://www.microsoft.com/en-us/download/details.aspx?id=52981). Download and install the SDK and MsMpi Setup.
I made the same changes as William proposed to the mpi.jam file which is located in tools/build/src/tools.
I added the
command to the user-config.jam, which should be located in your user directory. Otherwise go to tools/build/src and move the user-config.jam file located there into your user directory. Adding
leads to multiple errors. First of all, whitespaces are not allowed in the .jam files and second, if i locate the file in a path without whitespaces, like
leads to the error report that the mpi.jam file is already in use by another process. Adding qotation marks to the path does not help either. But it worked with the
using mpi;
statement, without any additions.Make sure the MPI SDK Include, Lib and the MPI Bin directory are listed in your path environment variable.
The next step is to build boost.MPI. Open up a command prompt in the boost root directory and invoke bjam with your desired parameters and --with-mpi. Be careful to specify the variant=debug or variant=release flag, since you will get a nameclash error otherwise. (See here for details http://lists.boost.org/boost-build/2009/12/22854.php).
That's what solved it for me.
If you don't mind, you could use the MS MPI v6, downdload from here https://www.microsoft.com/en-us/download/details.aspx?id=47259
Then you need to make some adjustment to the mpi.jam file. For older version of boost, the mpi.jam is in folder tools/build/v2/tools/, and for new version of boost, it is in tools/build/src/tools/.
Around line 248, you need to make the following adjustment. Due to MS separate the API with the HPC.