X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e84659ef22bae50c28bce4163d837e819a6a7fc5..897c14185f8a5e6506c9037d4342329a460a7a95:/src/simgrid/sg_config.cpp diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 7709d360b8..1bf0f9f91c 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -354,7 +354,9 @@ void sg_config_init(int *argc, char **argv) #if HAVE_SMPI simgrid::config::declare_flag("smpi/host-speed", "Speed of the host running the simulation (in flop/s). " "Used to bench the operations.", - 20000.0); + 20000.0, [](const double& val) { + xbt_assert(val > 0.0, "Invalid value (%f) for 'smpi/host-speed': it must be positive.", val); + }); simgrid::config::alias("smpi/host-speed", {"smpi/running_power", "smpi/running-power"}); simgrid::config::declare_flag("smpi/keep-temps", "Whether we should keep the generated temporary files.",