SimGrid  3.14.159
Versatile Simulation of Distributed Systems
smpi_mpi_dt.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "private.h"
#include "smpi_mpi_dt_private.h"
#include "mc/mc.h"
#include "xbt/replay.h"
#include <xbt/ex.hpp>
#include "simgrid/modelchecker.h"

Classes

struct  float_int
 
struct  float_float
 
struct  long_long
 
struct  double_double
 
struct  long_int
 
struct  double_int
 
struct  short_int
 
struct  int_int
 
struct  long_double_int
 
struct  integer128_t
 
struct  s_smpi_mpi_op
 

Macros

#define CREATE_MPI_DATATYPE(name, type)
 
#define CREATE_MPI_DATATYPE_NULL(name)
 
#define MAX_OP(a, b)   (b) = (a) < (b) ? (b) : (a)
 
#define MIN_OP(a, b)   (b) = (a) < (b) ? (a) : (b)
 
#define SUM_OP(a, b)   (b) += (a)
 
#define PROD_OP(a, b)   (b) *= (a)
 
#define LAND_OP(a, b)   (b) = (a) && (b)
 
#define LOR_OP(a, b)   (b) = (a) || (b)
 
#define LXOR_OP(a, b)   (b) = (!(a) && (b)) || ((a) && !(b))
 
#define BAND_OP(a, b)   (b) &= (a)
 
#define BOR_OP(a, b)   (b) |= (a)
 
#define BXOR_OP(a, b)   (b) ^= (a)
 
#define MAXLOC_OP(a, b)   (b) = (a.value) < (b.value) ? (b) : (a)
 
#define MINLOC_OP(a, b)   (b) = (a.value) < (b.value) ? (a) : (b)
 
#define APPLY_FUNC(a, b, length, type, func)
 
#define CREATE_MPI_OP(name, func)
 

Typedefs

typedef struct s_smpi_mpi_op s_smpi_mpi_op_t
 

Functions

 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (smpi_mpi_dt, smpi, "Logging specific to SMPI (datatype)")
 
 CREATE_MPI_DATATYPE (MPI_CHAR, char)
 
 CREATE_MPI_DATATYPE (MPI_SHORT, short)
 
 CREATE_MPI_DATATYPE (MPI_INT, int)
 
 CREATE_MPI_DATATYPE (MPI_LONG, long)
 
 CREATE_MPI_DATATYPE (MPI_LONG_LONG, long long)
 
 CREATE_MPI_DATATYPE (MPI_SIGNED_CHAR, signed char)
 
 CREATE_MPI_DATATYPE (MPI_UNSIGNED_CHAR, unsigned char)
 
 CREATE_MPI_DATATYPE (MPI_UNSIGNED_SHORT, unsigned short)
 
 CREATE_MPI_DATATYPE (MPI_UNSIGNED, unsigned int)
 
 CREATE_MPI_DATATYPE (MPI_UNSIGNED_LONG, unsigned long)
 
 CREATE_MPI_DATATYPE (MPI_UNSIGNED_LONG_LONG, unsigned long long)
 
 CREATE_MPI_DATATYPE (MPI_FLOAT, float)
 
 CREATE_MPI_DATATYPE (MPI_DOUBLE, double)
 
 CREATE_MPI_DATATYPE (MPI_LONG_DOUBLE, long double)
 
 CREATE_MPI_DATATYPE (MPI_WCHAR, wchar_t)
 
 CREATE_MPI_DATATYPE (MPI_C_BOOL, bool)
 
 CREATE_MPI_DATATYPE (MPI_BYTE, int8_t)
 
 CREATE_MPI_DATATYPE (MPI_INT8_T, int8_t)
 
 CREATE_MPI_DATATYPE (MPI_INT16_T, int16_t)
 
 CREATE_MPI_DATATYPE (MPI_INT32_T, int32_t)
 
 CREATE_MPI_DATATYPE (MPI_INT64_T, int64_t)
 
 CREATE_MPI_DATATYPE (MPI_UINT8_T, uint8_t)
 
 CREATE_MPI_DATATYPE (MPI_UINT16_T, uint16_t)
 
 CREATE_MPI_DATATYPE (MPI_UINT32_T, uint32_t)
 
 CREATE_MPI_DATATYPE (MPI_UINT64_T, uint64_t)
 
 CREATE_MPI_DATATYPE (MPI_C_FLOAT_COMPLEX, float _Complex)
 
 CREATE_MPI_DATATYPE (MPI_C_DOUBLE_COMPLEX, double _Complex)
 
 CREATE_MPI_DATATYPE (MPI_C_LONG_DOUBLE_COMPLEX, long double _Complex)
 
 CREATE_MPI_DATATYPE (MPI_AINT, MPI_Aint)
 
 CREATE_MPI_DATATYPE (MPI_OFFSET, MPI_Offset)
 
 CREATE_MPI_DATATYPE (MPI_FLOAT_INT, float_int)
 
 CREATE_MPI_DATATYPE (MPI_LONG_INT, long_int)
 
 CREATE_MPI_DATATYPE (MPI_DOUBLE_INT, double_int)
 
 CREATE_MPI_DATATYPE (MPI_SHORT_INT, short_int)
 
 CREATE_MPI_DATATYPE (MPI_2INT, int_int)
 
 CREATE_MPI_DATATYPE (MPI_2FLOAT, float_float)
 
 CREATE_MPI_DATATYPE (MPI_2DOUBLE, double_double)
 
 CREATE_MPI_DATATYPE (MPI_2LONG, long_long)
 
 CREATE_MPI_DATATYPE (MPI_REAL, float)
 
 CREATE_MPI_DATATYPE (MPI_REAL4, float)
 
 CREATE_MPI_DATATYPE (MPI_REAL8, float)
 
 CREATE_MPI_DATATYPE (MPI_REAL16, double)
 
 CREATE_MPI_DATATYPE_NULL (MPI_COMPLEX8)
 
 CREATE_MPI_DATATYPE_NULL (MPI_COMPLEX16)
 
 CREATE_MPI_DATATYPE_NULL (MPI_COMPLEX32)
 
 CREATE_MPI_DATATYPE (MPI_INTEGER1, int)
 
 CREATE_MPI_DATATYPE (MPI_INTEGER2, int16_t)
 
 CREATE_MPI_DATATYPE (MPI_INTEGER4, int32_t)
 
 CREATE_MPI_DATATYPE (MPI_INTEGER8, int64_t)
 
 CREATE_MPI_DATATYPE (MPI_INTEGER16, integer128_t)
 
 CREATE_MPI_DATATYPE (MPI_LONG_DOUBLE_INT, long_double_int)
 
 CREATE_MPI_DATATYPE_NULL (MPI_UB)
 
 CREATE_MPI_DATATYPE_NULL (MPI_LB)
 
 CREATE_MPI_DATATYPE (MPI_PACKED, char)
 
 CREATE_MPI_DATATYPE (MPI_PTR, void *)
 
