Skip to content

Instantly share code, notes, and snippets.

@b10n1k
Created March 22, 2022 19:26
Show Gist options
  • Save b10n1k/cac9b6d51e75dfb452b61d7a9bec6b1b to your computer and use it in GitHub Desktop.
Save b10n1k/cac9b6d51e75dfb452b61d7a9bec6b1b to your computer and use it in GitHub Desktop.
/**
https://www.boost.org/doc/libs/1_78_0/doc/html/mpi/tutorial.html
**/
#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>
namespace mpi = boost::mpi;
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment