From: Augustin Degomme Date: Fri, 12 Jul 2013 16:13:01 +0000 (+0200) Subject: remove MPI_COMM_WORLD references from star-mpi collectives X-Git-Tag: v3_9_90~147 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/84f6ab110aa0bbbb1c02733c276c5ef72d65935e remove MPI_COMM_WORLD references from star-mpi collectives --- diff --git a/src/smpi/colls/allreduce-NTS.c b/src/smpi/colls/allreduce-NTS.c index 51e3aed190..85c790b1f8 100644 --- a/src/smpi/colls/allreduce-NTS.c +++ b/src/smpi/colls/allreduce-NTS.c @@ -20,8 +20,8 @@ smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount, int send_offset, recv_offset; int remainder, remainder_flag, remainder_offset; - rank = smpi_comm_rank(MPI_COMM_WORLD); - size = smpi_comm_size(MPI_COMM_WORLD); + rank = smpi_comm_rank(comm); + size = smpi_comm_size(comm); /* make it compatible with all data type */ MPI_Aint extent; diff --git a/src/smpi/colls/allreduce-lr.c b/src/smpi/colls/allreduce-lr.c index 9bb4149289..664c7079e4 100644 --- a/src/smpi/colls/allreduce-lr.c +++ b/src/smpi/colls/allreduce-lr.c @@ -23,8 +23,8 @@ smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount, int send_offset, recv_offset; int remainder, remainder_flag, remainder_offset; - rank = smpi_comm_rank(MPI_COMM_WORLD); - size = smpi_comm_size(MPI_COMM_WORLD); + rank = smpi_comm_rank(comm); + size = smpi_comm_size(comm); /* make it compatible with all data type */ MPI_Aint extent; diff --git a/src/smpi/colls/bcast-NTSB.c b/src/smpi/colls/bcast-NTSB.c index 4ebfc15087..1af70f62e9 100644 --- a/src/smpi/colls/bcast-NTSB.c +++ b/src/smpi/colls/bcast-NTSB.c @@ -18,8 +18,8 @@ int smpi_coll_tuned_bcast_NTSB(void *buf, int count, MPI_Datatype datatype, MPI_Aint extent; extent = smpi_datatype_get_extent(datatype); - rank = smpi_comm_rank(MPI_COMM_WORLD); - size = smpi_comm_size(MPI_COMM_WORLD); + rank = smpi_comm_rank(comm); + size = smpi_comm_size(comm); /* source node and destination nodes (same through out the functions) */ int from = (rank - 1) / 2; diff --git a/src/smpi/colls/bcast-NTSL-Isend.c b/src/smpi/colls/bcast-NTSL-Isend.c index ecdcdc71f6..70edbef4c1 100644 --- a/src/smpi/colls/bcast-NTSL-Isend.c +++ b/src/smpi/colls/bcast-NTSL-Isend.c @@ -20,8 +20,8 @@ int smpi_coll_tuned_bcast_NTSL_Isend(void *buf, int count, MPI_Datatype datatype MPI_Aint extent; extent = smpi_datatype_get_extent(datatype); - rank = smpi_comm_rank(MPI_COMM_WORLD); - size = smpi_comm_size(MPI_COMM_WORLD); + rank = smpi_comm_rank(comm); + size = smpi_comm_size(comm); /* source node and destination nodes (same through out the functions) */ int to = (rank + 1) % size; diff --git a/src/smpi/colls/bcast-NTSL.c b/src/smpi/colls/bcast-NTSL.c index 53a7d76cc7..23a51bcca6 100644 --- a/src/smpi/colls/bcast-NTSL.c +++ b/src/smpi/colls/bcast-NTSL.c @@ -20,8 +20,8 @@ int smpi_coll_tuned_bcast_NTSL(void *buf, int count, MPI_Datatype datatype, MPI_Aint extent; extent = smpi_datatype_get_extent(datatype); - rank = smpi_comm_rank(MPI_COMM_WORLD); - size = smpi_comm_size(MPI_COMM_WORLD); + rank = smpi_comm_rank(comm); + size = smpi_comm_size(comm); /* source node and destination nodes (same through out the functions) */ int to = (rank + 1) % size; diff --git a/src/smpi/colls/bcast-arrival-nb.c b/src/smpi/colls/bcast-arrival-nb.c index e1de48c623..84a06aed55 100644 --- a/src/smpi/colls/bcast-arrival-nb.c +++ b/src/smpi/colls/bcast-arrival-nb.c @@ -39,8 +39,8 @@ int smpi_coll_tuned_bcast_arrival_nb(void *buf, int count, - rank = smpi_comm_rank(MPI_COMM_WORLD); - size = smpi_comm_size(MPI_COMM_WORLD); + rank = smpi_comm_rank(comm); + size = smpi_comm_size(comm); /* segment is segment size in number of elements (not bytes) */ @@ -84,7 +84,7 @@ int smpi_coll_tuned_bcast_arrival_nb(void *buf, int count, // for (j=0;j<1000;j++) { for (i = 1; i < size; i++) { if (already_sent[i] == 0) - smpi_mpi_iprobe(i, MPI_ANY_TAG, MPI_COMM_WORLD, &flag_array[i], + smpi_mpi_iprobe(i, MPI_ANY_TAG, comm, &flag_array[i], MPI_STATUSES_IGNORE); } //} @@ -95,7 +95,7 @@ int smpi_coll_tuned_bcast_arrival_nb(void *buf, int count, /* message arrive */ if ((flag_array[i] == 1) && (already_sent[i] == 0)) { - smpi_mpi_recv(temp_buf, 1, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status); + smpi_mpi_recv(temp_buf, 1, MPI_CHAR, i, tag, comm, &status); header_buf[header_index] = i; header_index++; sent_count++; @@ -134,7 +134,7 @@ int smpi_coll_tuned_bcast_arrival_nb(void *buf, int count, } /* while loop */ for(i=0; i