MSG
- New function: MSG_process_yield()
+ - Renamed MSG_energy_plugin_init() -> MSG_host_energy_plugin_init()
+ to make room for the upcoming network energy plugin.
Java
- Ensure that an actor can kill itself with Process::exit()
int main(int argc, char *argv[])
{
- sg_energy_plugin_init();
+ sg_host_energy_plugin_init();
MSG_init(&argc, argv);
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
int main(int argc, char *argv[])
{
- sg_energy_plugin_init();
+ sg_host_energy_plugin_init();
MSG_init(&argc, argv);
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
xbt_assert(argc >= 2, "2Usage: %s <platform file> [--energy]", argv[0]);
if(argc == 3 && argv[2][2] == 'e')
- sg_energy_plugin_init();
+ sg_host_energy_plugin_init();
MSG_create_environment(argv[1]);
int main(int argc, char *argv[])
{
- sg_energy_plugin_init();
+ sg_host_energy_plugin_init();
MSG_init(&argc, argv);
xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
SG_BEGIN_DECL()
-XBT_PUBLIC(void) sg_energy_plugin_init();
+XBT_PUBLIC(void) sg_host_energy_plugin_init();
XBT_PUBLIC(double) sg_host_get_consumed_energy(sg_host_t host);
XBT_PUBLIC(double) sg_host_get_wattmin_at(sg_host_t host, int pstate);
XBT_PUBLIC(double) sg_host_get_wattmax_at(sg_host_t host, int pstate);
-#define MSG_energy_plugin_init() sg_energy_plugin_init()
+#define MSG_host_energy_plugin_init() sg_energy_plugin_init()
#define MSG_host_get_consumed_energy(host) sg_host_get_consumed_energy(host)
#define MSG_host_get_wattmin_at(host,pstate) sg_host_get_wattmin_at(host,pstate)
#define MSG_host_get_wattmax_at(host,pstate) sg_host_get_wattmax_at(host,pstate)
SG_END_DECL()
JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit() {
- sg_energy_plugin_init();
+ sg_host_energy_plugin_init();
}
/** Run a Java org.simgrid.msg.Process
* \brief Enable energy plugin
* \details Enable energy plugin to get joules consumption of each cpu. You should call this function before #MSG_init().
*/
-void sg_energy_plugin_init()
+void sg_host_energy_plugin_init()
{
if (HostEnergy::EXTENSION_ID.valid())
return;
#include <simgrid/plugins/energy.h> // FIXME: this plugin should not be linked to the core
s_surf_model_description_t surf_plugin_description[] = {
- {"Energy", "Cpu energy consumption.", &sg_energy_plugin_init},
- {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
+ {"Energy", "Cpu energy consumption.", &sg_host_energy_plugin_init},
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
/* Don't forget to update the option description in smx_config when you change this */