+// smpi mpi communicator
+typedef struct smpi_mpi_communicator_t {
+ int size;
+ int barrier_count;
+ smx_mutex_t barrier_mutex;
+ smx_cond_t barrier_cond;
+
+ int *rank_to_index_map;
+ int *index_to_rank_map;
+
+} s_smpi_mpi_communicator_t;
+
+// smpi mpi datatype
+typedef struct smpi_mpi_datatype_t {
+ size_t size;
+} s_smpi_mpi_datatype_t;
+
+// smpi mpi request
+typedef struct smpi_mpi_request_t {
+ smpi_mpi_communicator_t comm;
+ int src;
+ int dst;
+ int tag;
+
+ void *buf;
+ int count;
+ smpi_mpi_datatype_t datatype;
+
+ short int completed :1;
+
+ smx_mutex_t mutex;
+ smx_cond_t cond;
+
+ void *data;
+ int forward;
+
+} s_smpi_mpi_request_t;
+
+// smpi mpi op
+typedef struct smpi_mpi_op_t {
+ void (*func)(void *a, void *b, int *length, MPI_Datatype *datatype);
+} s_smpi_mpi_op_t;
+
+// smpi received message
+typedef struct smpi_received_message_t {
+ smpi_mpi_communicator_t comm;
+ int src;
+ int tag;
+
+ void *buf;
+
+ void *data;
+ int forward;
+
+} s_smpi_received_message_t;
+typedef struct smpi_received_message_t *smpi_received_message_t;
+
+typedef struct smpi_do_once_duration_node_t {
+ char *file;
+ int line;
+ double duration;
+ struct smpi_do_once_duration_node_t *next;
+} s_smpi_do_once_duration_node_t;
+typedef struct smpi_do_once_duration_node_t *smpi_do_once_duration_node_t;
+
+typedef struct smpi_global_t {