From: Christian Heinrich Date: Fri, 30 Mar 2018 09:15:29 +0000 (+0200) Subject: [SMPI] Replay: Make error message more verbose X-Git-Tag: v3.20~490 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d7acbd4087c3b0a61d6e7e44b0a4db5b40772a71 [SMPI] Replay: Make error message more verbose --- diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index 1aca704338..2d03b91272 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include using simgrid::s4u::Actor; @@ -28,12 +29,18 @@ static MPI_Datatype MPI_DEFAULT_TYPE; #define CHECK_ACTION_PARAMS(action, mandatory, optional) \ { \ - if (action.size() < static_cast(mandatory + 2)) \ + if (action.size() < static_cast(mandatory + 2)) { \ + std::stringstream ss; \ + for (const auto& elem : action) { \ + ss << elem << " "; \ + } \ THROWF(arg_error, 0, "%s replay failed.\n" \ "%zu items were given on the line. First two should be process_id and action. " \ "This action needs after them %lu mandatory arguments, and accepts %lu optional ones. \n" \ + "The full line that was given is:\n %s\n" \ "Please contact the Simgrid team if support is needed", \ - __func__, action.size(), static_cast(mandatory), static_cast(optional)); \ + __func__, action.size(), static_cast(mandatory), static_cast(optional), ss.str().c_str()); \ + }\ } static void log_timed_action(simgrid::xbt::ReplayAction& action, double clock)