5#ifndef PARALLELUTILITIES_H
6#define PARALLELUTILITIES_H
10#include <termcolor/termcolor.hpp>
14#include <boost/archive/binary_iarchive.hpp>
15#include <boost/archive/binary_oarchive.hpp>
19class ParallelUtilities {
22 static std::ostream& get_random_color(std::ostream& stream,
int rank);
28 static void print_message(
int rank,
const std::string& message,
bool log);
30 static void execute_relap();
31 static void parallel_restartforanewsequence_();
40 static void send_object(
const T& obj,
int dest_rank,
int tag, MPI_Comm comm);
49 static void receive_object(T& obj,
int src_rank,
int tag, MPI_Comm comm);
58 static std::string serialize_object(
const T& obj);
63 static void send_bytes(
const std::string& bytes,
int dest_rank,
int tag, MPI_Comm comm);
Shared declarations for MPI parallel execution: message tags, utilities, Fortran callbacks.
bool log
Enable/disable rank-specific logging.
int rank
MPI rank of this process.