bool is_datatype_valid (MPI_Datatype datatype)
 Check if the datatype is usable for communications. More...
 
size_t smpi_datatype_size (MPI_Datatype datatype)
 
MPI_Aint smpi_datatype_lb (MPI_Datatype datatype)
 
MPI_Aint smpi_datatype_ub (MPI_Datatype datatype)
 
int smpi_datatype_dup (MPI_Datatype datatype, MPI_Datatype *new_t)
 
int smpi_datatype_extent (MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent)
 
MPI_Aint smpi_datatype_get_extent (MPI_Datatype datatype)
 
void smpi_datatype_get_name (MPI_Datatype datatype, char *name, int *length)
 
void smpi_datatype_set_name (MPI_Datatype datatype, char *name)
 
int smpi_datatype_copy (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype)
 
void serialize_vector (const void *noncontiguous_vector, void *contiguous_vector, int count, void *type)
 
void unserialize_vector (const void *contiguous_vector, void *noncontiguous_vector, int count, void *type, MPI_Op op)
 
s_smpi_mpi_vector_tsmpi_datatype_vector_create (int block_stride, int block_length, int block_count, MPI_Datatype old_type, int size_oldtype)
 
void smpi_datatype_create (MPI_Datatype *new_type, int size, int lb, int ub, int sizeof_substruct, void *struct_type, int flags)
 
void smpi_datatype_free (MPI_Datatype *type)
 
void smpi_datatype_use (MPI_Datatype type)
 
void smpi_datatype_unuse (MPI_Datatype type)
 
void serialize_contiguous (const void *noncontiguous_hvector, void *contiguous_hvector, int count, void *type)
 
void unserialize_contiguous (const void *contiguous_vector, void *noncontiguous_vector, int count, void *type, MPI_Op op)
 
void free_contiguous (MPI_Datatype *d)
 
void use_contiguous (MPI_Datatype *d)
 
s_smpi_mpi_contiguous_tsmpi_datatype_contiguous_create (MPI_Aint lb, int block_count, MPI_Datatype old_type, int size_oldtype)
 
int smpi_datatype_contiguous (int count, MPI_Datatype old_type, MPI_Datatype *new_type, MPI_Aint lb)
 
int smpi_datatype_vector (int count, int blocklen, int stride, MPI_Datatype old_type, MPI_Datatype *new_type)
 
void free_vector (MPI_Datatype *d)
 
void use_vector (MPI_Datatype *d)
 
void serialize_hvector (const void *noncontiguous_hvector, void *contiguous_hvector, int count, void *type)
 
void unserialize_hvector (const void *contiguous_vector, void *noncontiguous_vector, int count, void *type, MPI_Op op)
 
s_smpi_mpi_hvector_tsmpi_datatype_hvector_create (MPI_Aint block_stride, int block_length, int block_count, MPI_Datatype old_type, int size_oldtype)
 
void free_hvector (MPI_Datatype *d)
 
void use_hvector (MPI_Datatype *d)
 
int smpi_datatype_hvector (int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype *new_type)
 
void serialize_indexed (const void *noncontiguous_indexed, void *contiguous_indexed, int count, void *type)
 
void unserialize_indexed (const void *contiguous_indexed, void *noncontiguous_indexed, int count, void *type, MPI_Op op)
 
void free_indexed (MPI_Datatype *type)
 
void use_indexed (MPI_Datatype *type)
 
s_smpi_mpi_indexed_tsmpi_datatype_indexed_create (int *block_lengths, int *block_indices, int block_count, MPI_Datatype old_type, int size_oldtype)
 
