Home:ALL Converter>Error in building boost MPI in msvc 2010

Error in building boost MPI in msvc 2010

Ask Time:2012-02-24T23:28:19         Author:Gary

Json Formatter

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

Author:Gary,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/9433311/error-in-building-boost-mpi-in-msvc-2010
William :

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\n\nThen 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/. \n\nAround line 248, you need to make the following adjustment. Due to MS separate the API with the HPC. \n\nlocal win_ms_mpi_sdk = \"C:\\\\Program Files (x86)\\\\Microsoft SDKs\\\\MPI\" ;\nlocal win_ms_mpi = \"C:\\\\Program Files\\\\Microsoft MPI\" ;\n\n#local cluster_pack_path_native = \"C:\\\\Program Files\\\\Microsoft Compute Cluster Pack\" ;\n#local cluster_pack_path = [ path.make $(cluster_pack_path_native) ] ;\nif [ GLOB $(win_ms_mpi_sdk)\\\\Include : mpi.h ]\n{\n if $(.debug-configuration)\n {\n ECHO \"Found Microsoft Compute Cluster Pack: $(cluster_pack_path_native)\" ;\n }\n\n # Pick up either the 32-bit or 64-bit library, depending on which address\n # model the user has selected. Default to 32-bit.\n options = <include>$(win_ms_mpi_sdk)/Include \n <address-model>64:<library-path>$(win_ms_mpi_sdk)/Lib/x64\n <library-path>$(win_ms_mpi_sdk)/Lib/x86\n <find-static-library>msmpi\n <toolset>msvc:<define>_SECURE_SCL=0\n ;\n\n # Setup the \"mpirun\" equivalent (mpiexec)\n .mpirun = \"\\\"$(win_ms_mpi)\\\\Bin\\\\mpiexec.exe\"\\\" ;\n .mpirun_flags = -n ;\n}\n",
2015-09-17T16:25:16
yy