storage_register_callbacks();
routing_register_callbacks();
- gpu_register_callbacks();
-
return 0;
}
int console_close(lua_State *L) {
sg_platf_end();
sg_platf_exit();
-
- xbt_lib_cursor_t cursor;
- void **data;
- char *name;
-
- /* Initialize MSG and WKS hosts */
- XBT_DEBUG("Initialize MSG and WKS hosts");
- xbt_lib_foreach(host_lib, cursor, name, data) {
- if(data[SURF_HOST_LEVEL]){
- XBT_DEBUG("\tSee surf host %s",name);
- SIMIX_host_create(name);
- // THIS IS BRAINDEAD. There is no sg_host_t in that level, but a smx_host_priv. So commenting out for now.
- // Lua is broken anyway. Christian will fix it
- // __MSG_host_create((sg_host_t)data[SIMIX_HOST_LEVEL]);
- }
- }
-
return 0;
}
if (type != LUA_TSTRING && type != LUA_TNUMBER) {
XBT_ERROR("Attribute 'power' must be specified for host and must either be a string (in the correct format; check documentation) or a number.");
}
- host.power_peak = xbt_dynar_new(sizeof(double), NULL);
- xbt_dynar_push_as(host.power_peak, double, get_cpu_power(lua_tostring(L, -1)));
+ host.speed_peak = xbt_dynar_new(sizeof(double), NULL);
+ xbt_dynar_push_as(host.speed_peak, double, get_cpu_speed(lua_tostring(L, -1)));
lua_pop(L, 1);
// get core
//get power_scale
lua_pushstring(L, "availability");
lua_gettable(L, -2);
- if(!lua_isnumber(L,-1)) host.power_scale = 1;// Default value
- else host.power_scale = lua_tonumber(L, -1);
+ if(!lua_isnumber(L,-1)) host.speed_scale = 1;// Default value
+ else host.speed_scale = lua_tonumber(L, -1);
lua_pop(L, 1);
//get power_trace
lua_pushstring(L, "availability_file");
lua_gettable(L, -2);
- host.power_trace = tmgr_trace_new_from_file(lua_tostring(L, -1));
+ host.speed_trace = tmgr_trace_new_from_file(lua_tostring(L, -1));
lua_pop(L, 1);
//get state initial
lua_pop(L, 1);
sg_platf_new_host(&host);
- xbt_dynar_free(&host.power_peak);
+ xbt_dynar_free(&host.speed_peak);
return 0;
}