int smpi_datatype_indexed (int count, int *blocklens, int *indices, MPI_Datatype old_type, MPI_Datatype *new_type)
 
void serialize_hindexed (const void *noncontiguous_hindexed, void *contiguous_hindexed, int count, void *type)
 
void unserialize_hindexed (const void *contiguous_hindexed, void *noncontiguous_hindexed, int count, void *type, MPI_Op op)
 
void free_hindexed (MPI_Datatype *type)
 
void use_hindexed (MPI_Datatype *type)
 
s_smpi_mpi_hindexed_tsmpi_datatype_hindexed_create (int *block_lengths, MPI_Aint *block_indices, int block_count, MPI_Datatype old_type, int size_oldtype)
 
int smpi_datatype_hindexed (int count, int *blocklens, MPI_Aint *indices, MPI_Datatype old_type, MPI_Datatype *new_type)
 
void serialize_struct (const void *noncontiguous_struct, void *contiguous_struct, int count, void *type)
 
void unserialize_struct (const void *contiguous_struct, void *noncontiguous_struct, int count, void *type, MPI_Op op)
 
void free_struct (MPI_Datatype *type)
 
void use_struct (MPI_Datatype *type)
 
s_smpi_mpi_struct_tsmpi_datatype_struct_create (int *block_lengths, MPI_Aint *block_indices, int block_count, MPI_Datatype *old_types)
 
int smpi_datatype_struct (int count, int *blocklens, MPI_Aint *indices, MPI_Datatype *old_types, MPI_Datatype *new_type)
 
void smpi_datatype_commit (MPI_Datatype *datatype)
 
static void max_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void min_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void sum_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void prod_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void land_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void lor_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void lxor_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void band_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void bor_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void bxor_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void minloc_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void maxloc_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
static void replace_func (void *a, void *b, int *length, MPI_Datatype *datatype)
 
 CREATE_MPI_OP (MPI_MAX, max_func)
 
 CREATE_MPI_OP (MPI_MIN, min_func)
 
 CREATE_MPI_OP (MPI_SUM, sum_func)
 
 CREATE_MPI_OP (MPI_PROD, prod_func)
 
 CREATE_MPI_OP (MPI_LAND, land_func)
 
 CREATE_MPI_OP (MPI_LOR, lor_func)
 
 CREATE_MPI_OP (MPI_LXOR, lxor_func)
 
 CREATE_MPI_OP (MPI_BAND, band_func)
 
 CREATE_MPI_OP (MPI_BOR, bor_func)
 
 CREATE_MPI_OP (MPI_BXOR, bxor_func)
 
 CREATE_MPI_OP (MPI_MAXLOC, maxloc_func)
 
 CREATE_MPI_OP (MPI_MINLOC, minloc_func)
 
 CREATE_MPI_OP (MPI_REPLACE, replace_func)
 
MPI_Op smpi_op_new (MPI_User_function *function, bool commute)
 
bool smpi_op_is_commute (MPI_Op op)
 
void smpi_op_destroy (MPI_Op op)
 
void smpi_op_apply (MPI_Op op, const void *invec, void *inoutvec, int *len, MPI_Datatype *datatype)
 
int smpi_type_attr_delete (MPI_Datatype type, int keyval)
 
int smpi_type_attr_get (MPI_Datatype type, int keyval, void *attr_value, int *flag)
 
int smpi_type_attr_put (MPI_Datatype type, int keyval, void *attr_value)
 
int smpi_type_keyval_create (MPI_Type_copy_attr_function *copy_fn, MPI_Type_delete_attr_function *delete_fn, int *keyval, void *extra_state)
 
int smpi_type_keyval_free (int *keyval)
 
int smpi_mpi_pack (void *inbuf, int incount, MPI_Datatype type, void *outbuf, int outcount, int *position, MPI_Comm comm)
 
int smpi_mpi_unpack (void *inbuf, int insize, int *position, void *outbuf, int outcount, MPI_Datatype type, MPI_Comm comm)
 

Variables

xbt_dict_t smpi_type_keyvals = nullptr
 
int type_keyval_id =0
 

Macro Definition Documentation

◆ CREATE_MPI_DATATYPE

