Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix return value to MPI_UNDEFINED.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 8 Feb 2021 13:56:21 +0000 (14:56 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 9 Feb 2021 10:55:24 +0000 (11:55 +0100)
src/smpi/mpi/smpi_request.cpp

index 2bea2e8..3bd2db0 100644 (file)
@@ -996,13 +996,12 @@ int Request::waitany(int count, MPI_Request requests[], MPI_Status * status)
     }
     if (not comms.empty()) {
       XBT_DEBUG("Enter waitany for %zu comms", comms.size());
-      int i=MPI_UNDEFINED;
+      int i;
       try{
-        // this is not a detached send
         i = simcall_comm_waitany(comms.data(), comms.size(), -1);
       } catch (const Exception&) {
-        XBT_INFO("request %d cancelled ", i);
-        return i;
+        XBT_INFO("request cancelled ");
+        i = -1;
       }
 
       // not MPI_UNDEFINED, as this is a simix return code