Ticket #5602 (new Bugs)

Opened 4 years ago

Last modified 4 years ago

MPI-autodetection on Windows does not work with openmpi

Reported by: finjulhich@… Owned by: doug_gregor
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.46.1 Severity: Problem
Keywords: Cc:


The mpi.jam file has no if test for the openmpi implementation.

openmpi supports the mpic++ wrapper compiler and all the options to print the flags and library paths where the libraries to link against are.

I have tried but failed to change the mpi.jam script to recognize the openmpi installation.

A proper fix is welcome but indications on how to tweak the .jam file are appreciated,


Change History

comment:1 Changed 4 years ago by anonymous

I think I've managed to get it working again.

Here's an addition to the 'safe-shell-command' rule.

local rule safe-shell-command ( cmdline ) {

if [ os.on-windows ] {

local result = [ SHELL "$(cmdline) >nul 2>nul && if %errorlevel% equ 0 echo SSCOK" ] ; return [ MATCH ".*(SSCOK).*" : $(result) ] ;

} else # unix {

local result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ; return [ MATCH ".*(SSCOK).*" : $(result) ] ;



this seems to do it,

It'd be nice to get this reviewed by a a windows cmd.exe/bjam more serious user,



Add a comment

Modify Ticket

Change Properties
<Author field>
as new

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.