SimGrid  3.14.159
Versatile Simulation of Distributed Systems
smpi_base.cpp File Reference
#include <xbt/config.hpp>
#include <algorithm>
#include "private.h"
#include "xbt/virtu.h"
#include "mc/mc.h"
#include "src/mc/mc_replay.h"
#include "xbt/replay.h"
#include <errno.h>
#include "src/simix/smx_private.h"
#include "surf/surf.h"
#include "simgrid/sg_config.h"
#include "smpi/smpi_utils.hpp"
#include "colls/colls.h"
#include "src/kernel/activity/SynchroComm.hpp"

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (smpi_base, smpi, "Logging specific to SMPI (base)")
 
static int match_recv (void *a, void *b, smx_activity_t ignored)
 
static int match_send (void *a, void *b, smx_activity_t ignored)
 
static double smpi_os (size_t size)
 
static double smpi_ois (size_t size)
 
static double smpi_or (size_t size)
 
void smpi_mpi_init ()
 
double smpi_mpi_wtime ()
 
static MPI_Request build_request (void *buf, int count, MPI_Datatype datatype, int src, int dst, int tag, MPI_Comm comm, unsigned flags)
 
void smpi_empty_status (MPI_Status *status)
 
static void smpi_mpi_request_free_voidp (void *request)
 
