Function rng_set_seed_mpi (o2scl)

O2scl : Function List

template<class fp_t = double>
void o2scl::rng_set_seed_mpi(rng<fp_t> &r, int verbose = 0)

MPI version of rng_set_seed()

This function is a MPI wrapper around rng_set_seed().

Note

This function requires that -DO2SCL_MPI is defined and that MPI_Init() has been called previously. It is defined as a template, but currently double is the only floating point type supported.

Note

This function currently uses the number 1000001 as a number to separate MPI ranks, an algorithm which can be foiled if one selects more than 1000000 random numbers for each MPI rank. In practice this should be rare, as seed selection should happen more rarely.