#define CREATE_MPI_DATATYPE (   name,
  type 
)
Value:
static s_smpi_mpi_datatype_t mpi_##name = { \
(char*) # name, \
sizeof(type), /* size */ \
0, /*was 1 sizeof_substruct*/ \
0, /* lb */ \
sizeof(type), /* ub = lb + size */ \
DT_FLAG_BASIC, /* flags */ \
nullptr, /* attributes */ \
nullptr, /* pointer on extended struct*/ \
0 /* in_use counter */ \
}; \
const MPI_Datatype name = &mpi_##name;
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char * name
Definition: smpi_mpi.cpp:83
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char int resultlen void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win MPI_Group MPI_Group MPI_Group newgroup MPI_Group group MPI_Group MPI_Group MPI_Group newgroup MPI_Group int int MPI_Group newgroup MPI_Group int size MPI_Group MPI_Group MPI_Group newgroup MPI_Info char key MPI_Info info MPI_Info int nkeys MPI_Info char int int flag int flag int char int int provided void int MPI_Datatype int int MPI_Comm MPI_Request request void int MPI_Datatype int int MPI_Comm MPI_Request request MPI_Copy_function MPI_Delete_function int void extra_state MPI_User_function int MPI_Op op int MPI_Datatype MPI_Comm int size int int MPI_Comm MPI_Status status int provided void int MPI_Datatype int int MPI_Comm MPI_Status status void void int MPI_Datatype MPI_Op MPI_Comm comm void void int MPI_Datatype MPI_Op int MPI_Comm comm void void int MPI_Datatype MPI_Op MPI_Comm comm void int int MPI_Datatype void int MPI_Datatype int MPI_Comm comm void int MPI_Datatype int int int int MPI_Comm MPI_Status status void int MPI_Datatype int int MPI_Comm comm void int MPI_Datatype int int MPI_Comm comm MPI_Request request int MPI_Request int int MPI_Status status int MPI_Request int int MPI_Status statuses int MPI_Datatype MPI_Datatype newtype int int MPI_Aint MPI_Datatype MPI_Datatype new_type int int int MPI_Datatype MPI_Datatype newtype MPI_Type_copy_attr_function MPI_Type_delete_attr_function int void extra_state int int MPI_Aint MPI_Datatype MPI_Datatype newtype MPI_Datatype MPI_Datatype newdatatype int keyval MPI_Datatype type
Definition: smpi_mpi.cpp:161
Definition: private.h:53

◆ CREATE_MPI_DATATYPE_NULL

#define CREATE_MPI_DATATYPE_NULL (   name)
Value:
static s_smpi_mpi_datatype_t mpi_##name = { \
(char*) # name, \
0, /* size */ \
0, /* was 1 sizeof_substruct*/ \
0, /* lb */ \
0, /* ub = lb + size */ \
DT_FLAG_BASIC, /* flags */ \
nullptr, /* attributes */ \
nullptr, /* pointer on extended struct*/ \
0 /* in_use counter */ \
}; \
const MPI_Datatype name = &mpi_##name;
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char * name
Definition: smpi_mpi.cpp:83
#define DT_FLAG_BASIC
Definition: smpi_mpi_dt_private.h:36
Definition: private.h:53

◆ MAX_OP

#define MAX_OP (   a,
 
)    (b) = (a) < (b) ? (b) : (a)

◆ MIN_OP

#define MIN_OP (   a,
 
)    (b) = (a) < (b) ? (a) : (b)

◆ SUM_OP

#define SUM_OP (   a,
 
)    (b) += (a)

◆ PROD_OP

#define PROD_OP (   a,
 
)    (b) *= (a)

◆ LAND_OP

#define LAND_OP (   a,
 
)    (b) = (a) && (b)

◆ LOR_OP

#define LOR_OP (   a,
 
)    (b) = (a) || (b)

◆ LXOR_OP

#define LXOR_OP (   a,
 
)    (b) = (!(a) && (b)) || ((a) && !(b))

◆ BAND_OP

#define BAND_OP (   a,
 
)    (b) &= (a)

◆ BOR_OP

#define BOR_OP (   a,
 
)    (b) |= (a)

◆ BXOR_OP

#define BXOR_OP (   a,
 
)    (b) ^= (a)

◆ MAXLOC_OP

#define MAXLOC_OP (   a,
 
)    (b) = (a.value) < (b.value) ? (b) : (a)

◆ MINLOC_OP

#define MINLOC_OP (   a,
 
)    (b) = (a.value) < (b.value) ? (a) : (b)

◆ APPLY_FUNC

#define APPLY_FUNC (   a,
  b,
  length,
  type,
  func 
)
Value:
{ \
int i; \
type* x = (type*)(a); \
type* y = (type*)(b); \
for(i = 0; i < *(length); i++) { \
func(x[i], y[i]); \
} \
}
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char int resultlen void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win MPI_Group MPI_Group MPI_Group newgroup MPI_Group group MPI_Group MPI_Group MPI_Group newgroup MPI_Group int int MPI_Group newgroup MPI_Group int size MPI_Group MPI_Group MPI_Group newgroup MPI_Info char key MPI_Info info MPI_Info int nkeys MPI_Info char int int flag int flag int char int int provided void int MPI_Datatype int int MPI_Comm MPI_Request request void int MPI_Datatype int int MPI_Comm MPI_Request request MPI_Copy_function MPI_Delete_function int void extra_state MPI_User_function int MPI_Op op int MPI_Datatype MPI_Comm int size int int MPI_Comm MPI_Status status int provided void int MPI_Datatype int int MPI_Comm MPI_Status status void void int MPI_Datatype MPI_Op MPI_Comm comm void void int MPI_Datatype MPI_Op int MPI_Comm comm void void int MPI_Datatype MPI_Op MPI_Comm comm void int int MPI_Datatype void int MPI_Datatype int MPI_Comm comm void int MPI_Datatype int int int int MPI_Comm MPI_Status status void int MPI_Datatype int int MPI_Comm comm void int MPI_Datatype int int MPI_Comm comm MPI_Request request int MPI_Request int int MPI_Status status int MPI_Request int int MPI_Status statuses int MPI_Datatype MPI_Datatype newtype int int MPI_Aint MPI_Datatype MPI_Datatype new_type int int int MPI_Datatype MPI_Datatype newtype MPI_Type_copy_attr_function MPI_Type_delete_attr_function int void extra_state int int MPI_Aint MPI_Datatype MPI_Datatype newtype MPI_Datatype MPI_Datatype newdatatype int keyval MPI_Datatype type
Definition: smpi_mpi.cpp:161

