surf_cpu_model_pm = new CpuL07Model(this,maxminSystem_);
}
-HostL07Model::~HostL07Model() = default;
+HostL07Model::~HostL07Model()
+{
+ lmm_system_free(maxminSystem_);
+ maxminSystem_ = nullptr;
+}
CpuL07Model::CpuL07Model(HostL07Model *hmodel,lmm_system_t sys)
: CpuModel()
{
maxminSystem_ = sys;
}
-CpuL07Model::~CpuL07Model() {
- lmm_system_free(maxminSystem_);
- maxminSystem_ = nullptr;
-}
+
NetworkL07Model::NetworkL07Model(HostL07Model *hmodel, lmm_system_t sys)
: NetworkModel()
, hostModel_(hmodel)
maxminSystem_ = sys;
loopback_ = createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE);
}
-NetworkL07Model::~NetworkL07Model()
-{
- maxminSystem_ = nullptr; // Avoid multi-free
-}
-
double HostL07Model::nextOccuringEvent(double now)
{
double latency = 0.0;
this->hostList_->reserve(host_nb);
- for (int i = 0; i<host_nb; i++)
+ for (int i = 0; i < host_nb; i++) {
this->hostList_->push_back(host_list[i]);
+ if (flops_amount[i] > 0)
+ nb_used_host++;
+ }
/* Compute the number of affected resources... */
if(bytes_amount != nullptr) {
nb_link = affected_links.size();
}
- for (int i = 0; i < host_nb; i++)
- if (flops_amount[i] > 0)
- nb_used_host++;
-
XBT_DEBUG("Creating a parallel task (%p) with %d hosts and %d unique links.", this, host_nb, nb_link);
this->latency_ = latency;
action->updateBound();
}
}
+LinkL07::~LinkL07() = default;
/**********
* Action *