A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
update ompi selector as well with "recent" version
[simgrid.git]
/
src
/
surf
/
network_smpi.cpp
diff --git
a/src/surf/network_smpi.cpp
b/src/surf/network_smpi.cpp
index
2b1c21d
..
f220569
100644
(file)
--- a/
src/surf/network_smpi.cpp
+++ b/
src/surf/network_smpi.cpp
@@
-33,25
+33,26
@@
void surf_network_model_init_SMPI()
{
if (surf_network_model)
return;
- surf_network_model = new simgrid::surf::NetworkSmpiModel();
- all_existing_models->push_back(surf_network_model);
+ surf_network_model = new simgrid::kernel::resource::NetworkSmpiModel();
-
xbt_cfg_setdefault_double
("network/weight-S", 8775);
+
simgrid::config::set_default<double>
("network/weight-S", 8775);
}
namespace simgrid {
-namespace surf {
+namespace kernel {
+namespace resource {
NetworkSmpiModel::NetworkSmpiModel() : NetworkCm02Model()
{
+ /* Do not add this into all_existing_models: our ancestor already does so */
}
NetworkSmpiModel::~NetworkSmpiModel() = default;
-double NetworkSmpiModel::
bandwidthF
actor(double size)
+double NetworkSmpiModel::
get_bandwidth_f
actor(double size)
{
if (smpi_bw_factor.empty())
- smpi_bw_factor = parse_factor(
xbt_cfg_get_string
("smpi/bw-factor"));
+ smpi_bw_factor = parse_factor(
simgrid::config::get_value<std::string>
("smpi/bw-factor"));
double current = 1.0;
for (auto const& fact : smpi_bw_factor) {
@@
-66,10
+67,10
@@
double NetworkSmpiModel::bandwidthFactor(double size)
return current;
}
-double NetworkSmpiModel::
latencyF
actor(double size)
+double NetworkSmpiModel::
get_latency_f
actor(double size)
{
if (smpi_lat_factor.empty())
- smpi_lat_factor = parse_factor(
xbt_cfg_get_string
("smpi/lat-factor"));
+ smpi_lat_factor = parse_factor(
simgrid::config::get_value<std::string>
("smpi/lat-factor"));
double current = 1.0;
for (auto const& fact : smpi_lat_factor) {
@@
-84,9
+85,9
@@
double NetworkSmpiModel::latencyFactor(double size)
return current;
}
-double NetworkSmpiModel::
bandwidthC
onstraint(double rate, double bound, double size)
+double NetworkSmpiModel::
get_bandwidth_c
onstraint(double rate, double bound, double size)
{
- return rate < 0 ? bound : std::min(bound, rate *
bandwidthF
actor(size));
+ return rate < 0 ? bound : std::min(bound, rate *
get_bandwidth_f
actor(size));
}
/************
@@
-98,3
+99,4
@@
double NetworkSmpiModel::bandwidthConstraint(double rate, double bound, double s
**********/
}
}
+} // namespace simgrid