Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
check that we are not using RMA-reserved MPI_Op in non-RMA calls.
authorAugustin Degomme <adegomme@users.noreply.github.com>
Mon, 7 Jun 2021 15:12:45 +0000 (17:12 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Mon, 7 Jun 2021 21:27:42 +0000 (23:27 +0200)
src/smpi/include/private.hpp

index e663ba5..d80b304 100644 (file)
@@ -632,6 +632,8 @@ XBT_PRIVATE void private_execute_flops(double flops);
 #define CHECK_OP(num, op, type)\
   {\
   CHECK_MPI_NULL((num), MPI_OP_NULL, MPI_ERR_OP, (op))\
+  CHECK_ARGS((op == MPI_REPLACE || op == MPI_NO_OP), MPI_ERR_OP,\
+             "%s: param %d op %s cannot be used in non RMA calls", __func__, (num), _XBT_STRINGIFY(op));\
   CHECK_DELETED((num), MPI_ERR_OP, op)\
   if (not op->is_predefined())\
     simgrid::smpi::utils::set_current_handle(op);\