A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d94f920
)
plug leak and more consistency with other models
author
Fred Suter
<suterf@ornl.gov>
Mon, 31 Oct 2022 14:33:21 +0000
(10:33 -0400)
committer
Fred Suter
<suterf@ornl.gov>
Mon, 31 Oct 2022 14:33:21 +0000
(10:33 -0400)
src/kernel/resource/DiskImpl.cpp
patch
|
blob
|
history
src/kernel/resource/DiskImpl.hpp
patch
|
blob
|
history
src/surf/disk_s19.cpp
patch
|
blob
|
history
src/surf/disk_s19.hpp
patch
|
blob
|
history
src/surf/sio_S22.hpp
patch
|
blob
|
history
diff --git
a/src/kernel/resource/DiskImpl.cpp
b/src/kernel/resource/DiskImpl.cpp
index
d6d679e
..
126d53f
100644
(file)
--- a/
src/kernel/resource/DiskImpl.cpp
+++ b/
src/kernel/resource/DiskImpl.cpp
@@
-6,32
+6,15
@@
#include "DiskImpl.hpp"
#include "simgrid/s4u/Engine.hpp"
#include "DiskImpl.hpp"
#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/sg_config.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/lmm/maxmin.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_disk, ker_resource, "Disk resources, that fuel I/O activities");
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/lmm/maxmin.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_disk, ker_resource, "Disk resources, that fuel I/O activities");
-/***********
- * Options *
- ***********/
-static simgrid::config::Flag<std::string> cfg_disk_solver("disk/solver",
- "Set linear equations solver used by disk model", "maxmin",
- &simgrid::kernel::lmm::System::validate_solver);
-
namespace simgrid::kernel::resource {
xbt::signal<void(DiskAction const&, Action::State, Action::State)> DiskAction::on_state_change;
namespace simgrid::kernel::resource {
xbt::signal<void(DiskAction const&, Action::State, Action::State)> DiskAction::on_state_change;
-/*********
- * Model *
- *********/
-
-DiskModel::DiskModel(const std::string& name) : Model(name)
-{
- set_maxmin_system(lmm::System::build(cfg_disk_solver.get(), true /* selective update */));
-}
-
/************
* Resource *
************/
/************
* Resource *
************/
diff --git
a/src/kernel/resource/DiskImpl.hpp
b/src/kernel/resource/DiskImpl.hpp
index
b55a6a3
..
7b46f08
100644
(file)
--- a/
src/kernel/resource/DiskImpl.hpp
+++ b/
src/kernel/resource/DiskImpl.hpp
@@
-32,9
+32,7
@@
class DiskAction;
*********/
class DiskModel : public Model {
public:
*********/
class DiskModel : public Model {
public:
- explicit DiskModel(const std::string& name);
- DiskModel(const DiskModel&) = delete;
- DiskModel& operator=(const DiskModel&) = delete;
+ using Model::Model;
virtual DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) = 0;
};
virtual DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) = 0;
};
diff --git
a/src/surf/disk_s19.cpp
b/src/surf/disk_s19.cpp
index
1b589d3
..
8299b4b
100644
(file)
--- a/
src/surf/disk_s19.cpp
+++ b/
src/surf/disk_s19.cpp
@@
-3,6
+3,7
@@
/* 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 "simgrid/sg_config.hpp"
#include <simgrid/kernel/routing/NetPoint.hpp>
#include <simgrid/kernel/routing/NetZoneImpl.hpp>
#include <simgrid/s4u/Engine.hpp>
#include <simgrid/kernel/routing/NetPoint.hpp>
#include <simgrid/kernel/routing/NetZoneImpl.hpp>
#include <simgrid/s4u/Engine.hpp>
@@
-14,6
+15,12
@@
#include "src/surf/disk_s19.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_disk);
#include "src/surf/disk_s19.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_disk);
+/***********
+ * Options *
+ ***********/
+static simgrid::config::Flag<std::string> cfg_disk_solver("disk/solver",
+ "Set linear equations solver used by disk model", "maxmin",
+ &simgrid::kernel::lmm::System::validate_solver);
/*********
* Model *
/*********
* Model *
@@
-28,6
+35,15
@@
void surf_disk_model_init_S19()
}
namespace simgrid::kernel::resource {
}
namespace simgrid::kernel::resource {
+/*********
+ * Model *
+ *********/
+
+DiskS19Model::DiskS19Model(const std::string& name) : DiskModel(name)
+{
+ set_maxmin_system(lmm::System::build(cfg_disk_solver.get(), true /* selective update */));
+}
+
DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
{
DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
{
diff --git
a/src/surf/disk_s19.hpp
b/src/surf/disk_s19.hpp
index
85d6c1c
..
b4c352b
100644
(file)
--- a/
src/surf/disk_s19.hpp
+++ b/
src/surf/disk_s19.hpp
@@
-26,7
+26,9
@@
class XBT_PRIVATE DiskS19Action;
class DiskS19Model : public DiskModel {
public:
class DiskS19Model : public DiskModel {
public:
- using DiskModel::DiskModel;
+ explicit DiskS19Model(const std::string& name);
+ DiskS19Model(const DiskS19Model&) = delete;
+ DiskS19Model& operator=(const DiskS19Model&) = delete;
DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) override;
void update_actions_state(double now, double delta) override;
DiskImpl* create_disk(const std::string& name, double read_bandwidth, double write_bandwidth) override;
void update_actions_state(double now, double delta) override;
diff --git
a/src/surf/sio_S22.hpp
b/src/surf/sio_S22.hpp
index
3151625
..
1ed0a22
100644
(file)
--- a/
src/surf/sio_S22.hpp
+++ b/
src/surf/sio_S22.hpp
@@
-107,6
+107,7
@@
public:
/**********
* Action *
**********/
/**********
* Action *
**********/
+
class S22Action : public DiskAction {
const s4u::Host* src_host_;
const DiskImpl* src_disk_;
class S22Action : public DiskAction {
const s4u::Host* src_host_;
const DiskImpl* src_disk_;