◆ CREATE_MPI_OP

#define CREATE_MPI_OP (   name,
  func 
)
Value:
static s_smpi_mpi_op_t mpi_##name = { &(func) /* func */, true }; \
MPI_Op name = &mpi_##name;
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char * name
Definition: smpi_mpi.cpp:83
Definition: smpi_mpi_dt.cpp:1159

Typedef Documentation

◆ s_smpi_mpi_op_t

Function Documentation

◆ XBT_LOG_NEW_DEFAULT_SUBCATEGORY()

XBT_LOG_NEW_DEFAULT_SUBCATEGORY ( smpi_mpi_dt  ,
smpi  ,
"Logging specific to SMPI (datatype)"   
)

◆ CREATE_MPI_DATATYPE() [1/50]

CREATE_MPI_DATATYPE ( MPI_CHAR  ,
char   
)

◆ CREATE_MPI_DATATYPE() [2/50]

CREATE_MPI_DATATYPE ( MPI_SHORT  ,
short   
)

◆ CREATE_MPI_DATATYPE() [3/50]

CREATE_MPI_DATATYPE ( MPI_INT  ,
int   
)

◆ CREATE_MPI_DATATYPE() [4/50]

CREATE_MPI_DATATYPE ( MPI_LONG  ,
long   
)

◆ CREATE_MPI_DATATYPE() [5/50]

CREATE_MPI_DATATYPE ( MPI_LONG_LONG  ,
long  long 
)

◆ CREATE_MPI_DATATYPE() [6/50]

CREATE_MPI_DATATYPE ( MPI_SIGNED_CHAR  ,
signed  char 
)

◆ CREATE_MPI_DATATYPE() [7/50]

CREATE_MPI_DATATYPE ( MPI_UNSIGNED_CHAR  ,
unsigned  char 
)

◆ CREATE_MPI_DATATYPE() [8/50]

CREATE_MPI_DATATYPE ( MPI_UNSIGNED_SHORT  ,
unsigned  short 
)

◆ CREATE_MPI_DATATYPE() [9/50]

CREATE_MPI_DATATYPE ( MPI_UNSIGNED  ,
unsigned  int 
)

◆ CREATE_MPI_DATATYPE() [10/50]

CREATE_MPI_DATATYPE ( MPI_UNSIGNED_LONG  ,
unsigned  long 
)

◆ CREATE_MPI_DATATYPE() [11/50]

CREATE_MPI_DATATYPE ( MPI_UNSIGNED_LONG_LONG  ,
unsigned long  long 
)

◆ CREATE_MPI_DATATYPE() [12/50]

CREATE_MPI_DATATYPE ( MPI_FLOAT  ,
float   
)

◆ CREATE_MPI_DATATYPE() [13/50]

CREATE_MPI_DATATYPE ( MPI_DOUBLE  ,
double   
)

◆ CREATE_MPI_DATATYPE() [14/50]

CREATE_MPI_DATATYPE ( MPI_LONG_DOUBLE  ,
long  double 
)

◆ CREATE_MPI_DATATYPE() [15/50]

CREATE_MPI_DATATYPE ( MPI_WCHAR  ,
wchar_t   
)

◆ CREATE_MPI_DATATYPE() [16/50]

CREATE_MPI_DATATYPE ( MPI_C_BOOL  ,
bool   
)

◆ CREATE_MPI_DATATYPE() [17/50]

CREATE_MPI_DATATYPE ( MPI_BYTE  ,
int8_t   
)

◆ CREATE_MPI_DATATYPE() [18/50]

CREATE_MPI_DATATYPE ( MPI_INT8_T  ,
int8_t   
)

◆ CREATE_MPI_DATATYPE() [19/50]

CREATE_MPI_DATATYPE ( MPI_INT16_T  ,
int16_t   
)

◆ CREATE_MPI_DATATYPE() [20/50]

CREATE_MPI_DATATYPE ( MPI_INT32_T  ,
int32_t   
)

◆ CREATE_MPI_DATATYPE() [21/50]

CREATE_MPI_DATATYPE ( MPI_INT64_T  ,
int64_t   
)

◆ CREATE_MPI_DATATYPE() [22/50]

CREATE_MPI_DATATYPE ( MPI_UINT8_T  ,
uint8_t   
)

◆ CREATE_MPI_DATATYPE() [23/50]

CREATE_MPI_DATATYPE ( MPI_UINT16_T  ,
uint16_t   
)

◆ CREATE_MPI_DATATYPE() [24/50]

CREATE_MPI_DATATYPE ( MPI_UINT32_T  ,
uint32_t   
)

◆ CREATE_MPI_DATATYPE() [25/50]

CREATE_MPI_DATATYPE ( MPI_UINT64_T  ,
uint64_t   
)

◆ CREATE_MPI_DATATYPE() [26/50]

CREATE_MPI_DATATYPE ( MPI_C_FLOAT_COMPLEX  ,
float  _Complex 
)

◆ CREATE_MPI_DATATYPE() [27/50]

CREATE_MPI_DATATYPE ( MPI_C_DOUBLE_COMPLEX  ,
double  _Complex 
)

◆ CREATE_MPI_DATATYPE() [28/50]

