Opened 11 years ago
Last modified 9 years ago
#5864 new Bugs
unable to compile boost::mpi under Windows using msvc-2008-compiller
Reported by: | Owned by: | Douglas Gregor | |
---|---|---|---|
Milestone: | To Be Determined | Component: | mpi |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: |
Description
My steps to reproduce:
- Setup environment for msvc-2008 compiler using bat-file for Visual Studio 2008 command line environment.
- Compile library openmpi-1.4.3 using cmake (as specified in its documentation) and install it to "d:\Libs\mpi-1.4.3\Release".
- Add path to "d:\Libs\mpi-1.4.3\Release\bin" to my PATH environment.
- Check, that mpic++ works good:
> mpic++ --showme cl.exe /I"d:/Libs/mpi-1.4.3/Release/include" /TP /EHsc /D "OMPI_IMPORTS" /D "OPAL_IMPORTS" /D "ORTE_IMPORTS" /link /LIBPATH:"d:/Libs/mpi-1.4.3/Release/lib" libmpi.lib libopen-pal.lib libopenrte.lib libmpi_cxx.lib libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib
- Add string 'using mpi ;' to my <boost_dir>\tools\build\v2\user-config.jam file.
- Try to compile boost::mpi:
> bjam.exe --prefix=d:\Programming\mpi-work\boost-mpi\installed --build-dir=d:\Programming\mpi-work\boost-mpi\bld --with-mpi install
As a result I got the error:
Системе не удается найти указанный путь. Системе не удается найти указанный путь. Системе не удается найти указанный путь. Системе не удается найти указанный путь. MPI auto-detection failed: unknown wrapper compiler mpic++ Please report this error to the Boost mailing list: http://www.boost.org You will need to manually configure MPI support.
('Системе не удается найти указанный путь.' - means 'System can't find specified path')
The same result I got using b2.exe instead of bjam.exe.
I tried to read the documentation to setup exact paths to openmpi for mpi module in the user-config.jam. But I couldn't understand, where should I put include- and library-paths in it.
My environment - Windows XP SP2 x32, Visual Studio 2008 with compiler version 15.00.21022.08. I have attached partial command line environment as file to the bug report.
Attachments (4)
Change History (7)
by , 11 years ago
comment:1 by , 9 years ago
After digging into mpi.jam I found what is the root of the problem.
# Determine if it is safe to execute the given shell command by trying # to execute it and determining whether the exit code is zero or # not. Returns true for an exit code of zero, false otherwise. local rule safe-shell-command ( cmdline ) { local result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ; return [ MATCH ".*(SSCOK).*" : $(result) ] ; }
It silently always return false on windows, because this is not correct cmd.exe command. I have attached patch that made windows specific workaround.
comment:2 by , 9 years ago
Please use mpi-windows-build2.patch I have accidentally attached incorrect one.
comment:3 by , 9 years ago
msvc.link.dll bin.v2\libs\mpi\build\msvc-10.0\debug\threading-multi\boost_mpi-vc 100-mt-gd-1_53.dll Microsoft (R) Incremental Linker Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'
Partial console environment