From 7387c7850c108e54781753c306fce5977847e86f Mon Sep 17 00:00:00 2001 From: schnorr Date: Thu, 14 Oct 2010 16:14:09 +0000 Subject: [PATCH] using mpi_comm_world to get the global rank git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8428 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/smpi/smpi_mpi.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/smpi/smpi_mpi.c b/src/smpi/smpi_mpi.c index 0f08ff8b35..bc4b3cb855 100644 --- a/src/smpi/smpi_mpi.c +++ b/src/smpi/smpi_mpi.c @@ -1085,14 +1085,7 @@ int MPI_Waitany(int count, MPI_Request requests[], int *index, xbt_dynar_insert_at(recvs, i, t); } } - - //search for a suitable request to give the rank of current mpi proc - MPI_Request req = NULL; - for (i = 0; i < count && req == NULL; i++) { - req = requests[i]; - } - MPI_Comm comm = (req)->comm; - int rank_traced = smpi_comm_rank(comm); + int rank_traced = smpi_comm_rank(MPI_COMM_WORLD); TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__); #endif if (index == NULL) { @@ -1141,14 +1134,7 @@ int MPI_Waitall(int count, MPI_Request requests[], MPI_Status status[]) xbt_dynar_insert_at(dsts, i, adst); xbt_dynar_insert_at(recvs, i, arecv); } - -// find my rank inside one of MPI_Comm's of the requests - MPI_Request req = NULL; - for (i = 0; i < count && req == NULL; i++) { - req = requests[i]; - } - MPI_Comm comm = (req)->comm; - int rank_traced = smpi_comm_rank(comm); + int rank_traced = smpi_comm_rank (MPI_COMM_WORLD); TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__); #endif smpi_mpi_waitall(count, requests, status); -- 2.20.1