X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/15badc71ce964f6dae6428c9a4c0198fad5d4936..1687df79d61a9418bba830bbd0ab7de16e457090:/src/smpi/colls/allgather-3dmesh.c diff --git a/src/smpi/colls/allgather-3dmesh.c b/src/smpi/colls/allgather-3dmesh.c index dfd2ace9e6..ab964a1388 100644 --- a/src/smpi/colls/allgather-3dmesh.c +++ b/src/smpi/colls/allgather-3dmesh.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #include "colls_private.h" /***************************************************************************** @@ -97,13 +103,15 @@ int smpi_coll_tuned_allgather_3dmesh(void *send_buff, int send_count, int i, src, dst, rank, num_procs, block_size, my_z_base; int my_z, X, Y, Z, send_offset, recv_offset; int two_dsize, my_row_base, my_col_base, src_row_base, src_z_base, num_reqs; - int tag = 1; + int tag = COLL_TAG_ALLGATHER; rank = smpi_comm_rank(comm); num_procs = smpi_comm_size(comm); extent = smpi_datatype_get_extent(send_type); - is_3dmesh(num_procs, &X, &Y, &Z); + if (!is_3dmesh(num_procs, &X, &Y, &Z)) + THROWF(arg_error,0, "allgather_3dmesh algorithm can't be used with this number of processes! "); + num_reqs = X;