Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't use positive tags for internal messages.
authorAugustin Degomme <adegomme@gmail.com>
Thu, 9 May 2019 23:37:23 +0000 (01:37 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Tue, 14 May 2019 10:03:50 +0000 (12:03 +0200)
They could interfere with receives posted with MPI_ANY_TAG in user's code

src/smpi/colls/bcast/bcast-arrival-scatter.cpp
src/smpi/mpi/smpi_comm.cpp

index 7d51422..7891c76 100644 (file)
@@ -21,7 +21,7 @@ int Coll_bcast_arrival_scatter::bcast(void *buf, int count,
                                           MPI_Comm comm)
 {
   int tag = -COLL_TAG_BCAST;//in order to use ANY_TAG, make this one positive
-  int header_tag = 10;
+  int header_tag = -10;
   MPI_Status status;
 
   int curr_remainder;
index 5bdf88d..7f51e7e 100644 (file)
@@ -212,7 +212,7 @@ MPI_Comm Comm::split(int color, int key)
 {
   if (this == MPI_COMM_UNINITIALIZED)
     return smpi_process()->comm_world()->split(color, key);
-  int system_tag = 123;
+  int system_tag = -123;
   int* recvbuf;
 
   MPI_Group group_root = nullptr;