/**************************************/
/*** Resource Creation & Destruction **/
/**************************************/
/**************************************/
/*** Resource Creation & Destruction **/
/**************************************/
{
XBT_CINFO(xbt_cfg,"Switching to the L07 model to handle parallel tasks.");
xbt_assert(!surf_cpu_model_pm, "CPU model type already defined");
xbt_assert(!surf_network_model, "network model type already defined");
surf_host_model = new simgrid::surf::HostL07Model();
{
XBT_CINFO(xbt_cfg,"Switching to the L07 model to handle parallel tasks.");
xbt_assert(!surf_cpu_model_pm, "CPU model type already defined");
xbt_assert(!surf_network_model, "network model type already defined");
surf_host_model = new simgrid::surf::HostL07Model();
- for(ActionList::iterator it(running_actions->begin()), itend(running_actions->end())
- ; it != itend ; ++it) {
+ for(ActionList::iterator it(running_actions->begin()), itend(running_actions->end()); it != itend ; ++it) {
- XBT_DEBUG("Updating min (value) with %p (start %f): %f", action,
- action->getStartTime(), min);
+ XBT_DEBUG("Updating min (value) with %p (start %f): %f", action, action->getStartTime(), min);
- XBT_DEBUG("Updating min (latency) with %p (start %f): %f", action,
- action->getStartTime(), min);
+ XBT_DEBUG("Updating min (latency) with %p (start %f): %f", action, action->getStartTime(), min);
return new L07Action(this, host_nb, host_list, flops_amount, bytes_amount, rate);
}
return new L07Action(this, host_nb, host_list, flops_amount, bytes_amount, rate);
}
-L07Action::L07Action(Model *model, int host_nb, sg_host_t*host_list,
- double *flops_amount, double *bytes_amount, double rate)
+L07Action::L07Action(Model *model, int host_nb, sg_host_t *host_list,
+ double *flops_amount, double *bytes_amount, double rate)
return p_hostModel->executeParallelTask(2, host_list, flops_amount, bytes_amount, rate);
}
return p_hostModel->executeParallelTask(2, host_list, flops_amount, bytes_amount, rate);
}
{
return new CpuL07(this, host, speedPerPstate, core);
}
{
return new CpuL07(this, host, speedPerPstate, core);
}
-CpuL07::CpuL07(CpuL07Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
+CpuL07::CpuL07(CpuL07Model *model, simgrid::s4u::Host *host, std::vector<double> *speedPerPstate, int core)
: Cpu(model, host, speedPerPstate, core)
{
: Cpu(model, host, speedPerPstate, core)
{
- constraint_ = lmm_constraint_new(model->getMaxminSystem(), this, xbt_dynar_get_as(speedPerPstate,0,double));
+ constraint_ = lmm_constraint_new(model->getMaxminSystem(), this, speedPerPstate->front());
LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props, double bandwidth, double latency,
e_surf_link_sharing_policy_t policy)
LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props, double bandwidth, double latency,
e_surf_link_sharing_policy_t policy)
- return static_cast<CpuL07Model*>(getModel())->p_hostModel
- ->executeParallelTask( 1, host_list, flops_amount, nullptr, -1);
+ return static_cast<CpuL07Model*>(getModel())->p_hostModel->executeParallelTask(1, host_list, flops_amount, nullptr, -1);
lmm_element_t elem = nullptr;
lmm_update_constraint_bound(getModel()->getMaxminSystem(), getConstraint(), speed_.peak * speed_.scale);
lmm_element_t elem = nullptr;
lmm_update_constraint_bound(getModel()->getMaxminSystem(), getConstraint(), speed_.peak * speed_.scale);
- while ((var = lmm_get_var_from_cnst
- (getModel()->getMaxminSystem(), getConstraint(), &elem))) {
+ while ((var = lmm_get_var_from_cnst (getModel()->getMaxminSystem(), getConstraint(), &elem))) {
- lmm_update_variable_bound(getModel()->getMaxminSystem(),
- action->getVariable(),
- speed_.scale * speed_.peak);
+ lmm_update_variable_bound(getModel()->getMaxminSystem(), action->getVariable(), speed_.scale * speed_.peak);
- lmm_update_variable_bound(getModel()->getMaxminSystem(), getVariable(),
- std::min(m_rate, lat_bound));
+ lmm_update_variable_bound(getModel()->getMaxminSystem(), getVariable(), std::min(m_rate, lat_bound));