Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add support for MPI_Irsend
[simgrid.git] / src / smpi / bindings / smpi_mpi.cpp
index fda923a..9f5700e 100644 (file)
@@ -30,12 +30,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)
   type name args                                                                                                       \
   {                                                                                                                    \
     XBT_VERB("SMPI - Entering %s", __func__);                                                                          \
-    type ret = P##name args2;                                                                                         \
-    if(ret!=MPI_SUCCESS) {                                                                                             \
+    type ret = _XBT_CONCAT(P, name) args2;                                                                             \
+    if (ret != MPI_SUCCESS) {                                                                                          \
       char error_string[MPI_MAX_ERROR_STRING];                                                                         \
       int error_size;                                                                                                  \
       PMPI_Error_string(ret, error_string, &error_size);                                                               \
-      XBT_WARN("%s - returned %.*s instead of MPI_SUCCESS", __func__, error_size,error_string);                       \
+      XBT_WARN("%s - returned %.*s instead of MPI_SUCCESS", __func__, error_size, error_string);                       \
     }                                                                                                                  \
     XBT_VERB("SMPI - Leaving %s", __func__);                                                                           \
     return ret;                                                                                                        \
@@ -45,27 +45,18 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)
   type name args                                                                                                       \
   {                                                                                                                    \
     XBT_VERB("SMPI - Entering %s", __func__);                                                                          \
-    type ret = P##name args2;                                                                                          \
+    type ret = _XBT_CONCAT(P, name) args2;                                                                             \
     XBT_VERB("SMPI - Leaving %s", __func__);                                                                           \
     return ret;                                                                                                        \
   }
 
-#define UNIMPLEMENTED_WRAPPED_PMPI_CALL(type,name,args,args2) \
-type P##name args { \
-NOT_YET_IMPLEMENTED \
-}\
-type name args { \
-return P##name args2 ; \
-}\
-
-#define UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(type,name,args,args2) \
-type P##name args { \
-NOT_YET_IMPLEMENTED_NOFAIL \
-}\
-type name args { \
-return P##name args2 ; \
-}\
+#define UNIMPLEMENTED_WRAPPED_PMPI_CALL(type, name, args, args2)                                                       \
+  type _XBT_CONCAT(P, name) args { NOT_YET_IMPLEMENTED }                                                               \
+  type name args { return _XBT_CONCAT(P, name) args2; }
 
+#define UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(type, name, args, args2)                                                \
+  type _XBT_CONCAT(P, name) args { NOT_YET_IMPLEMENTED_NOFAIL }                                                        \
+  type name args { return _XBT_CONCAT(P, name) args2; }
 
 /* MPI User level calls */
 
@@ -180,6 +171,7 @@ WRAPPED_PMPI_CALL(int,MPI_Iprobe,(int source, int tag, MPI_Comm comm, int* flag,
 WRAPPED_PMPI_CALL(int,MPI_Irecv,(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request * request),(buf, count, datatype, src, tag, comm, request))
 WRAPPED_PMPI_CALL(int,MPI_Isend,(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request * request),(buf, count, datatype, dst, tag, comm, request))
 WRAPPED_PMPI_CALL(int,MPI_Issend,(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) ,(buf, count, datatype, dest, tag, comm, request))
+WRAPPED_PMPI_CALL(int,MPI_Irsend,(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request),(buf, count, datatype, dest, tag, comm, request))
 WRAPPED_PMPI_CALL(int,MPI_Is_thread_main,(int *flag),(flag))
 WRAPPED_PMPI_CALL(int,MPI_Keyval_create,(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_fn, int* keyval, void* extra_state) ,(copy_fn, delete_fn, keyval, extra_state))
 WRAPPED_PMPI_CALL(int,MPI_Keyval_free,(int* keyval) ,(keyval))
@@ -412,7 +404,6 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Graph_neighbors,(MPI_Comm comm, int rank
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Ibsend,(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) ,(buf, count, datatype, dest, tag, comm, request))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Intercomm_create,(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag,MPI_Comm* comm_out) ,(local_comm, local_leader, peer_comm, remote_leader, tag, comm_out))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Intercomm_merge,(MPI_Comm comm, int high, MPI_Comm* comm_out) ,(comm, high, comm_out))
-UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Irsend,(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request) ,(buf, count, datatype, dest, tag, comm, request))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Lookup_name,( char *service_name, MPI_Info info, char *port_name),( service_name, info, port_name))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Open_port,( MPI_Info info, char *port_name),( info,port_name))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Pack_external,(char *datarep, void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outcount, MPI_Aint *position),(datarep, inbuf, incount, datatype, outbuf, outcount, position))
@@ -436,4 +427,4 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Fint, MPI_Errhandler_c2f,(MPI_Errhand
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Mprobe,(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status* status) ,(source, tag, comm, message, status))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Mrecv,(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status* status),(buf, count, datatype, message, status))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Improbe,(int source, int tag, MPI_Comm comm, int* flag, MPI_Message *message, MPI_Status* status) ,(source, tag, comm, flag, message, status))
-UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Imrecv,(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request),(buf, count, datatype, message, request))
\ No newline at end of file
+UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Imrecv,(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request),(buf, count, datatype, message, request))