From bef10718ac2d3f0e44ef52ca18e699896fd50228 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Fri, 10 May 2019 01:37:23 +0200 Subject: [PATCH] Don't use positive tags for internal messages. They could interfere with receives posted with MPI_ANY_TAG in user's code --- src/smpi/colls/bcast/bcast-arrival-scatter.cpp | 2 +- src/smpi/mpi/smpi_comm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smpi/colls/bcast/bcast-arrival-scatter.cpp b/src/smpi/colls/bcast/bcast-arrival-scatter.cpp index 7d51422f44..7891c76302 100644 --- a/src/smpi/colls/bcast/bcast-arrival-scatter.cpp +++ b/src/smpi/colls/bcast/bcast-arrival-scatter.cpp @@ -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; diff --git a/src/smpi/mpi/smpi_comm.cpp b/src/smpi/mpi/smpi_comm.cpp index 5bdf88d4f5..7f51e7e86c 100644 --- a/src/smpi/mpi/smpi_comm.cpp +++ b/src/smpi/mpi/smpi_comm.cpp @@ -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; -- 2.20.1