CREATE_MPI_DATATYPE ( MPI_C_LONG_DOUBLE_COMPLEX  ,
long double  _Complex 
)

◆ CREATE_MPI_DATATYPE() [29/50]

CREATE_MPI_DATATYPE ( MPI_AINT  ,
MPI_Aint   
)

◆ CREATE_MPI_DATATYPE() [30/50]

CREATE_MPI_DATATYPE ( MPI_OFFSET  ,
MPI_Offset   
)

◆ CREATE_MPI_DATATYPE() [31/50]

CREATE_MPI_DATATYPE ( MPI_FLOAT_INT  ,
float_int   
)

◆ CREATE_MPI_DATATYPE() [32/50]

CREATE_MPI_DATATYPE ( MPI_LONG_INT  ,
long_int   
)

◆ CREATE_MPI_DATATYPE() [33/50]

CREATE_MPI_DATATYPE ( MPI_DOUBLE_INT  ,
double_int   
)

◆ CREATE_MPI_DATATYPE() [34/50]

CREATE_MPI_DATATYPE ( MPI_SHORT_INT  ,
short_int   
)

◆ CREATE_MPI_DATATYPE() [35/50]

CREATE_MPI_DATATYPE ( MPI_2INT  ,
int_int   
)

◆ CREATE_MPI_DATATYPE() [36/50]

CREATE_MPI_DATATYPE ( MPI_2FLOAT  ,
float_float   
)

◆ CREATE_MPI_DATATYPE() [37/50]

CREATE_MPI_DATATYPE ( MPI_2DOUBLE  ,
double_double   
)

◆ CREATE_MPI_DATATYPE() [38/50]

CREATE_MPI_DATATYPE ( MPI_2LONG  ,
long_long   
)

◆ CREATE_MPI_DATATYPE() [39/50]

CREATE_MPI_DATATYPE ( MPI_REAL  ,
float   
)

◆ CREATE_MPI_DATATYPE() [40/50]

CREATE_MPI_DATATYPE ( MPI_REAL4  ,
float   
)

◆ CREATE_MPI_DATATYPE() [41/50]

CREATE_MPI_DATATYPE ( MPI_REAL8  ,
float   
)

◆ CREATE_MPI_DATATYPE() [42/50]

CREATE_MPI_DATATYPE ( MPI_REAL16  ,
double   
)

◆ CREATE_MPI_DATATYPE_NULL() [1/5]

CREATE_MPI_DATATYPE_NULL ( MPI_COMPLEX8  )

◆ CREATE_MPI_DATATYPE_NULL() [2/5]

CREATE_MPI_DATATYPE_NULL ( MPI_COMPLEX16  )

◆ CREATE_MPI_DATATYPE_NULL() [3/5]

CREATE_MPI_DATATYPE_NULL ( MPI_COMPLEX32  )

◆ CREATE_MPI_DATATYPE() [43/50]

CREATE_MPI_DATATYPE ( MPI_INTEGER1  ,
int   
)

◆ CREATE_MPI_DATATYPE() [44/50]

CREATE_MPI_DATATYPE ( MPI_INTEGER2  ,
int16_t   
)

◆ CREATE_MPI_DATATYPE() [45/50]

CREATE_MPI_DATATYPE ( MPI_INTEGER4  ,
int32_t   
)

◆ CREATE_MPI_DATATYPE() [46/50]

CREATE_MPI_DATATYPE ( MPI_INTEGER8  ,
int64_t   
)

◆ CREATE_MPI_DATATYPE() [47/50]

CREATE_MPI_DATATYPE ( MPI_INTEGER16  ,
integer128_t   
)

◆ CREATE_MPI_DATATYPE() [48/50]

CREATE_MPI_DATATYPE ( MPI_LONG_DOUBLE_INT  ,
long_double_int   
)

◆ CREATE_MPI_DATATYPE_NULL() [4/5]

CREATE_MPI_DATATYPE_NULL ( MPI_UB  )

◆ CREATE_MPI_DATATYPE_NULL() [5/5]

CREATE_MPI_DATATYPE_NULL ( MPI_LB  )

◆ CREATE_MPI_DATATYPE() [49/50]

CREATE_MPI_DATATYPE ( MPI_PACKED  ,
char   
)

◆ CREATE_MPI_DATATYPE() [50/50]

CREATE_MPI_DATATYPE ( MPI_PTR  ,
void  
)

◆ is_datatype_valid()

bool is_datatype_valid ( MPI_Datatype  datatype)

Check if the datatype is usable for communications.

◆ smpi_datatype_size()

size_t smpi_datatype_size ( MPI_Datatype  datatype)

◆ smpi_datatype_lb()

MPI_Aint smpi_datatype_lb ( MPI_Datatype  datatype)

◆ smpi_datatype_ub()

MPI_Aint smpi_datatype_ub ( MPI_Datatype  datatype)

◆ smpi_datatype_dup()

int smpi_datatype_dup ( MPI_Datatype  datatype,
MPI_Datatype new_t 
)

◆ smpi_datatype_extent()

int smpi_datatype_extent ( MPI_Datatype  datatype,
MPI_Aint lb,
MPI_Aint extent 
)

◆ smpi_datatype_get_extent()

MPI_Aint smpi_datatype_get_extent ( MPI_Datatype  datatype)

◆ smpi_datatype_get_name()

