Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
protect (hopefully) collective communication algorithms from abuse.
[simgrid.git] / src / smpi / colls / bcast-SMP-linear.c
index 673f6cf..092ab26 100644 (file)
@@ -9,7 +9,7 @@ int smpi_coll_tuned_bcast_SMP_linear(void *buf, int count,
                                      MPI_Datatype datatype, int root,
                                      MPI_Comm comm)
 {
-  int tag = 5000;
+  int tag = COLL_TAG_BCAST;
   MPI_Status status;
   MPI_Request request;
   MPI_Request *request_array;
@@ -22,6 +22,9 @@ int smpi_coll_tuned_bcast_SMP_linear(void *buf, int count,
   rank = smpi_comm_rank(comm);
   size = smpi_comm_size(comm);
 
+  if(size%NUM_CORE)
+    THROWF(arg_error,0, "bcast SMP linear can't be used with non multiple of NUM_CORE=%d number of processes ! ",NUM_CORE);
+
   int segment = bcast_SMP_linear_segment_byte / extent;
   int pipe_length = count / segment;
   int remainder = count % segment;