X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4a6b0a991a67e6f2f67c03fed43529e078da7115..53dd673a07059d04f7ee5c280470958856fdf8d8:/src/surf/ptask_L07.cpp diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 7588146ead..b414a95750 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -13,7 +13,6 @@ #include "cpu_interface.hpp" #include "surf_routing.hpp" #include "xbt/lib.h" -#include "src/surf/platform.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host); XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg); @@ -53,7 +52,7 @@ HostL07Model::HostL07Model() : HostModel() { routing_model_create(surf_network_model->createLink("__loopback__", 498000000, NULL, 0.000015, NULL, - 1/*ON*/, NULL, + NULL, SURF_LINK_FATPIPE, NULL)); } @@ -297,13 +296,9 @@ Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst, } Cpu *CpuL07Model::createCpu(simgrid::s4u::Host *host, xbt_dynar_t powerPeakList, - int pstate, double power_scale, - tmgr_trace_t power_trace, int core, - int initiallyOn, - tmgr_trace_t state_trace) + tmgr_trace_t power_trace, int core, tmgr_trace_t state_trace) { - CpuL07 *cpu = new CpuL07(this, host, powerPeakList, pstate, power_scale, power_trace, - core, initiallyOn, state_trace); + CpuL07 *cpu = new CpuL07(this, host, powerPeakList, power_trace, core, state_trace); return cpu; } @@ -312,7 +307,6 @@ Link* NetworkL07Model::createLink(const char *name, tmgr_trace_t bw_trace, double lat_initial, tmgr_trace_t lat_trace, - int initiallyOn, tmgr_trace_t state_trace, e_surf_link_sharing_policy_t policy, xbt_dict_t properties) @@ -321,10 +315,10 @@ Link* NetworkL07Model::createLink(const char *name, "Link '%s' declared several times in the platform file.", name); Link* link = new LinkL07(this, name, properties, - bw_initial, bw_trace, - lat_initial, lat_trace, - initiallyOn, state_trace, - policy); + bw_initial, bw_trace, + lat_initial, lat_trace, + state_trace, + policy); Link::onCreation(link); return link; } @@ -334,13 +328,12 @@ Link* NetworkL07Model::createLink(const char *name, ************/ CpuL07::CpuL07(CpuL07Model *model, simgrid::s4u::Host *host, - xbt_dynar_t speedPeakList, int pstate, - double speedScale, tmgr_trace_t speedTrace, - int core, int initiallyOn, tmgr_trace_t state_trace) - : Cpu(model, host, speedPeakList, pstate, - core, xbt_dynar_get_as(speedPeakList,pstate,double), speedScale, initiallyOn) + xbt_dynar_t speedPeakList, + tmgr_trace_t speedTrace, + int core, tmgr_trace_t state_trace) + : Cpu(model, host, speedPeakList, core, xbt_dynar_get_as(speedPeakList,0,double)) { - p_constraint = lmm_constraint_new(model->getMaxminSystem(), this, xbt_dynar_get_as(speedPeakList,pstate,double) * speedScale); + p_constraint = lmm_constraint_new(model->getMaxminSystem(), this, xbt_dynar_get_as(speedPeakList,0,double)); if (speedTrace) p_speed.event = future_evt_set->add_trace(speedTrace, 0.0, this); @@ -356,7 +349,7 @@ CpuL07::~CpuL07() LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props, double bw_initial, tmgr_trace_t bw_trace, double lat_initial, tmgr_trace_t lat_trace, - int initiallyOn, tmgr_trace_t state_trace, + tmgr_trace_t state_trace, e_surf_link_sharing_policy_t policy) : Link(model, name, props, lmm_constraint_new(model->getMaxminSystem(), this, bw_initial), state_trace) { @@ -364,17 +357,12 @@ LinkL07::LinkL07(NetworkL07Model *model, const char* name, xbt_dict_t props, if (bw_trace) m_bandwidth.event = future_evt_set->add_trace(bw_trace, 0.0, this); - if (initiallyOn) - turnOn(); - else - turnOff(); - m_latency.peak = lat_initial; if (lat_trace) m_latency.event = future_evt_set->add_trace(lat_trace, 0.0, this); if (policy == SURF_LINK_FATPIPE) - lmm_constraint_shared(getConstraint()); + lmm_constraint_shared(getConstraint()); } Action *CpuL07::execution_start(double size)