Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/boostorg/mpi into develop
Browse files Browse the repository at this point in the history
* 'develop' of https://github.com/boostorg/mpi: (54 commits)
  We want to skip C++ binding in underlying implementation (othewise, Open MPI does not give a choice), it's too late to avoid building them.
  typo in doc
  put status code in status files
  put status code in status files
  Use new library naming conventions.
  add test for wait_all on null request
  Make definition consistent with comment. We do not want the c++ bidings with OpenMPI
  split travis jobs
  Avoid a few warnings
  Use the same serialization code for python2 and python3 thank to bytesobject.h. Thanks to @xnox for the idea.
  Revert "Use the same serialization code for python2 and python3 thank to bytesobject.h."
  Use the same serialization code for python2 and python3 thank to bytesobject.h. Thanks to @xnox for the idea.
  Although single argument print () works in python2, it is still prudent to do have from __future__ import print_function as the first line of code in every file. Thanks to @xnox for the suggestion
  factorize
  have pick API work in both python 2 and 3
  Use neutral var name for buffer
  remove spurious extract and ()s
  We assume python2 pickle API, wich used str as buffers. We need something compatible with python3, which uses bytes. Common base is object
  use python3 compatible print
  For some reason mpi module is now at top level, adapt the mpi python test to that
  ...
  • Loading branch information
robertramey committed Jun 25, 2020
2 parents 22e6e37 + ace8026 commit da60216
Show file tree
Hide file tree
Showing 57 changed files with 473 additions and 323 deletions.
157 changes: 148 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,37 @@ matrix:
include:
- os: linux
compiler: g++
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03
addons:
apt:
packages:
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: g++
env: TOOLSET=gcc COMPILER=g++ CXXSTD=11
addons:
apt:
packages:
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: g++-4.4
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98
addons:
apt:
packages:
- g++-4.4
- libopenmpi-dev
- openmpi-bin
sources:
- ubuntu-toolchain-r-test

- os: linux
compiler: g++-4.4
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=0x
addons:
apt:
packages:
Expand All @@ -45,9 +66,22 @@ matrix:
sources:
- ubuntu-toolchain-r-test


- os: linux
compiler: g++-4.6
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03
addons:
apt:
packages:
- g++-4.6
- libopenmpi-dev
- openmpi-bin
sources:
- ubuntu-toolchain-r-test

- os: linux
compiler: g++-4.6
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=0x
addons:
apt:
packages:
Expand All @@ -59,7 +93,19 @@ matrix:

- os: linux
compiler: g++-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=11,14
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=11
addons:
apt:
packages:
- g++-5
- libopenmpi-dev
- openmpi-bin
sources:
- ubuntu-toolchain-r-test

- os: linux
compiler: g++-5
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=14
addons:
apt:
packages:
Expand All @@ -71,7 +117,7 @@ matrix:

- os: linux
compiler: g++-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=11,14
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=11
addons:
apt:
packages:
Expand All @@ -81,9 +127,33 @@ matrix:
sources:
- ubuntu-toolchain-r-test

- os: linux
compiler: g++-6
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=14
addons:
apt:
packages:
- g++-6
- libopenmpi-dev
- openmpi-bin
sources:
- ubuntu-toolchain-r-test

- os: linux
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=14
addons:
apt:
packages:
- g++-7
- libopenmpi-dev
- openmpi-bin
sources:
- ubuntu-toolchain-r-test

- os: linux
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=14,17
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=17
addons:
apt:
packages:
Expand All @@ -95,7 +165,19 @@ matrix:

- os: linux
compiler: g++-8
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=14,17
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=14
addons:
apt:
packages:
- g++-8
- libopenmpi-dev
- openmpi-bin
sources:
- ubuntu-toolchain-r-test

- os: linux
compiler: g++-8
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=17
addons:
apt:
packages:
Expand All @@ -107,16 +189,73 @@ matrix:

- os: linux
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03
addons:
apt:
packages:
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11
addons:
apt:
packages:
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=14
addons:
apt:
packages:
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=1z
addons:
apt:
packages:
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: clang++-libc++
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03
addons:
apt:
packages:
- libc++-dev
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: clang++-libc++
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=11
addons:
apt:
packages:
- libc++-dev
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: clang++-libc++
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=14
addons:
apt:
packages:
- libc++-dev
- libopenmpi-dev
- openmpi-bin

- os: linux
compiler: clang++-libc++
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=1z
addons:
apt:
packages:
Expand Down
56 changes: 3 additions & 53 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -22,57 +22,6 @@ import regex ;
#


# Validate the version string and extract the major/minor part we care about.
#
local rule split-version ( version )
{
local major-minor = [ MATCH "^([0-9]+)\.([0-9]+)(.*)$" : $(version) : 1 2 3 ] ;
if ! $(major-minor[2]) || $(major-minor[3])
{
ECHO "Warning: \"using python\" expects a two part (major, minor) version number; got" $(version) instead ;

# Add a zero to account for the missing digit if necessary.
major-minor += 0 ;
}

return $(major-minor[1]) $(major-minor[2]) ;
}

# Define a version suffix for libraries depending on Python.
# For example, Boost.Python built for Python 2.7 uses the suffix "27"
rule version-suffix ( version )
{
local major-minor = [ split-version $(version) ] ;
local suffix = $(major-minor:J="") ;
return $(suffix) ;
}


