3 int MPI_Init(int *argc, char ***argv)
17 // right now this just exits the current node, should send abort signal to all
18 // hosts in the communicator;
19 int MPI_Abort(MPI_Comm comm, int errorcode)
26 int MPI_Comm_size(MPI_Comm comm, int *size)
28 int retval = MPI_SUCCESS;
33 retval = MPI_ERR_COMM;
34 } else if (NULL == size) {
45 int MPI_Comm_rank(MPI_Comm comm, int *rank)
47 int retval = MPI_SUCCESS;
52 retval = MPI_ERR_COMM;
53 } else if (NULL == rank) {
56 *rank = smpi_comm_rank(comm, SIMIX_host_self());
64 int MPI_Type_size(MPI_Datatype datatype, size_t *size)
66 int retval = MPI_SUCCESS;
70 if (NULL == datatype) {
71 retval = MPI_ERR_TYPE;
72 } else if (NULL == size) {
75 *size = datatype->size;
83 int MPI_Barrier(MPI_Comm comm)
91 int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request *request)
93 int retval = MPI_SUCCESS;
96 dst = smpi_mpi_comm_rank_self(comm);
97 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, request);
98 if (NULL != *request) {
105 int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status *status)
107 int retval = MPI_SUCCESS;
109 smpi_mpi_request_t *request;
111 dst = smpi_mpi_comm_rank_self(comm);
112 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &request);
113 if (NULL != request) {
115 smpi_wait(request, status);
123 int MPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request *request)
125 int retval = MPI_SUCCESS;
128 src = smpi_mpi_comm_rank_self(comm);
129 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, request);
130 if (NULL != *request) {
131 smpi_isend(*request);
137 int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
139 int retval = MPI_SUCCESS;
141 smpi_mpi_request_t *request;
143 src = smpi_mpi_comm_rank_self(comm);
144 retval = smpi_create_request(buf, count, datatype, src, dst, tag, comm, &request);
145 if (NULL != request) {
147 smpi_wait(request, MPI_STATUS_IGNORE);