To change the pstate of a given CPU, use the following functions: #MSG_host_get_nb_pstates(), simgrid#s4u#Host#set_pstate(), #MSG_host_get_power_peak_at().
To simulate the energy-related elements, first call the simgrid#energy#sg_energy_plugin_init() before your #MSG_init(),
-and then use the following function to retrieve the consumption of a given host: #MSG_host_get_consumed_energy().
+and then use the following function to retrieve the consumption of a given host: MSG_host_get_consumed_energy().
*/
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_energy, surf,
atof(xbt_dynar_get_as(current_power_values, 0, char*)),
atof(xbt_dynar_get_as(current_power_values, 1, char*))
));
+
+ xbt_dynar_free(¤t_power_values);
}
xbt_dynar_free(&all_power_values);
}