# Python build id (for Python libraries only).
python-id = [ option.get "python-buildid" ] ;
if $(python-id)
{
PYTHON_ID = [ regex.replace $(python-id) "[*\\/:.\"\']" _ ] ;
}

rule python-tag ( name : type ? : property-set )
{
local result = $(name) ;
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
{
local version = [ $(property-set).get <python> ] ;
local lib-suffix = [ version-suffix $(version) ] ;
result = $(result)$(lib-suffix) ;
}
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB && $(PYTHON_ID)
{
result = $(result)-$(PYTHON_ID) ;
}

# forward to the boost tagging rule
return [ tag $(result) : $(type) : $(property-set) ] ;
}

mpi_python_libs = ;

if [ mpi.configured ]
Expand All @@ -97,15 +46,16 @@ lib boost_mpi
intercommunicator.cpp
mpi_datatype_cache.cpp
mpi_datatype_oarchive.cpp
offsets.cpp
packed_iarchive.cpp
packed_oarchive.cpp
packed_skeleton_iarchive.cpp
packed_skeleton_oarchive.cpp
point_to_point.cpp
request.cpp
status.cpp
text_skeleton_oarchive.cpp
timer.cpp
offsets.cpp
: # Requirements
<library>../../serialization/build//boost_serialization
<library>/mpi//mpi [ mpi.extra-requirements ]
Expand Down Expand Up @@ -134,7 +84,7 @@ lib boost_mpi
<define>BOOST_MPI_PYTHON_SOURCE=1
<python-debugging>on:<define>BOOST_DEBUG_PYTHON
-<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
<tag>@$(__name__).python-tag
<tag>@python-tag
<conditional>@python.require-py
<local-visibility>global

Expand Down
10 changes: 8 additions & 2 deletions doc/c_mapping.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ of the standard C MPI to their Boost.MPI equivalents. It will be most
useful for users that are already familiar with the C or Fortran
interfaces to MPI, or for porting existing parallel programs to Boost.MPI.

Note that this is not a perfect one to one mapping, the Boost.MPI will sometime
use function from the C API in a way that is transparent for the end user.
For example, [@http://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node50.html#Node50
`MPI_Probe and friends`] can be used to implement asynchronous send/recv.

[table Point-to-point communication
[[C Function/Constant] [Boost.MPI Equivalent]]

Expand Down Expand Up @@ -85,7 +90,8 @@ interfaces to MPI, or for porting existing parallel programs to Boost.MPI.
`communicator::send`]]]

[[[@http://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node52.html#Node52
`MPI_Sendrecv`]] [unsupported]]
`MPI_Sendrecv`]] [[memberref boost::mpi::communicator::sendrecv
`communicator::sendrecv`]]]

[[[@http://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node52.html#Node52
`MPI_Sendrecv_replace`]] [unsupported]]
Expand Down Expand Up @@ -516,7 +522,7 @@ algorithms.
`MPI_Graph_neighbors`]] [[funcref boost::mpi::out_edges
`out_edges`], [funcref boost::mpi::adjacent_vertices `adjacent_vertices`]]]
[[[@http://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node137.html#Node137
`MPI_Cart_shift`]] [unsupported]]
`MPI_Cart_shift`]] [[memberref boost::mpi::cartesian_communicator::shifted_ranks `cartesian_communicator::shifted_ranks` ]]]
[[[@http://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node138.html#Node138
`MPI_Cart_sub`]] [[classref boost::mpi::cartesian_communicator `cartesian_communicator`]
constructor]]
Expand Down
10 changes: 5 additions & 5 deletions doc/getting_started.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ using mpi : /opt/mpi/bullxmpi/1.2.8.3/bin/mpicc ;
]

[warning
Boost.MPI only uses the C interface, so specifying the C wrapper should be enough. But some implementations will insist on using the C++ bindings.
Boost.MPI only uses the C interface, so specifying the C wrapper should be enough. But some implementations will insist on importing the C++ bindings.
]

* [*Your wrapper is really eccentric or does not exist]

You will need to provide the compilation and link options through de second parameter using 'jam' directives.
The following type configuration used to be required for some specific Intel MPI implementation:
With some implementations, or with some specific integration[footnote Some HPC cluster will insist that the users uss theirs own in house interface to the MPI system.] you will need to provide the compilation and link options through de second parameter using 'jam' directives.
The following type configuration used to be required for some specific Intel MPI implementation (in such a case, the name of the wrapper can be left blank):

[pre
using mpi : mpiicc :
Expand Down Expand Up @@ -236,13 +236,13 @@ normally would for MPI programs, but remember to link against the

[pre
mpic++ -I/path/to/boost/mpi my_application.cpp -Llibdir \
-lboost_mpi-gcc-mt-1_35 -lboost_serialization-gcc-d-1_35.a
-lboost_mpi -lboost_serialization
]

If you plan to use the [link mpi.python Python bindings] for
Boost.MPI in conjunction with the C++ Boost.MPI, you will also need to
link against the boost_mpi_python library, e.g., by adding
`-lboost_mpi_python-gcc-mt-1_35` to your link command. This step will
`-lboost_mpi_python-gcc` to your link command. This step will
only be necessary if you intend to [link mpi.python.user_data
register C++ types] or use the [link
mpi.python.skeleton_content skeleton/content mechanism] from
Expand Down

0 comments on commit da60216

Please sign in to comment.