Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't mark as truncated probe requests (and get rid of unused flag)
authorAugustin Degomme <adegomme@users.noreply.github.com>
Thu, 18 Feb 2021 07:39:55 +0000 (08:39 +0100)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Thu, 18 Feb 2021 07:39:55 +0000 (08:39 +0100)
src/smpi/include/private.hpp
src/smpi/mpi/smpi_request.cpp

index 5cd3bbf..cb38feb 100644 (file)
@@ -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;
index 519b0e0..b250536 100644 (file)
@@ -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 *