Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
protect (hopefully) collective communication algorithms from abuse.
[simgrid.git] / src / smpi / colls / bcast-SMP-binomial.c
index 9919302..2239960 100644 (file)
@@ -11,11 +11,14 @@ int smpi_coll_tuned_bcast_SMP_binomial(void *buf, int count,
   int size;
   int rank;
   MPI_Status status;
-  int tag = 50;
+  int tag = COLL_TAG_BCAST;
 
   size = smpi_comm_size(comm);
   rank = smpi_comm_rank(comm);
 
+  if(size%NUM_CORE)
+    THROWF(arg_error,0, "bcast SMP binomial can't be used with non multiple of NUM_CORE=%d number of processes ! ",NUM_CORE);
+
   int to_intra, to_inter;
   int from_intra, from_inter;
   int inter_rank = rank / NUM_CORE;