ptask_maxmin_system = lmm_system_new(1);
surf_workstation_model = NULL;
surf_network_model = new NetworkL07Model();
- surf_cpu_model = new CpuL07Model();
+ surf_cpu_model_pm = new CpuL07Model();
routing_model_create(p_networkModel->createResource("__loopback__",
498000000, NULL,
0.000015, NULL,
WorkstationL07Model::~WorkstationL07Model() {
xbt_dict_free(&ptask_parallel_task_link_set);
- delete surf_cpu_model;
+ delete surf_cpu_model_pm;
delete surf_network_model;
ptask_host_count = 0;
************/
WorkstationL07::WorkstationL07(WorkstationModelPtr model, const char* name, xbt_dict_t props, RoutingEdgePtr netElm, CpuPtr cpu)
- : Resource(model, name, props), WorkstationCLM03Lmm(model, name, props, NULL, netElm, cpu)
+ : Resource(model, name, props),
+ WorkstationCLM03Lmm(model, name, props, NULL, netElm, cpu),
+ WorkstationCLM03(model, name, props, NULL, netElm, cpu)
{
}
+double WorkstationL07::getPowerPeakAt(int pstate_index)
+{
+ XBT_DEBUG("[ws_get_power_peak_at] Not implemented for workstation_ptask_L07");
+ return 0.0;
+}
+
+int WorkstationL07::getNbPstates()
+{
+ XBT_DEBUG("[ws_get_nb_pstates] Not implemented for workstation_ptask_L07");
+ return 0.0;
+}
+
+void WorkstationL07::setPowerPeakAt(int pstate_index)
+{
+ XBT_DEBUG("[ws_set_power_peak_at] Not implemented for workstation_ptask_L07");
+}
+
+double WorkstationL07::getConsumedEnergy()
+{
+ XBT_DEBUG("[ws_get_consumed_energy] Not implemented for workstation_ptask_L07");
+ return 0.0;
+}
+
CpuL07::CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t props)
: Resource(model, name, props), CpuLmm(model, name, props) {
static void ptask_parse_workstation_init(sg_platf_host_cbarg_t host)
{
+ double power_peak = xbt_dynar_get_as(host->power_peak, host->pstate, double);
+ //cpu->power_peak = power_peak;
+ xbt_dynar_free(&(host->power_peak)); /* kill memory leak */
static_cast<WorkstationL07ModelPtr>(surf_workstation_model)->createResource(
host->id,
- host->power_peak,
+ power_peak,
host->power_scale,
host->power_trace,
host->initial_state,
static void ptask_parse_cpu_init(sg_platf_host_cbarg_t host)
{
- static_cast<CpuL07ModelPtr>(surf_cpu_model)->createResource(
+ double power_peak = xbt_dynar_get_as(host->power_peak, host->pstate, double);
+ static_cast<CpuL07ModelPtr>(surf_cpu_model_pm)->createResource(
host->id,
- host->power_peak,
+ power_peak,
host->power_scale,
host->power_trace,
host->initial_state,
void surf_workstation_model_init_ptask_L07(void)
{
XBT_INFO("surf_workstation_model_init_ptask_L07");
- xbt_assert(!surf_cpu_model, "CPU model type already defined");
+ xbt_assert(!surf_cpu_model_pm, "CPU model type already defined");
xbt_assert(!surf_network_model, "network model type already defined");
ptask_define_callbacks();
surf_workstation_model = new WorkstationL07Model();