aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--results/energy.pngbin232602 -> 249975 bytes
-rw-r--r--results/success.pngbin143909 -> 148839 bytes
-rw-r--r--src/simulator.cc16
3 files changed, 2 insertions, 14 deletions
diff --git a/results/energy.png b/results/energy.png
index 34b3407..537f657 100644
--- a/results/energy.png
+++ b/results/energy.png
Binary files differ
diff --git a/results/success.png b/results/success.png
index 2c153d9..fcf0d19 100644
--- a/results/success.png
+++ b/results/success.png
Binary files differ
diff --git a/src/simulator.cc b/src/simulator.cc
index 79a5d5c..d2f971f 100644
--- a/src/simulator.cc
+++ b/src/simulator.cc
@@ -56,15 +56,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[DAO] Loosely Coupled DSS");
/// @brief For convenience sake
typedef unsigned int u32;
-u32 nON;
-bool *data_ready;
-bool is_data_rcv_ready(){
- for(int i=0;i<nON;i++){
- if(data_ready[i])
- return true;
- }
- return false;
-}
+
/**
* Data that will be exchange between the nodes
*/
@@ -101,14 +93,11 @@ int main(int argc, char **argv) {
XBT_INFO("-------------------------------------------------");
// Init all nodes actors
- nON=simgrid::s4u::Engine::get_instance()->get_host_count();
- data_ready=(bool*)malloc(sizeof(bool)*nON);
+ u32 nON=simgrid::s4u::Engine::get_instance()->get_host_count();
for(u32 i=0;i<nON;i++){
std::vector<std::string> args;
std::ostringstream ss;
ss<< "on" <<i;
- args.push_back(std::to_string(i));
- data_ready[i]=false;
simgrid::s4u::Actor::create("ON", simgrid::s4u::Host::by_name(ss.str()), obs_node, args);
}
@@ -125,7 +114,6 @@ int main(int argc, char **argv) {
static void obs_node(std::vector<std::string> args) {
// Init various variables
std::string selfName = simgrid::s4u::this_actor::get_host()->get_name();
- int id=stoi(args[0]);
simgrid::s4u::this_actor::get_host()->turn_on();
Inputs i(selfName);
simgrid::s4u::Mailbox *m = simgrid::s4u::Mailbox::by_name("medium");