MPI_Request smpi_mpi_send_init (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 
MPI_Request smpi_mpi_ssend_init (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 
MPI_Request smpi_mpi_recv_init (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm)
 
void smpi_mpi_start (MPI_Request request)
 
void smpi_mpi_startall (int count, MPI_Request *requests)
 
void smpi_mpi_request_free (MPI_Request *request)
 
MPI_Request smpi_rma_send_init (void *buf, int count, MPI_Datatype datatype, int src, int dst, int tag, MPI_Comm comm, MPI_Op op)
 
MPI_Request smpi_rma_recv_init (void *buf, int count, MPI_Datatype datatype, int src, int dst, int tag, MPI_Comm comm, MPI_Op op)
 
MPI_Request smpi_isend_init (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 
MPI_Request smpi_mpi_isend (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 
MPI_Request smpi_mpi_issend (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 
MPI_Request smpi_irecv_init (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm)
 
MPI_Request smpi_mpi_irecv (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm)
 
void smpi_mpi_recv (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status)
 
void smpi_mpi_send (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 
void smpi_mpi_ssend (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
 
void smpi_mpi_sendrecv (void *sendbuf, int sendcount, MPI_Datatype sendtype, int dst, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int src, int recvtag, MPI_Comm comm, MPI_Status *status)
 
int smpi_mpi_get_count (MPI_Status *status, MPI_Datatype datatype)
 
static void finish_wait (MPI_Request *request, MPI_Status *status)
 
int smpi_mpi_test (MPI_Request *request, MPI_Status *status)
 
int smpi_mpi_testany (int count, MPI_Request requests[], int *index, MPI_Status *status)
 
int smpi_mpi_testall (int count, MPI_Request requests[], MPI_Status status[])
 
void smpi_mpi_probe (int source, int tag, MPI_Comm comm, MPI_Status *status)
 
void smpi_mpi_iprobe (int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status)
 
void smpi_mpi_wait (MPI_Request *request, MPI_Status *status)
 
int smpi_mpi_waitany (int count, MPI_Request requests[], MPI_Status *status)
 
int smpi_mpi_waitall (int count, MPI_Request requests[], MPI_Status status[])
 
int smpi_mpi_waitsome (int incount, MPI_Request requests[], int *indices, MPI_Status status[])
 
int smpi_mpi_testsome (int incount, MPI_Request requests[], int *indices, MPI_Status status[])
 
void smpi_mpi_bcast (void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
 
void smpi_mpi_barrier (MPI_Comm comm)
 
void smpi_mpi_gather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
void smpi_mpi_reduce_scatter (void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 
void smpi_mpi_gatherv (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
void smpi_mpi_allgather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
 
void smpi_mpi_allgatherv (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, MPI_Comm comm)
 
void smpi_mpi_scatter (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
void smpi_mpi_scatterv (void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
void smpi_mpi_reduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
 
void smpi_mpi_allreduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 
void smpi_mpi_scan (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 
void smpi_mpi_exscan (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 

Variables

std::vector< s_smpi_factor_t > smpi_os_values
 
std::vector< s_smpi_factor_t > smpi_or_values
 
std::vector< s_smpi_factor_t > smpi_ois_values
 
static simgrid::config::Flag< double > smpi_wtime_sleep ("smpi/wtime", "Minimum time to inject inside a call to MPI_Wtime", 0.0)
 
static simgrid::config::Flag< double > smpi_init_sleep ("smpi/init", "Time to inject inside a call to MPI_Init", 0.0)
 
static simgrid::config::Flag< double > smpi_iprobe_sleep ("smpi/iprobe", "Minimum time to inject inside a call to MPI_Iprobe", 1e-4)
 
static simgrid::config::Flag< double > smpi_test_sleep ("smpi/test", "Minimum time to inject inside a call to MPI_Test", 1e-4)
 

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( smpi_base  ,
smpi  ,
"Logging specific to SMPI (base)"   
)

◆ match_recv()

static int match_recv ( void a,
void b,
smx_activity_t  ignored 
)
static

◆ match_send()

static int match_send ( void a,
void b,
smx_activity_t  ignored 
)
static

◆ smpi_os()

static double smpi_os ( size_t  size)
static

◆ smpi_ois()

static double smpi_ois ( size_t  size)
static

◆ smpi_or()

static double smpi_or ( size_t  size)
static

◆ smpi_mpi_init()

void smpi_mpi_init ( )

◆ smpi_mpi_wtime()

double smpi_mpi_wtime ( )

◆ build_request()

static MPI_Request build_request ( void buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  dst,
int  tag,
MPI_Comm  comm,
unsigned  flags 
)
static

◆ smpi_empty_status()

void smpi_empty_status ( MPI_Status status)

◆ smpi_mpi_request_free_voidp()

static void smpi_mpi_request_free_voidp ( void request)
static

◆ smpi_mpi_send_init()

MPI_Request smpi_mpi_send_init ( void buf,
int  count,
MPI_Datatype  datatype,
int  dst,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_ssend_init()

MPI_Request smpi_mpi_ssend_init ( void buf,
int  count,
MPI_Datatype  datatype,
int  dst,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_recv_init()

MPI_Request smpi_mpi_recv_init ( void buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_start()

void smpi_mpi_start ( MPI_Request  request)

◆ smpi_mpi_startall()

void smpi_mpi_startall ( int  count,
MPI_Request requests 
)

◆ smpi_mpi_request_free()

void smpi_mpi_request_free ( MPI_Request request)

◆ smpi_rma_send_init()

MPI_Request smpi_rma_send_init ( void buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  dst,
int  tag,
MPI_Comm  comm,
MPI_Op  op 
)

◆ smpi_rma_recv_init()

MPI_Request smpi_rma_recv_init ( void buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  dst,
int  tag,
MPI_Comm  comm,
MPI_Op  op 
)

◆ smpi_isend_init()

MPI_Request smpi_isend_init ( void buf,
int  count,
MPI_Datatype  datatype,
int  dst,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_isend()

MPI_Request smpi_mpi_isend ( void buf,
int  count,
MPI_Datatype  datatype,
int  dst,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_issend()

MPI_Request smpi_mpi_issend ( void buf,
int  count,
MPI_Datatype  datatype,
int  dst,
int  tag,
MPI_Comm  comm 
)

◆ smpi_irecv_init()

MPI_Request smpi_irecv_init ( void buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_irecv()

MPI_Request smpi_mpi_irecv ( void buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_recv()

void smpi_mpi_recv ( void buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  tag,
MPI_Comm  comm,
MPI_Status status 
)

◆ smpi_mpi_send()

void smpi_mpi_send ( void buf,
int  count,
MPI_Datatype  datatype,
int  dst,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_ssend()

void smpi_mpi_ssend ( void buf,
int  count,
MPI_Datatype  datatype,
int  dst,
int  tag,
MPI_Comm  comm 
)

◆ smpi_mpi_sendrecv()

void smpi_mpi_sendrecv ( void sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
int  dst,
int  sendtag,
void recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  src,
int  recvtag,
MPI_Comm  comm,
MPI_Status status 
)

◆ smpi_mpi_get_count()

int smpi_mpi_get_count ( MPI_Status status,
MPI_Datatype  datatype 
)

◆ finish_wait()

static void finish_wait ( MPI_Request request,
MPI_Status status 
)
static

◆ smpi_mpi_test()

int smpi_mpi_test ( MPI_Request request,
MPI_Status status 
)

◆ smpi_mpi_testany()

int smpi_mpi_testany ( int  count,
MPI_Request  requests[],
int *  index,
MPI_Status status 
)

Maps all matching comms back to their location in requests

◆ smpi_mpi_testall()

int smpi_mpi_testall ( int  count,
MPI_Request  requests[],
MPI_Status  status[] 
)

◆ smpi_mpi_probe()

void smpi_mpi_probe ( int  source,
int  tag,
MPI_Comm  comm,
MPI_Status status 
)

◆ smpi_mpi_iprobe()

void smpi_mpi_iprobe ( int  source,
int  tag,
MPI_Comm  comm,
int *  flag,
MPI_Status status 
)

◆ smpi_mpi_wait()

void smpi_mpi_wait ( MPI_Request request,
MPI_Status status 
)

◆ smpi_mpi_waitany()

int smpi_mpi_waitany ( int  count,
MPI_Request  requests[],
MPI_Status status 
)

◆ smpi_mpi_waitall()

int smpi_mpi_waitall ( int  count,
MPI_Request  requests[],
MPI_Status  status[] 
)

◆ smpi_mpi_waitsome()

int smpi_mpi_waitsome ( int  incount,
MPI_Request  requests[],
int *  indices,
MPI_Status  status[] 
)

◆ smpi_mpi_testsome()

int smpi_mpi_testsome ( int  incount,
MPI_Request  requests[],
int *  indices,
MPI_Status  status[] 
)

◆ smpi_mpi_bcast()

void smpi_mpi_bcast ( void buf,
int  count,
MPI_Datatype  datatype,
int  root,
MPI_Comm  comm 
)

◆ smpi_mpi_barrier()

void smpi_mpi_barrier ( MPI_Comm  comm)

◆ smpi_mpi_gather()

void smpi_mpi_gather ( void sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

◆ smpi_mpi_reduce_scatter()

void smpi_mpi_reduce_scatter ( void sendbuf,
void recvbuf,
int *  recvcounts,
MPI_Datatype  datatype,
MPI_Op  op,
MPI_Comm  comm 
)

◆ smpi_mpi_gatherv()

void smpi_mpi_gatherv ( void sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void recvbuf,
int *  recvcounts,
int *  displs,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

◆ smpi_mpi_allgather()

void smpi_mpi_allgather ( void sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
MPI_Comm  comm 
)

◆ smpi_mpi_allgatherv()

void smpi_mpi_allgatherv ( void sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void recvbuf,
int *  recvcounts,
int *  displs,
MPI_Datatype  recvtype,
MPI_Comm  comm 
)

◆ smpi_mpi_scatter()

void smpi_mpi_scatter ( void sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

◆ smpi_mpi_scatterv()

void smpi_mpi_scatterv ( void sendbuf,
int *  sendcounts,
int *  displs,
MPI_Datatype  sendtype,
void recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

◆ smpi_mpi_reduce()

void smpi_mpi_reduce ( void sendbuf,
void recvbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
int  root,
MPI_Comm  comm 
)

◆ smpi_mpi_allreduce()

void smpi_mpi_allreduce ( void sendbuf,
void recvbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
MPI_Comm  comm 
)

◆ smpi_mpi_scan()

void smpi_mpi_scan ( void sendbuf,
void recvbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
MPI_Comm  comm 
)

◆ smpi_mpi_exscan()

void smpi_mpi_exscan ( void sendbuf,
void recvbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
MPI_Comm  comm 
)

Variable Documentation

◆ smpi_os_values

std::vector<s_smpi_factor_t> smpi_os_values

◆ smpi_or_values

std::vector<s_smpi_factor_t> smpi_or_values

◆ smpi_ois_values

std::vector<s_smpi_factor_t> smpi_ois_values

◆ smpi_wtime_sleep

simgrid::config::Flag<double> smpi_wtime_sleep("smpi/wtime", "Minimum time to inject inside a call to MPI_Wtime", 0.0)
static

◆ smpi_init_sleep

simgrid::config::Flag<double> smpi_init_sleep("smpi/init", "Time to inject inside a call to MPI_Init", 0.0)
static

◆ smpi_iprobe_sleep

simgrid::config::Flag<double> smpi_iprobe_sleep("smpi/iprobe", "Minimum time to inject inside a call to MPI_Iprobe", 1e-4)
static

◆ smpi_test_sleep

simgrid::config::Flag<double> smpi_test_sleep("smpi/test", "Minimum time to inject inside a call to MPI_Test", 1e-4)
static