From a42073f00b0b5c4a806cdd5a4708cdfbd7799fc4 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Thu, 18 Feb 2021 08:39:55 +0100 Subject: [PATCH] don't mark as truncated probe requests (and get rid of unused flag) --- src/smpi/include/private.hpp | 2 +- src/smpi/mpi/smpi_request.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/smpi/include/private.hpp b/src/smpi/include/private.hpp index 5cd3bbf979..cb38feb9ba 100644 --- a/src/smpi/include/private.hpp +++ b/src/smpi/include/private.hpp @@ -17,7 +17,7 @@ constexpr unsigned MPI_REQ_PERSISTENT = 0x1; constexpr unsigned MPI_REQ_NON_PERSISTENT = 0x2; constexpr unsigned MPI_REQ_SEND = 0x4; constexpr unsigned MPI_REQ_RECV = 0x8; -constexpr unsigned MPI_REQ_RECV_DELETE = 0x10; +constexpr unsigned MPI_REQ_PROBE = 0x10; constexpr unsigned MPI_REQ_ISEND = 0x20; constexpr unsigned MPI_REQ_SSEND = 0x40; constexpr unsigned MPI_REQ_PREPARED = 0x80; diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 519b0e0abc..b250536da4 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -118,7 +118,7 @@ bool Request::match_common(MPI_Request req, MPI_Request sender, MPI_Request rece receiver->real_src_ = sender->src_; if (receiver->tag_ == MPI_ANY_TAG) receiver->real_tag_ = sender->tag_; - if (receiver->real_size_ < sender->real_size_){ + if (receiver->real_size_ < sender->real_size_ && ((receiver->flags_ & MPI_REQ_PROBE) == 0 )){ XBT_DEBUG("Truncating message - should not happen: receiver size : %zu < sender size : %zu", receiver->real_size_, sender->real_size_); receiver->truncated_ = true; } @@ -765,7 +765,7 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* double maxrate = smpi_cfg_iprobe_cpu_usage(); auto request = new Request(nullptr, 0, MPI_CHAR, source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(), - simgrid::s4u::this_actor::get_pid(), tag, comm, MPI_REQ_PERSISTENT | MPI_REQ_RECV); + simgrid::s4u::this_actor::get_pid(), tag, comm, MPI_REQ_PERSISTENT | MPI_REQ_RECV | MPI_REQ_PROBE); if (smpi_iprobe_sleep > 0) { /** Compute the number of flops we will sleep **/ s4u::this_actor::exec_init(/*nsleeps: See comment above */ nsleeps * -- 2.20.1