Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
utility::SimulateMPI Class Reference

singleton class storing simulated MPI state More...

#include <SimulateMPI.hh>

Static Public Member Functions

static bool simulate_mpi ()
 
static void initialize_simulation (int nprocs)
 
static void set_mpi_rank (int value)
 
static int mpi_rank ()
 
static int mpi_nprocs ()
 
static int receive_integer_from_anyone ()
 
static std::string receive_string_from_node (int source)
 
static void send_string_to_node (int destination, std::string const &message)
 
static char receive_char_from_node (int source)
 
static void send_char_to_node (int destination, char message)
 
static int receive_integer_from_node (int source)
 
static void send_integer_to_node (int destination, int message)
 
static platform::Size receive_size_from_node (int source)
 
static void send_size_to_node (int destination, platform::Size message)
 
static vector1< intreceive_integers_from_node (int source)
 
static void send_integers_to_node (int destination, vector1< int > const &message)
 
static vector1< platform::Sizereceive_sizes_from_node (int source)
 
static void send_sizes_to_node (int destination, vector1< platform::Size > const &message)
 
static double receive_double_from_node (int source)
 
static void send_double_to_node (int destination, double message)
 
static vector1< doublereceive_doubles_from_node (int source)
 
static void send_doubles_to_node (int destination, vector1< double > const &message)
 
static bool incoming_message_queue_is_empty ()
 
static bool outgoing_message_queue_is_empty ()
 
static platform::Size index_of_next_message ()
 Ask for the global index of when the next message to be processed by a node was sent by another node; useful if you want to ask "was message A sent before or after message B?". More...
 
static void print_unprocessed_incoming_messages (std::ostream &)
 
static void print_unprocessed_outgoing_messages (std::ostream &)
 

Private Member Functions

 SimulateMPI ()
 
 SimulateMPI (SimulateMPI const &src)
 

Static Private Attributes

static SimulateMPIDatasimulation_
 
static int rank_
 

Detailed Description

singleton class storing simulated MPI state

Constructor & Destructor Documentation

utility::SimulateMPI::SimulateMPI ( )
private
utility::SimulateMPI::SimulateMPI ( SimulateMPI const &  src)
private

Member Function Documentation

bool utility::SimulateMPI::incoming_message_queue_is_empty ( )
static
platform::Size utility::SimulateMPI::index_of_next_message ( )
static

Ask for the global index of when the next message to be processed by a node was sent by another node; useful if you want to ask "was message A sent before or after message B?".

References debug_assert, rank_, utility::SimulateMPIData::retrieve_next_message(), and simulation_.

void utility::SimulateMPI::initialize_simulation ( int  nprocs)
static

References rank_, and simulation_.

int utility::SimulateMPI::mpi_nprocs ( )
static
int utility::SimulateMPI::mpi_rank ( )
static

References debug_assert, rank_, and simulation_.

Referenced by utility::mpi_rank().

bool utility::SimulateMPI::outgoing_message_queue_is_empty ( )
static
void utility::SimulateMPI::print_unprocessed_incoming_messages ( std::ostream &  os)
static
void utility::SimulateMPI::print_unprocessed_outgoing_messages ( std::ostream &  os)
static
char utility::SimulateMPI::receive_char_from_node ( int  source)
static
double utility::SimulateMPI::receive_double_from_node ( int  source)
static
vector1< double > utility::SimulateMPI::receive_doubles_from_node ( int  source)
static
int utility::SimulateMPI::receive_integer_from_anyone ( )
static
int utility::SimulateMPI::receive_integer_from_node ( int  source)
static
vector1< int > utility::SimulateMPI::receive_integers_from_node ( int  source)
static
platform::Size utility::SimulateMPI::receive_size_from_node ( int  source)
static
vector1< platform::Size > utility::SimulateMPI::receive_sizes_from_node ( int  source)
static
std::string utility::SimulateMPI::receive_string_from_node ( int  source)
static
void utility::SimulateMPI::send_char_to_node ( int  destination,
char  message 
)
static
void utility::SimulateMPI::send_double_to_node ( int  destination,
double  message 
)
static
void utility::SimulateMPI::send_doubles_to_node ( int  destination,
vector1< double > const &  message 
)
static
void utility::SimulateMPI::send_integer_to_node ( int  destination,
int  message 
)
static
void utility::SimulateMPI::send_integers_to_node ( int  destination,
vector1< int > const &  message 
)
static
void utility::SimulateMPI::send_size_to_node ( int  destination,
platform::Size  message 
)
static
void utility::SimulateMPI::send_sizes_to_node ( int  destination,
vector1< platform::Size > const &  message 
)
static
void utility::SimulateMPI::send_string_to_node ( int  destination,
std::string const &  message 
)
static
void utility::SimulateMPI::set_mpi_rank ( int  value)
static
bool utility::SimulateMPI::simulate_mpi ( )
static

Member Data Documentation

int utility::SimulateMPI::rank_
staticprivate
SimulateMPIData * utility::SimulateMPI::simulation_
staticprivate

The documentation for this class was generated from the following files: