X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39240c0bd06039059d2ef8f8e6963a6b1f02e96c..c6b00dcbdd4cd07fddcdd8c31762a33d247257cf:/src/surf/ptask_L07.cpp diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 43591c07b2..d1f2593df1 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -57,8 +57,10 @@ NetworkL07Model::NetworkL07Model(HostL07Model* hmodel, kernel::lmm::System* sys) : NetworkModel(Model::UpdateAlgo::FULL), hostModel_(hmodel) { set_maxmin_system(sys); - loopback_ = NetworkL07Model::create_link("__loopback__", std::vector{498000000}, 0.000015, - s4u::Link::SharingPolicy::FATPIPE); + loopback_ = NetworkL07Model::create_link("__loopback__", + std::vector{simgrid::config::get_value("network/loopback-bw")}, + simgrid::config::get_value("network/loopback-lat"), + s4u::Link::SharingPolicy::FATPIPE); } NetworkL07Model::~NetworkL07Model() @@ -142,7 +144,7 @@ kernel::resource::CpuAction* HostL07Model::execute_parallel(const std::vector& host_list, const double* flops_amount, const double* bytes_amount, double rate) - : CpuAction(model, 1, 0), computationAmount_(flops_amount), communicationAmount_(bytes_amount), rate_(rate) + : CpuAction(model, 1.0, false), computationAmount_(flops_amount), communicationAmount_(bytes_amount), rate_(rate) { size_t link_nb = 0; size_t used_host_nb = 0; /* Only the hosts with something to compute (>0 flops) are counted) */ @@ -293,7 +295,7 @@ void CpuL07::on_speed_change() get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), speed_.peak * speed_.scale); while ((var = get_constraint()->get_variable(&elem))) { - const kernel::resource::Action* action = static_cast(var->get_id()); + const kernel::resource::Action* action = var->get_id(); get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(), speed_.scale * speed_.peak); } @@ -317,7 +319,7 @@ void CpuL07::apply_event(kernel::profile::Event* triggered, double value) } else if (triggered == state_event_) { if (value > 0) { if (not is_on()) { - XBT_VERB("Restart processes on host %s", get_host()->get_cname()); + XBT_VERB("Restart actors on host %s", get_host()->get_cname()); get_host()->turn_on(); } } else