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
don't set a field to its default value from the constructor
[simgrid.git]
/
src
/
surf
/
network_smpi.cpp
diff --git
a/src/surf/network_smpi.cpp
b/src/surf/network_smpi.cpp
index
c5b2210
..
4988883
100644
(file)
--- a/
src/surf/network_smpi.cpp
+++ b/
src/surf/network_smpi.cpp
@@
-1,17
+1,13
@@
-/* Copyright (c) 2013-2018. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2013-2018. 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. */
/* 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. */
-#include <cstddef>
-#include <algorithm>
-
-#include <xbt/log.h>
-
#include "network_smpi.hpp"
#include "simgrid/sg_config.hpp"
#include "smpi_utils.hpp"
#include "network_smpi.hpp"
#include "simgrid/sg_config.hpp"
#include "smpi_utils.hpp"
+#include "src/surf/surf_interface.hpp"
+#include "surf/surf.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
@@
-37,14
+33,15
@@
void surf_network_model_init_SMPI()
{
if (surf_network_model)
return;
{
if (surf_network_model)
return;
- surf_network_model = new simgrid::
surf
::NetworkSmpiModel();
+ surf_network_model = new simgrid::
kernel::resource
::NetworkSmpiModel();
all_existing_models->push_back(surf_network_model);
all_existing_models->push_back(surf_network_model);
-
xbt_cfg_setdefault_double
("network/weight-S", 8775);
+
simgrid::config::set_default<double>
("network/weight-S", 8775);
}
namespace simgrid {
}
namespace simgrid {
-namespace surf {
+namespace kernel {
+namespace resource {
NetworkSmpiModel::NetworkSmpiModel() : NetworkCm02Model()
{
NetworkSmpiModel::NetworkSmpiModel() : NetworkCm02Model()
{
@@
-55,7
+52,7
@@
NetworkSmpiModel::~NetworkSmpiModel() = default;
double NetworkSmpiModel::bandwidthFactor(double size)
{
if (smpi_bw_factor.empty())
double NetworkSmpiModel::bandwidthFactor(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) {
double current = 1.0;
for (auto const& fact : smpi_bw_factor) {
@@
-73,7
+70,7
@@
double NetworkSmpiModel::bandwidthFactor(double size)
double NetworkSmpiModel::latencyFactor(double size)
{
if (smpi_lat_factor.empty())
double NetworkSmpiModel::latencyFactor(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) {
double current = 1.0;
for (auto const& fact : smpi_lat_factor) {
@@
-102,3
+99,4
@@
double NetworkSmpiModel::bandwidthConstraint(double rate, double bound, double s
**********/
}
}
**********/
}
}
+} // namespace simgrid