Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add check for collectives, using check_collectives_ordering utility.
[simgrid.git] / src / smpi / include / private.hpp
index 7d1fa6c..9b2a516 100644 (file)
@@ -582,6 +582,10 @@ XBT_PRIVATE void private_execute_flops(double flops);
 #define CHECK_COMM2(num, comm)\
   CHECK_MPI_NULL((num), MPI_COMM_NULL, MPI_ERR_COMM, (comm))
 
+#define CHECK_COLLECTIVE(comm, call)\
+  CHECK_ARGS((simgrid::smpi::utils::check_collectives_ordering((comm), std::string(call)) != MPI_SUCCESS), MPI_ERR_OTHER,\
+                   "%s: collective mismatch", call)
+
 #define CHECK_DELETED(num, err, obj)\
   CHECK_ARGS((obj)->deleted(), (err), "%s: param %d %s has already been freed", __func__, (num),\
   _XBT_STRINGIFY(obj))