Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix bug on MPI_Recv when MPI_IGNORE_STATUS is used with MPI_PROC_NULL as a sender
authorAugustin Degomme <augustin.degomme@unibas.ch>
Thu, 3 May 2018 16:36:38 +0000 (18:36 +0200)
committerAugustin Degomme <augustin.degomme@unibas.ch>
Thu, 3 May 2018 16:36:38 +0000 (18:36 +0200)
src/smpi/bindings/smpi_pmpi_request.cpp

index 458f7f9..4e98afb 100644 (file)
@@ -311,8 +311,10 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI
   if (comm == MPI_COMM_NULL) {
     retval = MPI_ERR_COMM;
   } else if (src == MPI_PROC_NULL) {
   if (comm == MPI_COMM_NULL) {
     retval = MPI_ERR_COMM;
   } else if (src == MPI_PROC_NULL) {
-    simgrid::smpi::Status::empty(status);
-    status->MPI_SOURCE = MPI_PROC_NULL;
+    if(status != MPI_STATUS_IGNORE){
+      simgrid::smpi::Status::empty(status);
+      status->MPI_SOURCE = MPI_PROC_NULL;
+    }
     retval = MPI_SUCCESS;
   } else if (src!=MPI_ANY_SOURCE && (src >= comm->group()->size() || src <0)){
     retval = MPI_ERR_RANK;
     retval = MPI_SUCCESS;
   } else if (src!=MPI_ANY_SOURCE && (src >= comm->group()->size() || src <0)){
     retval = MPI_ERR_RANK;