Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
protect (hopefully) collective communication algorithms from abuse.
[simgrid.git] / src / smpi / colls / allgather-loosely-lr.c
index 6455db1..7abe6e0 100644 (file)
@@ -10,12 +10,16 @@ int smpi_coll_tuned_allgather_loosely_lr(void *sbuf, int scount,
                                          MPI_Comm comm)
 {
   int comm_size, rank;
-  int tag = 50;
+  int tag = COLL_TAG_ALLGATHER;
   int i, j, send_offset, recv_offset;
   int intra_rank, inter_rank, inter_comm_size, intra_comm_size;
   int inter_dst, inter_src;
 
   comm_size = smpi_comm_size(comm);
+
+  if(comm_size%4)
+    THROWF(arg_error,0, "allgather loosely lr algorithm can't be used with non multiple of NUM_CORE=4 number of processes ! ");
+
   rank = smpi_comm_rank(comm);
   MPI_Aint rextent, sextent;
   rextent = smpi_datatype_get_extent(rtype);