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,
SURF_RESOURCE_ON, NULL,
SURF_LINK_FATPIPE, NULL));
+ p_cpuModel = surf_cpu_model_pm;
}
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;
}
}
-double WorkstationL07Model::shareResources(double now)
+double WorkstationL07Model::shareResources(double /*now*/)
{
void *_action;
WorkstationL07ActionLmmPtr action;
return min;
}
-void WorkstationL07Model::updateActionsState(double now, double delta)
+void WorkstationL07Model::updateActionsState(double /*now*/, double delta)
{
double deltap = 0.0;
void *_action, *_next_action;
return static_cast<ActionPtr>(action);
}
-ResourcePtr WorkstationL07Model::createResource(const char *name, double power_scale,
- double power_initial,
- tmgr_trace_t power_trace,
- e_surf_resource_state_t state_initial,
- tmgr_trace_t state_trace,
- xbt_dict_t cpu_properties)
+ResourcePtr WorkstationL07Model::createResource(const char *name, double /*power_scale*/,
+ double /*power_initial*/,
+ tmgr_trace_t /*power_trace*/,
+ e_surf_resource_state_t /*state_initial*/,
+ tmgr_trace_t /*state_trace*/,
+ xbt_dict_t cpu_properties)
{
WorkstationL07Ptr wk = NULL;
xbt_assert(!surf_workstation_resource_priv(surf_workstation_resource_by_name(name)),
"Host '%s' declared several times in the platform file.",
name);
- wk = new WorkstationL07(this, name, cpu_properties,
+ wk = new WorkstationL07(this, name, NULL,
static_cast<RoutingEdgePtr>(xbt_lib_get_or_null(host_lib, name, ROUTING_HOST_LEVEL)),
dynamic_cast<CpuPtr>(static_cast<ResourcePtr>(xbt_lib_get_or_null(host_lib, name, SURF_CPU_LEVEL))));
e_surf_link_sharing_policy_t
policy, xbt_dict_t properties)
{
- LinkL07Ptr nw_link = new LinkL07(this, xbt_strdup(name), properties);
+ LinkL07Ptr nw_link = new LinkL07(this, name, properties);
xbt_assert(!xbt_lib_get_or_null(link_lib, name, SURF_LINK_LEVEL),
"Link '%s' declared several times in the platform file.",
name);
************/
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),
+ WorkstationCLM03(model, name, props, NULL, netElm, cpu),
+ WorkstationCLM03Lmm(model, name, props, NULL, netElm, cpu)
{
}
-double WorkstationL07::getPowerPeakAt(int pstate_index)
+double WorkstationL07::getPowerPeakAt(int /*pstate_index*/)
{
XBT_DEBUG("[ws_get_power_peak_at] Not implemented for workstation_ptask_L07");
return 0.0;
return 0.0;
}
-void WorkstationL07::setPowerPeakAt(int pstate_index)
+void WorkstationL07::setPowerPeakAt(int /*pstate_index*/)
{
XBT_DEBUG("[ws_set_power_peak_at] Not implemented for workstation_ptask_L07");
}
}
CpuL07::CpuL07(CpuL07ModelPtr model, const char* name, xbt_dict_t props)
- : Resource(model, name, props), CpuLmm(model, name, props) {
+ : Resource(model, name, props), CpuLmm() {
}
return lmm_constraint_used(ptask_maxmin_system, p_constraint);
}
-void CpuL07::updateState(tmgr_trace_event_t event_type, double value, double date){
+void CpuL07::updateState(tmgr_trace_event_t event_type, double value, double /*date*/){
XBT_DEBUG("Updating cpu %s (%p) with value %g", m_name, this, value);
if (event_type == p_power.event) {
m_powerCurrent = value;
static void ptask_parse_cpu_init(sg_platf_host_cbarg_t host)
{
double power_peak = xbt_dynar_get_as(host->power_peak, host->pstate, double);
- static_cast<CpuL07ModelPtr>(surf_cpu_model)->createResource(
+ static_cast<CpuL07ModelPtr>(surf_cpu_model_pm)->createResource(
host->id,
power_peak,
host->power_scale,
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();
ModelPtr model = static_cast<ModelPtr>(surf_workstation_model);
xbt_dynar_push(model_list, &model);
+ xbt_dynar_push(model_list_invoke, &model);
}