← Back to team overview

yade-dev team mailing list archive

boost::mpi and python bindings for it.


Hi Bruno,

There is a boost::mpi library built on top of OpenMPI, MPICH2, IntelMPI [0].
In the introduction [1] they say it's just a wrapper for OpenMPI,
MPICH2 and IntelMPI. By using boost you could have some extra safety.

Example [2]:

int main(int argc, char* argv[])
  mpi::environment env(argc, argv);
  mpi::communicator world;
  std::cout << "I am process " << world.rank() << " of " << world.size()
            << "." << std::endl;
  return 0;

Python example [3]:

  import boost.mpi as mpi
  print "I am process %d of %d." % (mpi.rank, mpi.size)

Have a look :)

[0] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi.html
[1] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi/getting_started.html
[2] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi/tutorial.html
[3] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi/python.html

Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
http://pg.edu.pl/jkozicki (click English flag on top right)

Follow ups