Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
we need to check comm is not null before trying for the rank, duh..
authorAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 09:34:18 +0000 (11:34 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 18:03:31 +0000 (20:03 +0200)
src/smpi/bindings/smpi_pmpi_request.cpp

index 9ef11e6..9e2dc56 100644 (file)
@@ -22,10 +22,10 @@ static int getPid(MPI_Comm comm, int id)
   CHECK_BUFFER(1, buf, count)\
   CHECK_COUNT(2, count)\
   CHECK_TYPE(3, datatype)\
+  CHECK_COMM(6)\
   if(dst!= MPI_PROC_NULL)\
     CHECK_RANK(4, dst, comm)\
-  CHECK_TAG(5, tag)\
-  CHECK_COMM(6)\
+  CHECK_TAG(5, tag)
 
 #define CHECK_ISEND_INPUTS\
   CHECK_REQUEST(7)\
@@ -38,10 +38,10 @@ static int getPid(MPI_Comm comm, int id)
   CHECK_BUFFER(1, buf, count)\
   CHECK_COUNT(2, count)\
   CHECK_TYPE(3, datatype)\
+  CHECK_COMM(6)\
   if(src!=MPI_ANY_SOURCE && src!=MPI_PROC_NULL)\
     CHECK_RANK(4, src, comm)\
-  CHECK_TAG(5, tag)\
-  CHECK_COMM(6)
+  CHECK_TAG(5, tag)
 /* PMPI User level calls */
 
 int PMPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request * request)