'how to have boost with cuda-aware openmpi

I need to install two packages, one depends on boost and the other depends on openmpi. The second package can be installed with cuda and cuda-aware openmpi. However I found the boost.mpi is not cuda-aware and if I install both software with different openmpi, they do conflict with each other. Can I install boost without boost.mpi?



Solution 1:[1]

I think that's the default

When Building From Source

E.g. on a fresh ubuntu container, doing

apt install -qy build-essential git cmake wget
wget https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2
tar xf boost_1_79_0.tar.bz2 
cd boost_1_79_0
./bootstrap.sh 
./b2

Prints

...
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
...

In fact (one of?) the only Boost libraries affected would be PBGL (graph_parallel):

...
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam.
note: to suppress this message, pass "--without-graph_parallel" to bjam.
...

When Using Distribution Packages

On the same Ubuntu box, distribution-wide the only packages that depend on boost-mpi are:

libboost-mpi1.71.0
Reverse Depends:
  libboost-mpi1.71-dev
  rheolef
  prime-phylo
  librheolef1
  libgyoto8
  gyoto-bin
  libboost-mpi-python1.71.0
  libboost-graph-parallel1.71.0

Summary

Just don't install Boost MPI. That probably means not installing-the-kitchen-sink with

apt install libboost-all-dev

or the equivalent on your distribution. E.g. selectively install

apt install libboost-{regex,system,chrono}1.71-dev

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sehe