SimGrid  3.14.159
Versatile Simulation of Distributed Systems
smpi_replay.cpp File Reference
#include "private.h"
#include <stdio.h>
#include <xbt.h>
#include <xbt/replay.h>
#include <unordered_map>
#include <vector>

Macros

#define KEY_SIZE   (sizeof(int) * 2 + 1)
 
#define CHECK_ACTION_PARAMS(action, mandatory, optional)
 

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (smpi_replay, smpi,"Trace Replay with SMPI")
 
static void log_timed_action (const char *const *action, double clock)
 
static std::vector< MPI_Request > * get_reqq_self ()
 
static void set_reqq_self (std::vector< MPI_Request > *mpi_request)
 
voidsmpi_get_tmp_sendbuffer (int size)
 
voidsmpi_get_tmp_recvbuffer (int size)
 
void smpi_free_tmp_buffer (void *buf)
 
static double parse_double (const char *string)
 
static MPI_Datatype decode_datatype (const char *const action)
 
const char * encode_datatype (MPI_Datatype datatype, int *known)
 
static void action_init (const char *const *action)
 
static void action_finalize (const char *const *action)
 
static void action_comm_size (const char *const *action)
 
static void action_comm_split (const char *const *action)
 
static void action_comm_dup (const char *const *action)
 
static void action_compute (const char *const *action)
 
static void action_send (const char *const *action)
 
static void action_Isend (const char *const *action)
 
static void action_recv (const char *const *action)
 
static void action_Irecv (const char *const *action)
 
static void action_test (const char *const *action)
 
static void action_wait (const char *const *action)
 
static void action_waitall (const char *const *action)
 
static void action_barrier (const char *const *action)
 
static void action_bcast (const char *const *action)
 
static void action_reduce (const char *const *action)
 
static void action_allReduce (const char *const *action)
 
static void action_allToAll (const char *const *action)
 
static void action_gather (const char *const *action)
 
static void action_gatherv (const char *const *action)
 
static void action_reducescatter (const char *const *action)
 
static void action_allgather (const char *const *action)
 
static void action_allgatherv (const char *const *action)
 
static void action_allToAllv (const char *const *action)
 
void smpi_replay_run (int *argc, char ***argv)
 

Variables

int communicator_size = 0
 
static int active_processes = 0
 
std::unordered_map< int, std::vector< MPI_Request > * > reqq
 
MPI_Datatype MPI_DEFAULT_TYPE
 
MPI_Datatype MPI_CURRENT_TYPE
 
static int sendbuffer_size =0
 
char * sendbuffer =nullptr
 
static int recvbuffer_size =0
 
char * recvbuffer =nullptr
 

Macro Definition Documentation

◆ KEY_SIZE

#define KEY_SIZE   (sizeof(int) * 2 + 1)

◆ CHECK_ACTION_PARAMS

#define CHECK_ACTION_PARAMS (   action,
  mandatory,
  optional 
)
Value:
{\
int i=0;\
while(action[i]!=nullptr)\
i++;\
if(i<mandatory+2) \
THROWF(arg_error, 0, "%s replay failed.\n" \
"%d items were given on the line. First two should be process_id and action. " \
"This action needs after them %d mandatory arguments, and accepts %d optional ones. \n" \
"Please contact the Simgrid team if support is needed", __FUNCTION__, i, mandatory, optional);\
}
Invalid argument.
Definition: ex.h:94

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( smpi_replay  ,
smpi  ,
"Trace Replay with SMPI"   
)

◆ log_timed_action()

static void log_timed_action ( const char *const *  action,
double  clock 
)
static

◆ get_reqq_self()

static std::vector<MPI_Request>* get_reqq_self ( )
static

◆ set_reqq_self()

static void set_reqq_self ( std::vector< MPI_Request > *  mpi_request)
static

◆ smpi_get_tmp_sendbuffer()

void* smpi_get_tmp_sendbuffer ( int  size)

◆ smpi_get_tmp_recvbuffer()

void* smpi_get_tmp_recvbuffer ( int  size)

◆ smpi_free_tmp_buffer()

void smpi_free_tmp_buffer ( void buf)

◆ parse_double()

static double parse_double ( const char *  string)
static

◆ decode_datatype()

static MPI_Datatype decode_datatype ( const char *const  action)
static

◆ encode_datatype()

const char* encode_datatype ( MPI_Datatype  datatype,
int *  known 
)

◆ action_init()

static void action_init ( const char *const *  action)
static

◆ action_finalize()

static void action_finalize ( const char *const *  action)
static

◆ action_comm_size()

static void action_comm_size ( const char *const *  action)
static

◆ action_comm_split()

static void action_comm_split ( const char *const *  action)
static

◆ action_comm_dup()

static void action_comm_dup ( const char *const *  action)
static

◆ action_compute()

static void action_compute ( const char *const *  action)
static

◆ action_send()

static void action_send ( const char *const *  action)
static

◆ action_Isend()

static void action_Isend ( const char *const *  action)
static

◆ action_recv()

static void action_recv ( const char *const *  action)
static

◆ action_Irecv()

static void action_Irecv ( const char *const *  action)
static

◆ action_test()

static void action_test ( const char *const *  action)
static

◆ action_wait()

static void action_wait ( const char *const *  action)
static

◆ action_waitall()

static void action_waitall ( const char *const *  action)
static

◆ action_barrier()

static void action_barrier ( const char *const *  action)
static

◆ action_bcast()

static void action_bcast ( const char *const *  action)
static

◆ action_reduce()

static void action_reduce ( const char *const *  action)
static

◆ action_allReduce()

static void action_allReduce ( const char *const *  action)
static

◆ action_allToAll()

static void action_allToAll ( const char *const *  action)
static

◆ action_gather()

static void action_gather ( const char *const *  action)
static

◆ action_gatherv()

static void action_gatherv ( const char *const *  action)
static

◆ action_reducescatter()

static void action_reducescatter ( const char *const *  action)
static

◆ action_allgather()

static void action_allgather ( const char *const *  action)
static

◆ action_allgatherv()

static void action_allgatherv ( const char *const *  action)
static

◆ action_allToAllv()

static void action_allToAllv ( const char *const *  action)
static

◆ smpi_replay_run()

void smpi_replay_run ( int *  argc,
char ***  argv 
)

Variable Documentation

◆ communicator_size

int communicator_size = 0

◆ active_processes

int active_processes = 0
static

◆ reqq

std::unordered_map<int,std::vector<MPI_Request>*> reqq

◆ MPI_DEFAULT_TYPE

MPI_Datatype MPI_DEFAULT_TYPE

◆ MPI_CURRENT_TYPE

MPI_Datatype MPI_CURRENT_TYPE

◆ sendbuffer_size

int sendbuffer_size =0
static

◆ sendbuffer

char* sendbuffer =nullptr

◆ recvbuffer_size

int recvbuffer_size =0
static

◆ recvbuffer

char* recvbuffer =nullptr