X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1830ec873b286ded8981e8fb3327715d1e6a737f..5bd175db106a40f35d99c26bb77276b29343646d:/src/smpi/bindings/smpi_mpi.cpp?ds=sidebyside diff --git a/src/smpi/bindings/smpi_mpi.cpp b/src/smpi/bindings/smpi_mpi.cpp index fda923adb0..99bf418d8a 100644 --- a/src/smpi/bindings/smpi_mpi.cpp +++ b/src/smpi/bindings/smpi_mpi.cpp @@ -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 */ @@ -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))