From 9f70ade203167767a36dd53e404c53e690382378 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 24 Mar 2017 13:14:45 +0100 Subject: [PATCH] restore a check ensuring that this example is not used on an inadapted platform --- examples/msg/energy-pstate/energy-pstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/msg/energy-pstate/energy-pstate.c b/examples/msg/energy-pstate/energy-pstate.c index 9906c1f2b3..227c1dafa3 100644 --- a/examples/msg/energy-pstate/energy-pstate.c +++ b/examples/msg/energy-pstate/energy-pstate.c @@ -37,6 +37,8 @@ static int dvfs(int argc, char *argv[]) // Change power peak int new_pstate = 2; + xbt_assert(new_pstate < nb, "Cannot set the host %s at pstate %d because it only provides %d pstates.", + MSG_host_get_name(host), new_pstate, nb); double peak_at = MSG_host_get_power_peak_at(host, new_pstate); XBT_INFO("Changing power peak value to %f (at index %d)", peak_at, new_pstate); -- 2.30.2