The standard says that upon error, implementations should call the
current MPI error handler, which is MPI_ERRORS_ARE_FATAL by default
but could be changed to MPI_ERRORS_RETURN on need.
Since we don't implement MPI_Comm_set_errhandler() to switch between
modes, the simulation mode of SMPI is only issuing a warning on
errors (which is similar to MPI_ERRORS_RETURN).
This commit adds a MC_assert() stating that every MPI call succeed.
This will lead to a property failure (visible only in MC mode) when a
MPI_ERR_* is issued by the implementation (which is somehow similar to
MPI_ERRORS_ARE_FATAL).
Model-Checker:
- Option model-checker/hash was removed. This is always activated now.
+ - MPI calls now MC_assert() that no MPI_ERR_* code is returned.
+ This is useful to check for MPI compliance.
XBT:
- xbt_mutex_t and xbt_cond_t are now marked as deprecated, a new C interface
* under the terms of the license ,(GNU LGPL) which comes with this package. */
#include "private.hpp"
+#include "simgrid/modelchecker.h"
#include "simgrid/sg_config.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)");
int error_size; \
PMPI_Error_string(ret, error_string, &error_size); \
XBT_WARN("%s - returned %.*s instead of MPI_SUCCESS", __func__, error_size, error_string); \
+ MC_assert(not MC_is_active()); /* Only fail in MC mode */ \
} \
XBT_VERB("SMPI - Leaving %s", __func__); \
return ret; \