void smpi_datatype_get_name ( MPI_Datatype  datatype,
char *  name,
int *  length 
)

◆ smpi_datatype_set_name()

void smpi_datatype_set_name ( MPI_Datatype  datatype,
char *  name 
)

◆ smpi_datatype_copy()

int smpi_datatype_copy ( void sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void recvbuf,
int  recvcount,
MPI_Datatype  recvtype 
)

◆ serialize_vector()

void serialize_vector ( const void noncontiguous_vector,
void contiguous_vector,
int  count,
void type 
)

◆ unserialize_vector()

void unserialize_vector ( const void contiguous_vector,
void noncontiguous_vector,
int  count,
void type,
MPI_Op  op 
)

◆ smpi_datatype_vector_create()

s_smpi_mpi_vector_t* smpi_datatype_vector_create ( int  block_stride,
int  block_length,
int  block_count,
MPI_Datatype  old_type,
int  size_oldtype 
)

◆ smpi_datatype_create()

void smpi_datatype_create ( MPI_Datatype new_type,
int  size,
int  lb,
int  ub,
int  sizeof_substruct,
void struct_type,
int  flags 
)

◆ smpi_datatype_free()

void smpi_datatype_free ( MPI_Datatype type)

◆ smpi_datatype_use()

void smpi_datatype_use ( MPI_Datatype  type)

◆ smpi_datatype_unuse()

void smpi_datatype_unuse ( MPI_Datatype  type)

◆ serialize_contiguous()

void serialize_contiguous ( const void noncontiguous_hvector,
void contiguous_hvector,
int  count,
void type 
)

◆ unserialize_contiguous()

void unserialize_contiguous ( const void contiguous_vector,
void noncontiguous_vector,
int  count,
void type,
MPI_Op  op 
)

◆ free_contiguous()

void free_contiguous ( MPI_Datatype d)

◆ use_contiguous()

void use_contiguous ( MPI_Datatype d)

◆ smpi_datatype_contiguous_create()

s_smpi_mpi_contiguous_t* smpi_datatype_contiguous_create ( MPI_Aint  lb,
int  block_count,
MPI_Datatype  old_type,
int  size_oldtype 
)

◆ smpi_datatype_contiguous()

int smpi_datatype_contiguous ( int  count,
MPI_Datatype  old_type,
MPI_Datatype new_type,
MPI_Aint  lb 
)

◆ smpi_datatype_vector()

int smpi_datatype_vector ( int  count,
int  blocklen,
int  stride,
MPI_Datatype  old_type,
MPI_Datatype new_type 
)

◆ free_vector()

void free_vector ( MPI_Datatype d)

◆ use_vector()

void use_vector ( MPI_Datatype d)

◆ serialize_hvector()

void serialize_hvector ( const void noncontiguous_hvector,
void contiguous_hvector,
int  count,
void type 
)

◆ unserialize_hvector()

void unserialize_hvector ( const void contiguous_vector,
void noncontiguous_vector,
int  count,
void type,
MPI_Op  op 
)

◆ smpi_datatype_hvector_create()

s_smpi_mpi_hvector_t* smpi_datatype_hvector_create ( MPI_Aint  block_stride,
int  block_length,
int  block_count,
MPI_Datatype  old_type,
int  size_oldtype 
)

◆ free_hvector()

void free_hvector ( MPI_Datatype d)

◆ use_hvector()

void use_hvector ( MPI_Datatype d)

◆ smpi_datatype_hvector()

int smpi_datatype_hvector ( int  count,
int  blocklen,
MPI_Aint  stride,
MPI_Datatype  old_type,
MPI_Datatype new_type 
)

◆ serialize_indexed()

void serialize_indexed ( const void noncontiguous_indexed,
void contiguous_indexed,
int  count,
void type 
)

◆ unserialize_indexed()

void unserialize_indexed ( const void contiguous_indexed,
void noncontiguous_indexed,
int  count,
void type,
MPI_Op  op 
)

◆ free_indexed()

void free_indexed ( MPI_Datatype type)

◆ use_indexed()

void use_indexed ( MPI_Datatype type)

◆ smpi_datatype_indexed_create()

s_smpi_mpi_indexed_t* smpi_datatype_indexed_create ( int *  block_lengths,
int *  block_indices,
int  block_count,
MPI_Datatype  old_type,
int  size_oldtype 
)

◆ smpi_datatype_indexed()

int smpi_datatype_indexed ( int  count,
int *  blocklens,
int *  indices,
MPI_Datatype  old_type,
MPI_Datatype new_type 
)

◆ serialize_hindexed()

void serialize_hindexed ( const void noncontiguous_hindexed,
void contiguous_hindexed,
int  count,
void type 
)

◆ unserialize_hindexed()

void unserialize_hindexed ( const void contiguous_hindexed,
void noncontiguous_hindexed,
int  count,
void type,
MPI_Op  op 
)

◆ free_hindexed()

void free_hindexed ( MPI_Datatype type)

◆ use_hindexed()

void use_hindexed ( MPI_Datatype type)

◆ smpi_datatype_hindexed_create()

s_smpi_mpi_hindexed_t* smpi_datatype_hindexed_create ( int *  block_lengths,
MPI_Aint block_indices,
int  block_count,
MPI_Datatype  old_type,
int  size_oldtype 
)

