int nb_used_host = 0; /* Only the hosts with something to compute (>0 flops) are counted) */
double latency = 0.0;
-
this->p_netcardList->reserve(host_nb);
for (int i = 0; i<host_nb; i++)
- this->p_netcardList->push_back(host_list[i]->pimpl_netcard);
+ this->p_netcardList->push_back(host_list[i]->pimpl_netcard);
/* Compute the number of affected resources... */
if(bytes_amount != NULL) {
for (int i = 0; i < host_nb; i++) {
for (int j = 0; j < host_nb; j++) {
- xbt_dynar_t route=NULL;
if (bytes_amount[i * host_nb + j] > 0) {
double lat=0.0;
- unsigned int cpt;
- void *_link;
- LinkL07 *link;
+ xbt_dynar_t route=NULL;
- routing_platf->getRouteAndLatency((*this->p_netcardList)[i], (*this->p_netcardList)[j],
- &route, &lat);
+ routing_platf->getRouteAndLatency((*p_netcardList)[i], (*p_netcardList)[j], &route, &lat);
latency = MAX(latency, lat);
+ void *_link;
xbt_dynar_foreach(route, cpt, _link) {
- link = static_cast<LinkL07*>(_link);
+ LinkL07 *link = static_cast<LinkL07*>(_link);
xbt_dict_set(ptask_parallel_task_link_set, link->getName(), link, NULL);
}
}
if(bytes_amount != NULL) {
for (int i = 0; i < host_nb; i++) {
for (int j = 0; j < host_nb; j++) {
- void *_link;
xbt_dynar_t route=NULL;
if (bytes_amount[i * host_nb + j] == 0.0)
continue;
- routing_platf->getRouteAndLatency((*this->p_netcardList)[i], (*this->p_netcardList)[j],
+ routing_platf->getRouteAndLatency((*p_netcardList)[i], (*p_netcardList)[j],
&route, NULL);
+ void *_link;
xbt_dynar_foreach(route, cpt, _link) {
LinkL07 *link = static_cast<LinkL07*>(_link);
lmm_expand_add(model->getMaxminSystem(), link->getConstraint(),
this->setCost(1.0);
this->setRemains(0.0);
}
+ xbt_free(host_list);
}
Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst,
**********/
L07Action::~L07Action(){
+ delete p_netcardList;
free(p_communicationAmount);
free(p_computationAmount);
}
m_refcount--;
if (!m_refcount) {
if (action_hook.is_linked())
- p_stateSet->erase(p_stateSet->iterator_to(*this));
+ p_stateSet->erase(p_stateSet->iterator_to(*this));
if (getVariable())
lmm_variable_free(getModel()->getMaxminSystem(), getVariable());
delete this;