Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
avoid potential problems when tracing comms coming from any source,
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 14 Nov 2013 18:02:28 +0000 (19:02 +0100)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 14 Nov 2013 18:08:14 +0000 (19:08 +0100)
whithout using status to track its origin.

src/smpi/smpi_pmpi.c

index 9206f28..ac393b2 100644 (file)
@@ -1230,9 +1230,11 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
 
 #ifdef HAVE_TRACING
   //the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
-  if(status!=MPI_STATUS_IGNORE)src_traced = smpi_group_index(smpi_comm_group(comm), status->MPI_SOURCE);
+  if(status!=MPI_STATUS_IGNORE){
+    src_traced = smpi_group_index(smpi_comm_group(comm), status->MPI_SOURCE);
+    TRACE_smpi_recv(rank, src_traced, rank);
+  }
   TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
-  TRACE_smpi_recv(rank, src_traced, rank);
 #endif
   }