◆ smpi_datatype_hindexed()

int smpi_datatype_hindexed ( int  count,
int *  blocklens,
MPI_Aint indices,
MPI_Datatype  old_type,
MPI_Datatype new_type 
)

◆ serialize_struct()

void serialize_struct ( const void noncontiguous_struct,
void contiguous_struct,
int  count,
void type 
)

◆ unserialize_struct()

void unserialize_struct ( const void contiguous_struct,
void noncontiguous_struct,
int  count,
void type,
MPI_Op  op 
)

◆ free_struct()

void free_struct ( MPI_Datatype type)

◆ use_struct()

void use_struct ( MPI_Datatype type)

◆ smpi_datatype_struct_create()

s_smpi_mpi_struct_t* smpi_datatype_struct_create ( int *  block_lengths,
MPI_Aint block_indices,
int  block_count,
MPI_Datatype old_types 
)

◆ smpi_datatype_struct()

int smpi_datatype_struct ( int  count,
int *  blocklens,
MPI_Aint indices,
MPI_Datatype old_types,
MPI_Datatype new_type 
)

◆ smpi_datatype_commit()

void smpi_datatype_commit ( MPI_Datatype datatype)

◆ max_func()

static void max_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ min_func()

static void min_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ sum_func()

static void sum_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ prod_func()

static void prod_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ land_func()

static void land_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ lor_func()

static void lor_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ lxor_func()

static void lxor_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ band_func()

static void band_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ bor_func()

static void bor_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ bxor_func()

static void bxor_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ minloc_func()

static void minloc_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ maxloc_func()

static void maxloc_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ replace_func()

static void replace_func ( void a,
void b,
int *  length,
MPI_Datatype datatype 
)
static

◆ CREATE_MPI_OP() [1/13]

CREATE_MPI_OP ( MPI_MAX  ,
max_func   
)

◆ CREATE_MPI_OP() [2/13]

CREATE_MPI_OP ( MPI_MIN  ,
min_func   
)

◆ CREATE_MPI_OP() [3/13]

CREATE_MPI_OP ( MPI_SUM  ,
sum_func   
)

◆ CREATE_MPI_OP() [4/13]

CREATE_MPI_OP ( MPI_PROD  ,
prod_func   
)

◆ CREATE_MPI_OP() [5/13]

CREATE_MPI_OP ( MPI_LAND  ,
land_func   
)

◆ CREATE_MPI_OP() [6/13]

CREATE_MPI_OP ( MPI_LOR  ,
lor_func   
)

◆ CREATE_MPI_OP() [7/13]

CREATE_MPI_OP ( MPI_LXOR  ,
lxor_func   
)

◆ CREATE_MPI_OP() [8/13]

CREATE_MPI_OP ( MPI_BAND  ,
band_func   
)

◆ CREATE_MPI_OP() [9/13]

CREATE_MPI_OP ( MPI_BOR  ,
bor_func   
)

◆ CREATE_MPI_OP() [10/13]

CREATE_MPI_OP ( MPI_BXOR  ,
bxor_func   
)

◆ CREATE_MPI_OP() [11/13]

CREATE_MPI_OP ( MPI_MAXLOC  ,
maxloc_func   
)

◆ CREATE_MPI_OP() [12/13]

CREATE_MPI_OP ( MPI_MINLOC  ,
minloc_func   
)

◆ CREATE_MPI_OP() [13/13]

CREATE_MPI_OP ( MPI_REPLACE  ,
replace_func   
)

◆ smpi_op_new()

MPI_Op smpi_op_new ( MPI_User_function function,
bool  commute 
)

◆ smpi_op_is_commute()

bool smpi_op_is_commute ( MPI_Op  op)

◆ smpi_op_destroy()

void smpi_op_destroy ( MPI_Op  op)

◆ smpi_op_apply()

void smpi_op_apply ( MPI_Op  op,
const void invec,
void inoutvec,
int *  len,
MPI_Datatype datatype 
)

◆ smpi_type_attr_delete()

int smpi_type_attr_delete ( MPI_Datatype  type,
int  keyval 
)

◆ smpi_type_attr_get()

int smpi_type_attr_get ( MPI_Datatype  type,
int  keyval,
void attr_value,
int *  flag 
)

◆ smpi_type_attr_put()

int smpi_type_attr_put ( MPI_Datatype  type,
int  keyval,
void attr_value 
)

◆ smpi_type_keyval_create()

int smpi_type_keyval_create ( MPI_Type_copy_attr_function copy_fn,
MPI_Type_delete_attr_function delete_fn,
int *  keyval,
void extra_state 
)

◆ smpi_type_keyval_free()

int smpi_type_keyval_free ( int *  keyval)

◆ smpi_mpi_pack()

int smpi_mpi_pack ( void inbuf,
int  incount,
MPI_Datatype  type,
void outbuf,
int  outcount,
int *  position,
MPI_Comm  comm 
)

◆ smpi_mpi_unpack()

int smpi_mpi_unpack ( void inbuf,
int  insize,
int *  position,
void outbuf,
int  outcount,
MPI_Datatype  type,
MPI_Comm  comm 
)

Variable Documentation

◆ smpi_type_keyvals

xbt_dict_t smpi_type_keyvals = nullptr

◆ type_keyval_id

int type_keyval_id =0