X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b0b20786751d59b46c18bc23416b45e3fa0167ba..002c591623abdaa8c94a3b434a2f179c35d29cb9:/src/surf/network_smpi.cpp diff --git a/src/surf/network_smpi.cpp b/src/surf/network_smpi.cpp index 0f089bca71..9a14001b65 100644 --- a/src/surf/network_smpi.cpp +++ b/src/surf/network_smpi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -34,9 +34,8 @@ void surf_network_model_init_SMPI() if (surf_network_model) return; surf_network_model = new simgrid::kernel::resource::NetworkSmpiModel(); - all_existing_models->push_back(surf_network_model); - xbt_cfg_setdefault_double("network/weight-S", 8775); + simgrid::config::set_default("network/weight-S", 8775); } namespace simgrid { @@ -45,11 +44,12 @@ namespace resource { NetworkSmpiModel::NetworkSmpiModel() : NetworkCm02Model() { + /* Do not add this into all_existing_models: our ancestor already does so */ } NetworkSmpiModel::~NetworkSmpiModel() = default; -double NetworkSmpiModel::bandwidthFactor(double size) +double NetworkSmpiModel::get_bandwidth_factor(double size) { if (smpi_bw_factor.empty()) smpi_bw_factor = parse_factor(simgrid::config::get_value("smpi/bw-factor")); @@ -67,7 +67,7 @@ double NetworkSmpiModel::bandwidthFactor(double size) return current; } -double NetworkSmpiModel::latencyFactor(double size) +double NetworkSmpiModel::get_latency_factor(double size) { if (smpi_lat_factor.empty()) smpi_lat_factor = parse_factor(simgrid::config::get_value("smpi/lat-factor")); @@ -85,9 +85,9 @@ double NetworkSmpiModel::latencyFactor(double size) return current; } -double NetworkSmpiModel::bandwidthConstraint(double rate, double bound, double size) +double NetworkSmpiModel::get_bandwidth_constraint(double rate, double bound, double size) { - return rate < 0 ? bound : std::min(bound, rate * bandwidthFactor(size)); + return rate < 0 ? bound : std::min(bound, rate * get_bandwidth_factor(size)); } /************