5 int MPI_Init(int *argc, char ***argv)
19 // right now this just exits the current node, should send abort signal to all
20 // hosts in the communicator;
21 int MPI_Abort(MPI_Comm comm, int errorcode)
28 int MPI_Comm_size(MPI_Comm comm, int *size)
30 int retval = MPI_SUCCESS;
35 retval = MPI_ERR_COMM;
36 } else if (NULL == size) {
47 int MPI_Comm_rank(MPI_Comm comm, int *rank)
49 int retval = MPI_SUCCESS;
54 retval = MPI_ERR_COMM;
55 } else if (NULL == rank) {
58 *rank = smpi_comm_rank(comm, SIMIX_host_self());
66 int MPI_Type_size(MPI_Datatype datatype, size_t *size)
68 int retval = MPI_SUCCESS;
72 if (NULL == datatype) {
73 retval = MPI_ERR_TYPE;
74 } else if (NULL == size) {
77 *size = datatype->size;
85 int MPI_Barrier(MPI_Comm comm)
93 int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request *request)
95 int retval = MPI_SUCCESS;
98 dst = smpi_mpi_comm_rank_self(comm);
99 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, request);
100 if (NULL != *request) {
101 smpi_irecv(*request);
107 int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status)
109 int retval = MPI_SUCCESS;
111 smpi_mpi_request_t *request;
113 dst = smpi_mpi_comm_rank_self(comm);
114 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &request);
115 if (NULL != request) {
117 smpi_wait(request, status);
125 int MPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request *request)
127 int retval = MPI_SUCCESS;
130 src = smpi_mpi_comm_rank_self(comm);
131 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, request);
132 if (NULL != *request) {
133 smpi_isend(*request);
139 int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
141 int retval = MPI_SUCCESS;
143 smpi_mpi_request_t *request;
145 src = smpi_mpi_comm_rank_self(comm);
146 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &request);
147 if (NULL != request) {
149 smpi_wait(request, MPI_STATUS_IGNORE);