X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1d18e615eaa617d3354bc22dfbe711d34be9f902..078e59c8562f1a12a828b8197689c1843d0b6e07:/src/smpi/colls/allgather-2dmesh.c diff --git a/src/smpi/colls/allgather-2dmesh.c b/src/smpi/colls/allgather-2dmesh.c index b5f50420e0..602d540e11 100644 --- a/src/smpi/colls/allgather-2dmesh.c +++ b/src/smpi/colls/allgather-2dmesh.c @@ -110,7 +110,7 @@ smpi_coll_tuned_allgather_2dmesh(void *send_buff, int send_count, MPI_Datatype int i, src, dst, rank, num_procs; int X, Y, send_offset, recv_offset; int my_row_base, my_col_base, src_row_base, block_size, num_reqs; - int tag = 1; + int tag = COLL_TAG_ALLGATHER; rank = smpi_comm_rank(comm); num_procs = smpi_comm_size(comm); @@ -119,7 +119,9 @@ smpi_coll_tuned_allgather_2dmesh(void *send_buff, int send_count, MPI_Datatype block_size = extent * send_count; - is_2dmesh(num_procs, &X, &Y); + if (!is_2dmesh(num_procs, &X, &Y)) + return MPI_ERR_COMM; + my_row_base = (rank / Y) * Y; my_col_base = rank % Y;