32 #ifndef VSMC_MPI_MPI_MANAGER_HPP
33 #define VSMC_MPI_MPI_MANAGER_HPP
37 #include <boost/mpi.hpp>
43 template <
typename ResultType,
typename IntType1,
typename IntType2>
47 static_cast<Seed::skip_type>(D), static_cast<Seed::skip_type>(R));
50 template <
typename T, std::
size_t K,
typename IntType1,
typename IntType2>
66 #ifdef BOOST_MPI_HAS_NOARG_INITIALIZATION
68 env_(abort_on_exception) {init_seed();}
72 env_(argc, argv, abort_on_exception) {init_seed();}
76 ::boost::mpi::environment env_;
78 void init_seed ()
const
80 ::boost::mpi::communicator world;
93 template <
typename ID>
105 const MPI_Comm &
get ()
const {
return comm_;}
107 void set (
const MPI_Comm &comm) {comm_ = comm;}
114 MPICommunicator (
const MPICommunicator<ID> &);
115 MPICommunicator<ID> &operator= (
const MPICommunicator<ID> &);
120 #endif // VSMC_MPI_MPI_MANAGER_HPP
static SeedGenerator< ID, ResultType > & instance()
static MPICommunicator< ID > & instance()
MPIEnvironment(int &argc, char **&argv, bool abort_on_exception=true)
void set(const MPI_Comm &comm)
void mpi_init_seed(ResultType &, IntType1 D, IntType2 R)