Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further snake_case s4u::Engine
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 24 Apr 2018 10:51:30 +0000 (12:51 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 24 Apr 2018 12:38:57 +0000 (14:38 +0200)
36 files changed:
examples/s4u/actor-join/s4u-actor-join.cpp
examples/s4u/app-bittorrent/s4u-peer.cpp
examples/s4u/app-bittorrent/s4u-tracker.cpp
examples/s4u/app-chainsend/s4u-app-chainsend.cpp
examples/s4u/app-masterworker/s4u-app-masterworker.cpp
examples/s4u/app-pingpong/s4u-app-pingpong.cpp
examples/s4u/app-token-ring/s4u-app-token-ring.cpp
examples/s4u/cloud-capping/s4u-cloud-capping.cpp
examples/s4u/cloud-migration/s4u-cloud-migration.cpp
examples/s4u/cloud-simple/s4u-cloud-simple.cpp
examples/s4u/dht-chord/s4u-dht-chord-node.cpp
examples/s4u/dht-chord/s4u-dht-chord.cpp
examples/s4u/dht-chord/s4u-dht-chord.hpp
examples/s4u/dht-kademlia/node.cpp
examples/s4u/dht-kademlia/s4u-dht-kademlia.cpp
examples/s4u/energy-exec/s4u-energy-exec.cpp
examples/s4u/energy-vm/s4u-energy-vm.cpp
examples/s4u/exec-async/s4u-exec-async.cpp
examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp
examples/s4u/io-file-remote/s4u-io-file-remote.cpp
examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp
examples/s4u/plugin-hostload/s4u-plugin-hostload.cpp
examples/s4u/replay-comm/s4u-replay-comm.cpp
examples/s4u/replay-storage/s4u-replay-storage.cpp
include/simgrid/s4u/Engine.hpp
src/plugins/vm/VmLiveMigration.cpp
src/s4u/s4u_Engine.cpp
src/s4u/s4u_Storage.cpp
src/surf/plugins/link_energy.cpp
src/surf/storage_n11.cpp
teshsuite/s4u/actor/actor.cpp
teshsuite/s4u/cloud-interrupt-migration/cloud-interrupt-migration.cpp
teshsuite/s4u/comm-pt2pt/comm-pt2pt.cpp
teshsuite/s4u/concurrent_rw/concurrent_rw.cpp
teshsuite/s4u/host_on_off_wait/host_on_off_wait.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp

index f159dd2..adef8b4 100644 (file)
@@ -58,7 +58,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 2fef81f..7affb48 100644 (file)
@@ -69,7 +69,7 @@ void Peer::operator()()
   // Getting peer data from the tracker.
   if (getPeersFromTracker()) {
     XBT_DEBUG("Got %zu peers from the tracker. Current status is: %s", connected_peers.size(), getStatus().c_str());
   // Getting peer data from the tracker.
   if (getPeersFromTracker()) {
     XBT_DEBUG("Got %zu peers from the tracker. Current status is: %s", connected_peers.size(), getStatus().c_str());
-    begin_receive_time = simgrid::s4u::Engine::getClock();
+    begin_receive_time = simgrid::s4u::Engine::get_clock();
     mailbox_->setReceiver(simgrid::s4u::Actor::self());
     if (hasFinished()) {
       sendHandshakeToAllPeers();
     mailbox_->setReceiver(simgrid::s4u::Actor::self());
     if (hasFinished()) {
       sendHandshakeToAllPeers();
@@ -229,7 +229,7 @@ int Peer::nbInterestedPeers()
 
 void Peer::leech()
 {
 
 void Peer::leech()
 {
-  double next_choked_update = simgrid::s4u::Engine::getClock() + UPDATE_CHOKED_INTERVAL;
+  double next_choked_update = simgrid::s4u::Engine::get_clock() + UPDATE_CHOKED_INTERVAL;
   XBT_DEBUG("Start downloading.");
 
   /* Send a "handshake" message to all the peers it got (since it couldn't have gotten more than 50 peers) */
   XBT_DEBUG("Start downloading.");
 
   /* Send a "handshake" message to all the peers it got (since it couldn't have gotten more than 50 peers) */
@@ -237,7 +237,7 @@ void Peer::leech()
   XBT_DEBUG("Starting main leech loop listening on mailbox: %s", mailbox_->get_cname());
 
   void* data = nullptr;
   XBT_DEBUG("Starting main leech loop listening on mailbox: %s", mailbox_->get_cname());
 
   void* data = nullptr;
-  while (simgrid::s4u::Engine::getClock() < deadline && countPieces(bitfield_) < FILE_PIECES) {
+  while (simgrid::s4u::Engine::get_clock() < deadline && countPieces(bitfield_) < FILE_PIECES) {
     if (comm_received == nullptr) {
       comm_received = mailbox_->get_async(&data);
     }
     if (comm_received == nullptr) {
       comm_received = mailbox_->get_async(&data);
     }
@@ -248,7 +248,7 @@ void Peer::leech()
       comm_received = nullptr;
     } else {
       // We don't execute the choke algorithm if we don't already have a piece
       comm_received = nullptr;
     } else {
       // We don't execute the choke algorithm if we don't already have a piece
-      if (simgrid::s4u::Engine::getClock() >= next_choked_update && countPieces(bitfield_) > 0) {
+      if (simgrid::s4u::Engine::get_clock() >= next_choked_update && countPieces(bitfield_) > 0) {
         updateChokedPeers();
         next_choked_update += UPDATE_CHOKED_INTERVAL;
       } else {
         updateChokedPeers();
         next_choked_update += UPDATE_CHOKED_INTERVAL;
       } else {
@@ -262,11 +262,11 @@ void Peer::leech()
 
 void Peer::seed()
 {
 
 void Peer::seed()
 {
-  double next_choked_update = simgrid::s4u::Engine::getClock() + UPDATE_CHOKED_INTERVAL;
+  double next_choked_update = simgrid::s4u::Engine::get_clock() + UPDATE_CHOKED_INTERVAL;
   XBT_DEBUG("Start seeding.");
   // start the main seed loop
   void* data = nullptr;
   XBT_DEBUG("Start seeding.");
   // start the main seed loop
   void* data = nullptr;
-  while (simgrid::s4u::Engine::getClock() < deadline) {
+  while (simgrid::s4u::Engine::get_clock() < deadline) {
     if (comm_received == nullptr) {
       comm_received = mailbox_->get_async(&data);
     }
     if (comm_received == nullptr) {
       comm_received = mailbox_->get_async(&data);
     }
@@ -276,7 +276,7 @@ void Peer::seed()
       delete message;
       comm_received = nullptr;
     } else {
       delete message;
       comm_received = nullptr;
     } else {
-      if (simgrid::s4u::Engine::getClock() >= next_choked_update) {
+      if (simgrid::s4u::Engine::get_clock() >= next_choked_update) {
         updateChokedPeers();
         // TODO: Change the choked peer algorithm when seeding.
         next_choked_update += UPDATE_CHOKED_INTERVAL;
         updateChokedPeers();
         // TODO: Change the choked peer algorithm when seeding.
         next_choked_update += UPDATE_CHOKED_INTERVAL;
@@ -419,9 +419,9 @@ void Peer::handleMessage()
   }
   // Update the peer speed.
   if (remote_peer) {
   }
   // Update the peer speed.
   if (remote_peer) {
-    remote_peer->addSpeedValue(1.0 / (simgrid::s4u::Engine::getClock() - begin_receive_time));
+    remote_peer->addSpeedValue(1.0 / (simgrid::s4u::Engine::get_clock() - begin_receive_time));
   }
   }
-  begin_receive_time = simgrid::s4u::Engine::getClock();
+  begin_receive_time = simgrid::s4u::Engine::get_clock();
 }
 
 /** Selects the appropriate piece to download and requests it to the remote_peer */
 }
 
 /** Selects the appropriate piece to download and requests it to the remote_peer */
@@ -558,7 +558,7 @@ void Peer::updateChokedPeers()
   /**If we are currently seeding, we unchoke the peer which has been unchoked the last time.*/
   if (hasFinished()) {
     Connection* remote_peer;
   /**If we are currently seeding, we unchoke the peer which has been unchoked the last time.*/
   if (hasFinished()) {
     Connection* remote_peer;
-    double unchoke_time = simgrid::s4u::Engine::getClock() + 1;
+    double unchoke_time = simgrid::s4u::Engine::get_clock() + 1;
     for (auto const& kv : connected_peers) {
       remote_peer = kv.second;
       if (remote_peer->last_unchoke < unchoke_time && remote_peer->interested && remote_peer->choked_upload) {
     for (auto const& kv : connected_peers) {
       remote_peer = kv.second;
       if (remote_peer->last_unchoke < unchoke_time && remote_peer->interested && remote_peer->choked_upload) {
@@ -612,7 +612,7 @@ void Peer::updateChokedPeers()
       xbt_assert((chosen_peer->choked_upload), "Tries to unchoked an unchoked peer");
       chosen_peer->choked_upload = false;
       active_peers.insert(chosen_peer);
       xbt_assert((chosen_peer->choked_upload), "Tries to unchoked an unchoked peer");
       chosen_peer->choked_upload = false;
       active_peers.insert(chosen_peer);
-      chosen_peer->last_unchoke = simgrid::s4u::Engine::getClock();
+      chosen_peer->last_unchoke = simgrid::s4u::Engine::get_clock();
       XBT_DEBUG("(%d) Sending a UNCHOKE to %d", id, chosen_peer->id);
       updateActivePeersSet(chosen_peer);
       sendMessage(chosen_peer->mailbox_, MESSAGE_UNCHOKE, MESSAGE_UNCHOKE_SIZE);
       XBT_DEBUG("(%d) Sending a UNCHOKE to %d", id, chosen_peer->id);
       updateActivePeersSet(chosen_peer);
       sendMessage(chosen_peer->mailbox_, MESSAGE_UNCHOKE, MESSAGE_UNCHOKE_SIZE);
index 9f0a73c..0c14622 100644 (file)
@@ -33,7 +33,7 @@ void Tracker::operator()()
 {
   simgrid::s4u::CommPtr comm = nullptr;
   void* received             = nullptr;
 {
   simgrid::s4u::CommPtr comm = nullptr;
   void* received             = nullptr;
-  while (simgrid::s4u::Engine::getClock() < deadline) {
+  while (simgrid::s4u::Engine::get_clock() < deadline) {
     if (comm == nullptr)
       comm = mailbox->get_async(&received);
     if (comm->test()) {
     if (comm == nullptr)
       comm = mailbox->get_async(&received);
     if (comm->test()) {
index 0a81c22..d4d3d72 100644 (file)
@@ -159,12 +159,12 @@ static void peer()
 
   Peer* p = new Peer();
 
 
   Peer* p = new Peer();
 
-  double start_time = simgrid::s4u::Engine::getClock();
+  double start_time = simgrid::s4u::Engine::get_clock();
   p->joinChain();
   p->forwardFile();
 
   simgrid::s4u::Comm::wait_all(&p->pending_sends);
   p->joinChain();
   p->forwardFile();
 
   simgrid::s4u::Comm::wait_all(&p->pending_sends);
-  double end_time = simgrid::s4u::Engine::getClock();
+  double end_time = simgrid::s4u::Engine::get_clock();
 
   XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", end_time - start_time, p->received_bytes,
            p->received_bytes / 1024.0 / 1024.0 / (end_time - start_time));
 
   XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", end_time - start_time, p->received_bytes,
            p->received_bytes / 1024.0 / 1024.0 / (end_time - start_time));
@@ -201,7 +201,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-8.acme.org"), peer);
 
   e.run();
   simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-8.acme.org"), peer);
 
   e.run();
-  XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 643f6d4..e35991f 100644 (file)
@@ -96,7 +96,7 @@ int main(int argc, char* argv[])
 
   e.run(); /** - Run the simulation */
 
 
   e.run(); /** - Run the simulation */
 
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index c94df9c..542b1b4 100644 (file)
@@ -16,14 +16,14 @@ static void pinger(std::vector<std::string> args)
 
   /* - Do the ping with a 1-Byte task (latency bound) ... */
   double* payload = new double();
 
   /* - Do the ping with a 1-Byte task (latency bound) ... */
   double* payload = new double();
-  *payload        = simgrid::s4u::Engine::getClock();
+  *payload        = simgrid::s4u::Engine::get_clock();
 
   simgrid::s4u::Mailbox::byName(args[0])->put(payload, 1);
   /* - ... then wait for the (large) pong */
   double* sender_time =
       static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_host()->get_name())->get());
 
 
   simgrid::s4u::Mailbox::byName(args[0])->put(payload, 1);
   /* - ... then wait for the (large) pong */
   double* sender_time =
       static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_host()->get_name())->get());
 
-  double communication_time = simgrid::s4u::Engine::getClock() - *sender_time;
+  double communication_time = simgrid::s4u::Engine::get_clock() - *sender_time;
   XBT_INFO("Task received : large communication (bandwidth bound)");
   XBT_INFO("Pong time (bandwidth bound): %.3f", communication_time);
   delete sender_time;
   XBT_INFO("Task received : large communication (bandwidth bound)");
   XBT_INFO("Pong time (bandwidth bound): %.3f", communication_time);
   delete sender_time;
@@ -39,14 +39,14 @@ static void ponger(std::vector<std::string> args)
   /* - Receive the (small) ping first ....*/
   double* sender_time =
       static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_host()->get_name())->get());
   /* - Receive the (small) ping first ....*/
   double* sender_time =
       static_cast<double*>(simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_host()->get_name())->get());
-  double communication_time = simgrid::s4u::Engine::getClock() - *sender_time;
+  double communication_time = simgrid::s4u::Engine::get_clock() - *sender_time;
   XBT_INFO("Task received : small communication (latency bound)");
   XBT_INFO(" Ping time (latency bound) %f", communication_time);
   delete sender_time;
 
   /*  - ... Then send a 1GB pong back (bandwidth bound) */
   double* payload = new double();
   XBT_INFO("Task received : small communication (latency bound)");
   XBT_INFO(" Ping time (latency bound) %f", communication_time);
   delete sender_time;
 
   /*  - ... Then send a 1GB pong back (bandwidth bound) */
   double* payload = new double();
-  *payload        = simgrid::s4u::Engine::getClock();
+  *payload        = simgrid::s4u::Engine::get_clock();
   XBT_INFO("task_bw->data = %.3f", *payload);
 
   simgrid::s4u::Mailbox::byName(args[0])->put(payload, 1e9);
   XBT_INFO("task_bw->data = %.3f", *payload);
 
   simgrid::s4u::Mailbox::byName(args[0])->put(payload, 1e9);
@@ -68,7 +68,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Total simulation time: %.3f", e.getClock());
+  XBT_INFO("Total simulation time: %.3f", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 5bf49e8..7dfba65 100644 (file)
@@ -67,7 +67,7 @@ int main(int argc, char** argv)
     id++;
   }
   e.run();
     id++;
   }
   e.run();
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index c0281b0..7d35e58 100644 (file)
@@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 
 static void worker(double computation_amount, bool use_bound, double bound)
 {
 
 static void worker(double computation_amount, bool use_bound, double bound)
 {
-  double clock_start = simgrid::s4u::Engine::getClock();
+  double clock_start = simgrid::s4u::Engine::get_clock();
 
   simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_init(computation_amount);
 
 
   simgrid::s4u::ExecPtr exec = simgrid::s4u::this_actor::exec_init(computation_amount);
 
@@ -22,7 +22,7 @@ static void worker(double computation_amount, bool use_bound, double bound)
   }
   exec->start();
   exec->wait();
   }
   exec->start();
   exec->wait();
-  double clock_end     = simgrid::s4u::Engine::getClock();
+  double clock_end     = simgrid::s4u::Engine::get_clock();
   double duration      = clock_end - clock_start;
   double flops_per_sec = computation_amount / duration;
 
   double duration      = clock_end - clock_start;
   double flops_per_sec = computation_amount / duration;
 
@@ -254,7 +254,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
 
   e.run();
   simgrid::s4u::Actor::create("master_", simgrid::s4u::Host::by_name("Fafard"), master_main);
 
   e.run();
-  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index cfb9e08..46c1156 100644 (file)
@@ -12,9 +12,9 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_cloud_migration, "Messages specific for this ex
 static void vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
 {
   simgrid::s4u::Host* src_pm = vm->getPm();
 static void vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
 {
   simgrid::s4u::Host* src_pm = vm->getPm();
-  double mig_sta             = simgrid::s4u::Engine::getClock();
+  double mig_sta             = simgrid::s4u::Engine::get_clock();
   sg_vm_migrate(vm, dst_pm);
   sg_vm_migrate(vm, dst_pm);
-  double mig_end = simgrid::s4u::Engine::getClock();
+  double mig_end = simgrid::s4u::Engine::get_clock();
 
   XBT_INFO("%s migrated: %s->%s in %g s", vm->get_cname(), src_pm->get_cname(), dst_pm->get_cname(), mig_end - mig_sta);
 }
 
   XBT_INFO("%s migrated: %s->%s in %g s", vm->get_cname(), src_pm->get_cname(), dst_pm->get_cname(), mig_end - mig_sta);
 }
@@ -94,7 +94,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index ba2a67d..6487b32 100644 (file)
@@ -11,9 +11,9 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 
 static void computation_fun()
 {
 
 static void computation_fun()
 {
-  double clock_sta = simgrid::s4u::Engine::getClock();
+  double clock_sta = simgrid::s4u::Engine::get_clock();
   simgrid::s4u::this_actor::execute(1000000);
   simgrid::s4u::this_actor::execute(1000000);
-  double clock_end = simgrid::s4u::Engine::getClock();
+  double clock_end = simgrid::s4u::Engine::get_clock();
 
   XBT_INFO("%s:%s task executed %g", simgrid::s4u::this_actor::get_host()->get_cname(),
            simgrid::s4u::this_actor::get_cname(), clock_end - clock_sta);
 
   XBT_INFO("%s:%s task executed %g", simgrid::s4u::this_actor::get_host()->get_cname(),
            simgrid::s4u::this_actor::get_cname(), clock_end - clock_sta);
@@ -36,7 +36,7 @@ static void communication_tx_fun(std::vector<std::string> args)
   s_payload* payload            = new s_payload;
   payload->tx_actor_name        = simgrid::s4u::Actor::self()->get_cname();
   payload->tx_host              = simgrid::s4u::this_actor::get_host();
   s_payload* payload            = new s_payload;
   payload->tx_actor_name        = simgrid::s4u::Actor::self()->get_cname();
   payload->tx_host              = simgrid::s4u::this_actor::get_host();
-  payload->clock_sta            = simgrid::s4u::Engine::getClock();
+  payload->clock_sta            = simgrid::s4u::Engine::get_clock();
 
   mbox->put(payload, 1000000);
 }
 
   mbox->put(payload, 1000000);
 }
@@ -48,7 +48,7 @@ static void communication_rx_fun(std::vector<std::string> args)
   simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(args.at(0));
 
   struct s_payload* payload = static_cast<struct s_payload*>(mbox->get());
   simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(args.at(0));
 
   struct s_payload* payload = static_cast<struct s_payload*>(mbox->get());
-  double clock_end          = simgrid::s4u::Engine::getClock();
+  double clock_end          = simgrid::s4u::Engine::get_clock();
 
   XBT_INFO("%s:%s to %s:%s => %g sec", payload->tx_host->get_cname(), payload->tx_actor_name, host_name, actor_name,
            clock_end - payload->clock_sta);
 
   XBT_INFO("%s:%s to %s:%s => %g sec", payload->tx_host->get_cname(), payload->tx_actor_name, host_name, actor_name,
            clock_end - payload->clock_sta);
@@ -216,7 +216,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 620a957..0db3cef 100644 (file)
@@ -63,7 +63,7 @@ Node::Node(std::vector<std::string> args)
 
   if (args.size() == 3) { // first ring
     deadline_   = std::stod(args[2]);
 
   if (args.size() == 3) { // first ring
     deadline_   = std::stod(args[2]);
-    start_time_ = simgrid::s4u::Engine::getClock();
+    start_time_ = simgrid::s4u::Engine::get_clock();
     XBT_DEBUG("Create a new Chord ring...");
   } else {
     known_id_   = std::stoi(args[2]);
     XBT_DEBUG("Create a new Chord ring...");
   } else {
     known_id_   = std::stoi(args[2]);
index 4376b7b..d7613fb 100644 (file)
@@ -71,7 +71,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Simulated time: %g", e.getClock());
+  XBT_INFO("Simulated time: %g", e.get_clock());
 
   chord_exit();
 
 
   chord_exit();
 
index 4e82016..240a555 100644 (file)
@@ -125,7 +125,7 @@ public:
     if (not joined)
       return;
     void* data                         = nullptr;
     if (not joined)
       return;
     void* data                         = nullptr;
-    double now                         = simgrid::s4u::Engine::getClock();
+    double now                         = simgrid::s4u::Engine::get_clock();
     double next_stabilize_date         = start_time_ + PERIODIC_STABILIZE_DELAY;
     double next_fix_fingers_date       = start_time_ + PERIODIC_FIX_FINGERS_DELAY;
     double next_check_predecessor_date = start_time_ + PERIODIC_CHECK_PREDECESSOR_DELAY;
     double next_stabilize_date         = start_time_ + PERIODIC_STABILIZE_DELAY;
     double next_fix_fingers_date       = start_time_ + PERIODIC_FIX_FINGERS_DELAY;
     double next_check_predecessor_date = start_time_ + PERIODIC_CHECK_PREDECESSOR_DELAY;
@@ -138,21 +138,21 @@ public:
         // no task was received: make some periodic calls
         if (now >= next_stabilize_date) {
           stabilize();
         // no task was received: make some periodic calls
         if (now >= next_stabilize_date) {
           stabilize();
-          next_stabilize_date = simgrid::s4u::Engine::getClock() + PERIODIC_STABILIZE_DELAY;
+          next_stabilize_date = simgrid::s4u::Engine::get_clock() + PERIODIC_STABILIZE_DELAY;
         } else if (now >= next_fix_fingers_date) {
           fixFingers();
         } else if (now >= next_fix_fingers_date) {
           fixFingers();
-          next_fix_fingers_date = simgrid::s4u::Engine::getClock() + PERIODIC_FIX_FINGERS_DELAY;
+          next_fix_fingers_date = simgrid::s4u::Engine::get_clock() + PERIODIC_FIX_FINGERS_DELAY;
         } else if (now >= next_check_predecessor_date) {
           checkPredecessor();
         } else if (now >= next_check_predecessor_date) {
           checkPredecessor();
-          next_check_predecessor_date = simgrid::s4u::Engine::getClock() + PERIODIC_CHECK_PREDECESSOR_DELAY;
+          next_check_predecessor_date = simgrid::s4u::Engine::get_clock() + PERIODIC_CHECK_PREDECESSOR_DELAY;
         } else if (now >= next_lookup_date) {
           randomLookup();
         } else if (now >= next_lookup_date) {
           randomLookup();
-          next_lookup_date = simgrid::s4u::Engine::getClock() + PERIODIC_LOOKUP_DELAY;
+          next_lookup_date = simgrid::s4u::Engine::get_clock() + PERIODIC_LOOKUP_DELAY;
         } else {
           // nothing to do: sleep for a while
           simgrid::s4u::this_actor::sleep_for(SLEEP_DELAY);
         }
         } else {
           // nothing to do: sleep for a while
           simgrid::s4u::this_actor::sleep_for(SLEEP_DELAY);
         }
-        now = simgrid::s4u::Engine::getClock();
+        now = simgrid::s4u::Engine::get_clock();
       }
 
       if (data != nullptr) {
       }
 
       if (data != nullptr) {
@@ -161,7 +161,7 @@ public:
         comm_receive = nullptr;
         data         = nullptr;
       }
         comm_receive = nullptr;
         data         = nullptr;
       }
-      now = simgrid::s4u::Engine::getClock();
+      now = simgrid::s4u::Engine::get_clock();
     }
     if (comm_receive != nullptr) {
       if (comm_receive->test())
     }
     if (comm_receive != nullptr) {
       if (comm_receive->test())
index ba7f12f..2e3208c 100644 (file)
@@ -183,7 +183,7 @@ bool Node::findNode(unsigned int id_to_find, bool count_in_stats)
   unsigned int answers;
   bool destination_found   = false;
   unsigned int nodes_added = 0;
   unsigned int answers;
   bool destination_found   = false;
   unsigned int nodes_added = 0;
-  double global_timeout    = simgrid::s4u::Engine::getClock() + find_node_global_timeout;
+  double global_timeout    = simgrid::s4u::Engine::get_clock() + find_node_global_timeout;
   unsigned int steps       = 0;
 
   /* First we build a list of who we already know */
   unsigned int steps       = 0;
 
   /* First we build a list of who we already know */
@@ -196,9 +196,9 @@ bool Node::findNode(unsigned int id_to_find, bool count_in_stats)
     answers        = 0;
     queries        = sendFindNodeToBest(node_list);
     nodes_added    = 0;
     answers        = 0;
     queries        = sendFindNodeToBest(node_list);
     nodes_added    = 0;
-    double timeout = simgrid::s4u::Engine::getClock() + find_node_timeout;
+    double timeout = simgrid::s4u::Engine::get_clock() + find_node_timeout;
     steps++;
     steps++;
-    double time_beginreceive = simgrid::s4u::Engine::getClock();
+    double time_beginreceive = simgrid::s4u::Engine::get_clock();
 
     simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(std::to_string(id_));
     do {
 
     simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(std::to_string(id_));
     do {
@@ -226,8 +226,8 @@ bool Node::findNode(unsigned int id_to_find, bool count_in_stats)
             handleFindNode(msg);
           }
           // Update the timeout if we didn't have our answer
             handleFindNode(msg);
           }
           // Update the timeout if we didn't have our answer
-          timeout += simgrid::s4u::Engine::getClock() - time_beginreceive;
-          time_beginreceive = simgrid::s4u::Engine::getClock();
+          timeout += simgrid::s4u::Engine::get_clock() - time_beginreceive;
+          time_beginreceive = simgrid::s4u::Engine::get_clock();
         }
         delete msg->answer_;
         delete msg;
         }
         delete msg->answer_;
         delete msg;
@@ -235,10 +235,10 @@ bool Node::findNode(unsigned int id_to_find, bool count_in_stats)
       } else {
         simgrid::s4u::this_actor::sleep_for(1);
       }
       } else {
         simgrid::s4u::this_actor::sleep_for(1);
       }
-    } while (simgrid::s4u::Engine::getClock() < timeout && answers < queries);
+    } while (simgrid::s4u::Engine::get_clock() < timeout && answers < queries);
     destination_found = node_list->destinationFound();
   } while (not destination_found && (nodes_added > 0 || answers == 0) &&
     destination_found = node_list->destinationFound();
   } while (not destination_found && (nodes_added > 0 || answers == 0) &&
-           simgrid::s4u::Engine::getClock() < global_timeout && steps < MAX_STEPS);
+           simgrid::s4u::Engine::get_clock() < global_timeout && steps < MAX_STEPS);
 
   if (destination_found) {
     if (count_in_stats)
 
   if (destination_found) {
     if (count_in_stats)
index edf9c5c..89edd85 100644 (file)
@@ -40,13 +40,13 @@ static int node(int argc, char* argv[])
   if (join_success) {
     XBT_VERB("Ok, I'm joining the network with id %u", node->getId());
     // We start the main loop
   if (join_success) {
     XBT_VERB("Ok, I'm joining the network with id %u", node->getId());
     // We start the main loop
-    double next_lookup_time = simgrid::s4u::Engine::getClock() + random_lookup_interval;
+    double next_lookup_time = simgrid::s4u::Engine::get_clock() + random_lookup_interval;
 
     XBT_VERB("Main loop start");
 
     simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(std::to_string(node->getId()));
 
 
     XBT_VERB("Main loop start");
 
     simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(std::to_string(node->getId()));
 
-    while (simgrid::s4u::Engine::getClock() < deadline) {
+    while (simgrid::s4u::Engine::get_clock() < deadline) {
       if (node->receive_comm == nullptr)
         node->receive_comm = mailbox->get_async(&node->received_msg);
 
       if (node->receive_comm == nullptr)
         node->receive_comm = mailbox->get_async(&node->received_msg);
 
@@ -62,7 +62,7 @@ static int node(int argc, char* argv[])
           simgrid::s4u::this_actor::sleep_for(1);
       } else {
         /* We search for a pseudo random node */
           simgrid::s4u::this_actor::sleep_for(1);
       } else {
         /* We search for a pseudo random node */
-        if (simgrid::s4u::Engine::getClock() >= next_lookup_time) {
+        if (simgrid::s4u::Engine::get_clock() >= next_lookup_time) {
           node->randomLookup();
           next_lookup_time += random_lookup_interval;
         } else {
           node->randomLookup();
           next_lookup_time += random_lookup_interval;
         } else {
@@ -96,7 +96,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index fa9833a..b1893e1 100644 (file)
@@ -17,20 +17,20 @@ static void dvfs()
   XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J", host1->getSpeed(),
            sg_host_get_consumed_energy(host1));
 
   XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J", host1->getSpeed(),
            sg_host_get_consumed_energy(host1));
 
-  double start = simgrid::s4u::Engine::getClock();
+  double start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Sleep for 10 seconds");
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E; Energy dissipated=%.2f J",
   XBT_INFO("Sleep for 10 seconds");
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E; Energy dissipated=%.2f J",
-           simgrid::s4u::Engine::getClock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
 
   // Execute something
 
   // Execute something
-  start             = simgrid::s4u::Engine::getClock();
+  start             = simgrid::s4u::Engine::get_clock();
   double flopAmount = 100E6;
   XBT_INFO("Run a task of %.0E flops", flopAmount);
   simgrid::s4u::this_actor::execute(flopAmount);
   XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW"
            " depending on load; Energy dissipated=%.0f J",
   double flopAmount = 100E6;
   XBT_INFO("Run a task of %.0E flops", flopAmount);
   simgrid::s4u::this_actor::execute(flopAmount);
   XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW"
            " depending on load; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::getClock() - start, host1->getSpeed(),
+           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(),
            sg_host_get_wattmin_at(host1, host1->getPstate()), sg_host_get_wattmax_at(host1, host1->getPstate()),
            sg_host_get_consumed_energy(host1));
 
            sg_host_get_wattmin_at(host1, host1->getPstate()), sg_host_get_wattmax_at(host1, host1->getPstate()),
            sg_host_get_consumed_energy(host1));
 
@@ -41,26 +41,26 @@ static void dvfs()
            host1->getPstateSpeed(pstate), host1->getSpeed());
 
   // Run another task
            host1->getPstateSpeed(pstate), host1->getSpeed());
 
   // Run another task
-  start = simgrid::s4u::Engine::getClock();
+  start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Run a task of %.0E flops", flopAmount);
   simgrid::s4u::this_actor::execute(flopAmount);
   XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
   XBT_INFO("Run a task of %.0E flops", flopAmount);
   simgrid::s4u::this_actor::execute(flopAmount);
   XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::getClock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
 
 
-  start = simgrid::s4u::Engine::getClock();
+  start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Sleep for 4 seconds");
   simgrid::s4u::this_actor::sleep_for(4);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
   XBT_INFO("Sleep for 4 seconds");
   simgrid::s4u::this_actor::sleep_for(4);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::getClock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
 
   // =========== Turn the other host off ==========
   XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 dissipated %.0f J so far.",
            sg_host_get_consumed_energy(host2));
   host2->turnOff();
 
   // =========== Turn the other host off ==========
   XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 dissipated %.0f J so far.",
            sg_host_get_consumed_energy(host2));
   host2->turnOff();
-  start = simgrid::s4u::Engine::getClock();
+  start = simgrid::s4u::Engine::get_clock();
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J",
-           simgrid::s4u::Engine::getClock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
+           simgrid::s4u::Engine::get_clock() - start, host1->getSpeed(), sg_host_get_consumed_energy(host1));
 }
 
 int main(int argc, char* argv[])
 }
 
 int main(int argc, char* argv[])
index ef487e9..2eb1e6e 100644 (file)
@@ -65,7 +65,7 @@ int main(int argc, char* argv[])
 
   XBT_INFO("Total simulation time: %.2f; Host2 and Host3 must have the exact same energy consumption; Host1 is "
            "multi-core and will differ.",
 
   XBT_INFO("Total simulation time: %.2f; Host2 and Host3 must have the exact same energy consumption; Host1 is "
            "multi-core and will differ.",
-           simgrid::s4u::Engine::getClock());
+           simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index fd841f4..a47acce 100644 (file)
@@ -27,7 +27,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index b224cc9..c9d712f 100644 (file)
@@ -20,7 +20,7 @@ static int dvfs()
   // Run a task
   simgrid::s4u::this_actor::execute(workload);
 
   // Run a task
   simgrid::s4u::this_actor::execute(workload);
 
-  double task_time = simgrid::s4u::Engine::getClock();
+  double task_time = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Task1 simulation time: %e", task_time);
 
   // Change power peak
   XBT_INFO("Task1 simulation time: %e", task_time);
 
   // Change power peak
@@ -35,7 +35,7 @@ static int dvfs()
   // Run a second task
   simgrid::s4u::this_actor::execute(workload);
 
   // Run a second task
   simgrid::s4u::this_actor::execute(workload);
 
-  task_time = simgrid::s4u::Engine::getClock() - task_time;
+  task_time = simgrid::s4u::Engine::get_clock() - task_time;
   XBT_INFO("Task2 simulation time: %e", task_time);
 
   // Verify that the default pstate is set to 0
   XBT_INFO("Task2 simulation time: %e", task_time);
 
   // Verify that the default pstate is set to 0
@@ -59,7 +59,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Total simulation time: %e", e.getClock());
+  XBT_INFO("Total simulation time: %e", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index e7d1ee1..429addc 100644 (file)
@@ -54,7 +54,7 @@ int main(int argc, char** argv)
   e.load_platform(argv[1]);
   e.register_function("host", host);
   e.load_deployment(argv[2]);
   e.load_platform(argv[1]);
   e.register_function("host", host);
   e.load_deployment(argv[2]);
-  std::vector<simgrid::s4u::Storage*> allStorages = e.getAllStorages();
+  std::vector<simgrid::s4u::Storage*> allStorages = e.get_all_storages();
 
   for (auto const& s : allStorages) {
     XBT_INFO("Init: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s) / INMEGA,
 
   for (auto const& s : allStorages) {
     XBT_INFO("Init: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s) / INMEGA,
@@ -68,6 +68,6 @@ int main(int argc, char** argv)
              sg_storage_get_size_free(s) / INMEGA, s->get_cname());
   }
 
              sg_storage_get_size_free(s) / INMEGA, s->get_cname());
   }
 
-  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Simulation time %g", simgrid::s4u::Engine::get_clock());
   return 0;
 }
   return 0;
 }
index e73b588..bb8e1c5 100644 (file)
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
   simgrid::s4u::Actor::create("", simgrid::s4u::Host::by_name("denise"), host);
 
   e.run();
   simgrid::s4u::Actor::create("", simgrid::s4u::Host::by_name("denise"), host);
 
   e.run();
-  XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 6345b2e..ee43098 100644 (file)
@@ -15,24 +15,28 @@ static void execute_load_test()
   XBT_INFO("Initial peak speed: %.0E flop/s; number of flops computed so far: %.0E (should be 0) and current average load: %.5f (should be 0)", host->getSpeed(),
            sg_host_get_computed_flops(host), sg_host_get_avg_load(host));
 
   XBT_INFO("Initial peak speed: %.0E flop/s; number of flops computed so far: %.0E (should be 0) and current average load: %.5f (should be 0)", host->getSpeed(),
            sg_host_get_computed_flops(host), sg_host_get_avg_load(host));
 
-  double start = simgrid::s4u::Engine::getClock();
+  double start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Sleep for 10 seconds");
   simgrid::s4u::this_actor::sleep_for(10);
 
   double speed = host->getSpeed();
   XBT_INFO("Done sleeping %.2fs; peak speed: %.0E flop/s; number of flops computed so far: %.0E (nothing should have "
            "changed)",
   XBT_INFO("Sleep for 10 seconds");
   simgrid::s4u::this_actor::sleep_for(10);
 
   double speed = host->getSpeed();
   XBT_INFO("Done sleeping %.2fs; peak speed: %.0E flop/s; number of flops computed so far: %.0E (nothing should have "
            "changed)",
-           simgrid::s4u::Engine::getClock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
 
   // Run a task
 
   // Run a task
-  start = simgrid::s4u::Engine::getClock();
+  start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Run a task of %.0E flops at current speed of %.0E flop/s", 200E6, host->getSpeed());
   simgrid::s4u::this_actor::execute(200E6);
 
   XBT_INFO("Run a task of %.0E flops at current speed of %.0E flop/s", 200E6, host->getSpeed());
   simgrid::s4u::this_actor::execute(200E6);
 
-  XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s (when I started the computation, the speed was set to %.0E flop/s); number of flops computed so "
+  XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s (when I started the computation, "
+           "the speed was set to %.0E flop/s); number of flops computed so "
            "far: %.2E, average load as reported by the HostLoad plugin: %.5f (should be %.5f)",
            "far: %.2E, average load as reported by the HostLoad plugin: %.5f (should be %.5f)",
-           simgrid::s4u::Engine::getClock() - start, host->getSpeed(), speed, sg_host_get_computed_flops(host), sg_host_get_avg_load(host),
-           static_cast<double>(200E6)/(10.5*speed*host->getCoreCount()+(simgrid::s4u::Engine::getClock()-start-0.5)*host->getSpeed()*host->getCoreCount()));
+           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), speed, sg_host_get_computed_flops(host),
+           sg_host_get_avg_load(host),
+           static_cast<double>(200E6) /
+               (10.5 * speed * host->getCoreCount() +
+                (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->getSpeed() * host->getCoreCount()));
 
   // ========= Change power peak =========
   int pstate = 1;
 
   // ========= Change power peak =========
   int pstate = 1;
@@ -41,31 +45,31 @@ static void execute_load_test()
            host->getPstateSpeed(pstate), host->getSpeed(), sg_host_get_avg_load(host));
 
   // Run a second task
            host->getPstateSpeed(pstate), host->getSpeed(), sg_host_get_avg_load(host));
 
   // Run a second task
-  start = simgrid::s4u::Engine::getClock();
+  start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("Run a task of %.0E flops", 100E6);
   simgrid::s4u::this_actor::execute(100E6);
   XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s; number of flops computed so "
            "far: %.2E",
   XBT_INFO("Run a task of %.0E flops", 100E6);
   simgrid::s4u::this_actor::execute(100E6);
   XBT_INFO("Done working on my task; this took %.2fs; current peak speed: %.0E flop/s; number of flops computed so "
            "far: %.2E",
-           simgrid::s4u::Engine::getClock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
 
 
-  start = simgrid::s4u::Engine::getClock();
+  start = simgrid::s4u::Engine::get_clock();
   XBT_INFO("========= Requesting a reset of the computation and load counters");
   sg_host_load_reset(host);
   XBT_INFO("After reset: %.0E flops computed; load is %.5f", sg_host_get_computed_flops(host), sg_host_get_avg_load(host));
   XBT_INFO("Sleep for 4 seconds");
   simgrid::s4u::this_actor::sleep_for(4);
   XBT_INFO("Done sleeping %.2f s; peak speed: %.0E flop/s; number of flops computed so far: %.0E",
   XBT_INFO("========= Requesting a reset of the computation and load counters");
   sg_host_load_reset(host);
   XBT_INFO("After reset: %.0E flops computed; load is %.5f", sg_host_get_computed_flops(host), sg_host_get_avg_load(host));
   XBT_INFO("Sleep for 4 seconds");
   simgrid::s4u::this_actor::sleep_for(4);
   XBT_INFO("Done sleeping %.2f s; peak speed: %.0E flop/s; number of flops computed so far: %.0E",
-           simgrid::s4u::Engine::getClock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
 
   // =========== Turn the other host off ==========
   s4u_Host* host2 = simgrid::s4u::Host::by_name("MyHost2");
   XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 computed %.0f flops so far and has an average load of %.5f.",
            sg_host_get_computed_flops(host2), sg_host_get_avg_load(host2));
   host2->turnOff();
 
   // =========== Turn the other host off ==========
   s4u_Host* host2 = simgrid::s4u::Host::by_name("MyHost2");
   XBT_INFO("Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 computed %.0f flops so far and has an average load of %.5f.",
            sg_host_get_computed_flops(host2), sg_host_get_avg_load(host2));
   host2->turnOff();
-  start = simgrid::s4u::Engine::getClock();
+  start = simgrid::s4u::Engine::get_clock();
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping %.2f s; peak speed: %.0E flop/s; number of flops computed so far: %.0E",
   simgrid::s4u::this_actor::sleep_for(10);
   XBT_INFO("Done sleeping %.2f s; peak speed: %.0E flop/s; number of flops computed so far: %.0E",
-           simgrid::s4u::Engine::getClock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
+           simgrid::s4u::Engine::get_clock() - start, host->getSpeed(), sg_host_get_computed_flops(host));
 }
 
 static void change_speed()
 }
 
 static void change_speed()
@@ -90,7 +94,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Total simulation time: %.2f", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Total simulation time: %.2f", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 1340ea9..8cfd309 100644 (file)
@@ -51,36 +51,36 @@ public:
   static void compute(simgrid::xbt::ReplayAction& action)
   {
     double amount = std::stod(action[2]);
   static void compute(simgrid::xbt::ReplayAction& action)
   {
     double amount = std::stod(action[2]);
-    double clock  = simgrid::s4u::Engine::getClock();
+    double clock  = simgrid::s4u::Engine::get_clock();
     ACT_DEBUG("Entering %s", NAME.c_str());
     simgrid::s4u::this_actor::execute(amount);
     ACT_DEBUG("Entering %s", NAME.c_str());
     simgrid::s4u::this_actor::execute(amount);
-    log_action(action, simgrid::s4u::Engine::getClock() - clock);
+    log_action(action, simgrid::s4u::Engine::get_clock() - clock);
   }
 
   static void send(simgrid::xbt::ReplayAction& action)
   {
     double size                 = std::stod(action[3]);
     std::string* payload        = new std::string(action[3]);
   }
 
   static void send(simgrid::xbt::ReplayAction& action)
   {
     double size                 = std::stod(action[3]);
     std::string* payload        = new std::string(action[3]);
-    double clock                = simgrid::s4u::Engine::getClock();
+    double clock                = simgrid::s4u::Engine::get_clock();
     simgrid::s4u::MailboxPtr to = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_name() + "_" + action[2]);
     ACT_DEBUG("Entering Send: %s (size: %g) -- Actor %s on mailbox %s", NAME.c_str(), size,
               simgrid::s4u::this_actor::get_cname(), to->get_cname());
     to->put(payload, size);
     delete payload;
 
     simgrid::s4u::MailboxPtr to = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::get_name() + "_" + action[2]);
     ACT_DEBUG("Entering Send: %s (size: %g) -- Actor %s on mailbox %s", NAME.c_str(), size,
               simgrid::s4u::this_actor::get_cname(), to->get_cname());
     to->put(payload, size);
     delete payload;
 
-    log_action(action, simgrid::s4u::Engine::getClock() - clock);
+    log_action(action, simgrid::s4u::Engine::get_clock() - clock);
   }
 
   static void recv(simgrid::xbt::ReplayAction& action)
   {
   }
 
   static void recv(simgrid::xbt::ReplayAction& action)
   {
-    double clock = simgrid::s4u::Engine::getClock();
+    double clock = simgrid::s4u::Engine::get_clock();
     simgrid::s4u::MailboxPtr from =
         simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::get_name());
 
     ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME.c_str(), simgrid::s4u::this_actor::get_cname(),
               from->get_cname());
     from->get();
     simgrid::s4u::MailboxPtr from =
         simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::get_name());
 
     ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME.c_str(), simgrid::s4u::this_actor::get_cname(),
               from->get_cname());
     from->get();
-    log_action(action, simgrid::s4u::Engine::getClock() - clock);
+    log_action(action, simgrid::s4u::Engine::get_clock() - clock);
   }
 };
 
   }
 };
 
@@ -117,7 +117,7 @@ int main(int argc, char* argv[])
     simgrid::xbt::action_fs = nullptr;
   }
 
     simgrid::xbt::action_fs = nullptr;
   }
 
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index d793ea1..f1584eb 100644 (file)
@@ -61,7 +61,7 @@ public:
   static void open(simgrid::xbt::ReplayAction& action)
   {
     std::string file_name = action[2];
   static void open(simgrid::xbt::ReplayAction& action)
   {
     std::string file_name = action[2];
-    double clock          = simgrid::s4u::Engine::getClock();
+    double clock          = simgrid::s4u::Engine::get_clock();
     std::string full_name = simgrid::s4u::this_actor::get_name() + ":" + file_name;
 
     ACT_DEBUG("Entering Open: %s (filename: %s)", NAME.c_str(), file_name.c_str());
     std::string full_name = simgrid::s4u::this_actor::get_name() + ":" + file_name;
 
     ACT_DEBUG("Entering Open: %s (filename: %s)", NAME.c_str(), file_name.c_str());
@@ -69,34 +69,34 @@ public:
 
     opened_files.insert({full_name, file});
 
 
     opened_files.insert({full_name, file});
 
-    log_action(action, simgrid::s4u::Engine::getClock() - clock);
+    log_action(action, simgrid::s4u::Engine::get_clock() - clock);
   }
 
   static void read(simgrid::xbt::ReplayAction& action)
   {
     std::string file_name = action[2];
     sg_size_t size        = std::stoul(action[3]);
   }
 
   static void read(simgrid::xbt::ReplayAction& action)
   {
     std::string file_name = action[2];
     sg_size_t size        = std::stoul(action[3]);
-    double clock          = simgrid::s4u::Engine::getClock();
+    double clock          = simgrid::s4u::Engine::get_clock();
 
     simgrid::s4u::File* file = get_file_descriptor(file_name);
 
     ACT_DEBUG("Entering Read: %s (size: %llu)", NAME.c_str(), size);
     file->read(size);
 
 
     simgrid::s4u::File* file = get_file_descriptor(file_name);
 
     ACT_DEBUG("Entering Read: %s (size: %llu)", NAME.c_str(), size);
     file->read(size);
 
-    log_action(action, simgrid::s4u::Engine::getClock() - clock);
+    log_action(action, simgrid::s4u::Engine::get_clock() - clock);
   }
 
   static void close(simgrid::xbt::ReplayAction& action)
   {
     std::string file_name = action[2];
   }
 
   static void close(simgrid::xbt::ReplayAction& action)
   {
     std::string file_name = action[2];
-    double clock          = simgrid::s4u::Engine::getClock();
+    double clock          = simgrid::s4u::Engine::get_clock();
 
     simgrid::s4u::File* file = get_file_descriptor(file_name);
 
     ACT_DEBUG("Entering Close: %s (filename: %s)", NAME.c_str(), file_name.c_str());
     delete file;
 
 
     simgrid::s4u::File* file = get_file_descriptor(file_name);
 
     ACT_DEBUG("Entering Close: %s (filename: %s)", NAME.c_str(), file_name.c_str());
     delete file;
 
-    log_action(action, simgrid::s4u::Engine::getClock() - clock);
+    log_action(action, simgrid::s4u::Engine::get_clock() - clock);
   }
 };
 
   }
 };
 
@@ -132,7 +132,7 @@ int main(int argc, char* argv[])
     simgrid::xbt::action_fs = nullptr;
   }
 
     simgrid::xbt::action_fs = nullptr;
   }
 
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 44eab9d..f71fff5 100644 (file)
@@ -81,26 +81,24 @@ protected:
   void del_storage(std::string name);
 
 public:
   void del_storage(std::string name);
 
 public:
-  simgrid::s4u::Host* host_by_name(std::string name);
-  simgrid::s4u::Host* host_by_name_or_null(std::string name);
-  simgrid::s4u::Storage* storage_by_name(std::string name);
-  simgrid::s4u::Storage* storage_by_name_or_null(std::string name);
-
   size_t get_host_count();
   size_t get_host_count();
-  void get_host_list(std::vector<Host*>* whereTo);
   std::vector<Host*> get_all_hosts();
   std::vector<Host*> get_all_hosts();
+  simgrid::s4u::Host* host_by_name(std::string name);
+  simgrid::s4u::Host* host_by_name_or_null(std::string name);
 
 
-  size_t getLinkCount();
-  void getLinkList(std::vector<Link*> * list);
-  std::vector<Link*> getAllLinks();
+  size_t get_link_count();
+  std::vector<Link*> get_all_links();
 
 
-  std::vector<Storage*> getAllStorages();
+  size_t get_storage_count();
+  std::vector<Storage*> get_all_storages();
+  simgrid::s4u::Storage* storage_by_name(std::string name);
+  simgrid::s4u::Storage* storage_by_name_or_null(std::string name);
 
   /** @brief Run the simulation */
   void run();
 
   /** @brief Retrieve the simulation time */
 
   /** @brief Run the simulation */
   void run();
 
   /** @brief Retrieve the simulation time */
-  static double getClock();
+  static double get_clock();
 
   /** @brief Retrieve the engine singleton */
   static s4u::Engine* getInstance();
 
   /** @brief Retrieve the engine singleton */
   static s4u::Engine* getInstance();
@@ -180,14 +178,25 @@ public:
   }
 
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_host_count()") size_t getHostCount() { return get_host_count(); }
   }
 
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_host_count()") size_t getHostCount() { return get_host_count(); }
-  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_host_list()") void getHostList(std::vector<Host*>* whereTo)
-  {
-    get_host_list(whereTo);
-  }
+  XBT_ATTRIB_DEPRECATED_v322("Engine::getHostList() is deprecated in favor of Engine::get_all_hosts(). Please switch "
+                             "before v3.22") void getHostList(std::vector<Host*>* whereTo);
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_hosts()") std::vector<Host*> getAllHosts()
   {
     return get_all_hosts();
   }
   XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_hosts()") std::vector<Host*> getAllHosts()
   {
     return get_all_hosts();
   }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_count()") size_t getLinkCount() { return get_link_count(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_list()")
+      XBT_ATTRIB_DEPRECATED_v322("Engine::getLinkList() is deprecated in favor of Engine::get_all_links(). Please "
+                                 "switch before v3.22") void getLinkList(std::vector<Link*>* list);
+  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_link_list()") std::vector<Link*> getAllLinks()
+  {
+    return get_all_links();
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_all_storages()") std::vector<Storage*> getAllStorages()
+  {
+    return get_all_storages();
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use Engine::get_clock()") static double getClock() { return get_clock(); }
 
   simgrid::kernel::EngineImpl* pimpl;
 
 
   simgrid::kernel::EngineImpl* pimpl;
 
index 2bcaeea..8df22cd 100644 (file)
@@ -99,7 +99,7 @@ sg_size_t MigrationTx::sendMigrationData(sg_size_t size, int stage, int stage2_r
   *msg             = *msg + std::to_string(stage) + ":" + vm_->get_cname() + "(" + src_pm_->get_cname() + "-" +
          dst_pm_->get_cname() + ")";
 
   *msg             = *msg + std::to_string(stage) + ":" + vm_->get_cname() + "(" + src_pm_->get_cname() + "-" +
          dst_pm_->get_cname() + ")";
 
-  double clock_sta = s4u::Engine::getClock();
+  double clock_sta = s4u::Engine::get_clock();
 
   s4u::Activity* comm = nullptr;
   try {
 
   s4u::Activity* comm = nullptr;
   try {
@@ -116,7 +116,7 @@ sg_size_t MigrationTx::sendMigrationData(sg_size_t size, int stage, int stage2_r
     delete msg;
   }
 
     delete msg;
   }
 
-  double clock_end    = s4u::Engine::getClock();
+  double clock_end    = s4u::Engine::get_clock();
   double duration     = clock_end - clock_sta;
   double actual_speed = size / duration;
 
   double duration     = clock_end - clock_sta;
   double actual_speed = size / duration;
 
@@ -162,7 +162,7 @@ void MigrationTx::operator()()
   sg_vm_start_dirty_page_tracking(vm_);
 
   double computed_during_stage1 = 0;
   sg_vm_start_dirty_page_tracking(vm_);
 
   double computed_during_stage1 = 0;
-  double clock_prev_send        = s4u::Engine::getClock();
+  double clock_prev_send        = s4u::Engine::get_clock();
 
   try {
     /* At stage 1, we do not need timeout. We have to send all the memory pages even though the duration of this
 
   try {
     /* At stage 1, we do not need timeout. We have to send all the memory pages even though the duration of this
@@ -185,7 +185,7 @@ void MigrationTx::operator()()
     return;
   }
 
     return;
   }
 
-  double clock_post_send = s4u::Engine::getClock();
+  double clock_post_send = s4u::Engine::get_clock();
   mig_timeout -= (clock_post_send - clock_prev_send);
   if (mig_timeout < 0) {
     XBT_VERB("The duration of stage 1 exceeds the timeout value, skip stage 2");
   mig_timeout -= (clock_post_send - clock_prev_send);
   if (mig_timeout < 0) {
     XBT_VERB("The duration of stage 1 exceeds the timeout value, skip stage 2");
@@ -222,7 +222,7 @@ void MigrationTx::operator()()
         break;
 
       sg_size_t sent         = 0;
         break;
 
       sg_size_t sent         = 0;
-      double clock_prev_send = s4u::Engine::getClock();
+      double clock_prev_send = s4u::Engine::get_clock();
       try {
         XBT_DEBUG("Stage 2, gonna send %llu", updated_size);
         sent = sendMigrationData(updated_size, 2, stage2_round, mig_speed, mig_timeout);
       try {
         XBT_DEBUG("Stage 2, gonna send %llu", updated_size);
         sent = sendMigrationData(updated_size, 2, stage2_round, mig_speed, mig_timeout);
@@ -233,7 +233,7 @@ void MigrationTx::operator()()
         sg_vm_stop_dirty_page_tracking(vm_);
         return;
       }
         sg_vm_stop_dirty_page_tracking(vm_);
         return;
       }
-      double clock_post_send = s4u::Engine::getClock();
+      double clock_post_send = s4u::Engine::get_clock();
 
       if (sent == updated_size) {
         /* timeout did not happen */
 
       if (sent == updated_size) {
         /* timeout did not happen */
index 8d1a71e..4f59ca7 100644 (file)
@@ -61,7 +61,7 @@ void Engine::shutdown()
   s4u::Engine::instance_ = nullptr;
 }
 
   s4u::Engine::instance_ = nullptr;
 }
 
-double Engine::getClock()
+double Engine::get_clock()
 {
   return SIMIX_get_clock();
 }
 {
   return SIMIX_get_clock();
 }
@@ -91,9 +91,7 @@ size_t Engine::get_host_count()
 /** @brief Fills the passed list with all hosts found in the platform
  *  @deprecated Please prefer Engine::getAllHosts()
  */
 /** @brief Fills the passed list with all hosts found in the platform
  *  @deprecated Please prefer Engine::getAllHosts()
  */
-void XBT_ATTRIB_DEPRECATED_v322(
-    "Engine::getHostList() is deprecated in favor of Engine::get_all_hosts(). Please switch before v3.22")
-    Engine::get_host_list(std::vector<Host*>* list)
+void Engine::getHostList(std::vector<Host*>* list)
 {
   for (auto const& kv : pimpl->hosts_)
     list->push_back(kv.second);
 {
   for (auto const& kv : pimpl->hosts_)
     list->push_back(kv.second);
@@ -129,8 +127,14 @@ simgrid::s4u::Host* Engine::host_by_name_or_null(std::string name)
   return host == pimpl->hosts_.end() ? nullptr : host->second;
 }
 
   return host == pimpl->hosts_.end() ? nullptr : host->second;
 }
 
+/** @brief Returns the amount of storages in the platform */
+size_t Engine::get_storage_count()
+{
+  return pimpl->storages_.size();
+}
+
 /** @brief Returns the list of all storages found in the platform */
 /** @brief Returns the list of all storages found in the platform */
-std::vector<Storage*> Engine::getAllStorages()
+std::vector<Storage*> Engine::get_all_storages()
 {
   std::vector<Storage*> res;
   for (auto const& kv : pimpl->storages_)
 {
   std::vector<Storage*> res;
   for (auto const& kv : pimpl->storages_)
@@ -160,23 +164,13 @@ void Engine::del_storage(std::string name)
 }
 
 /** @brief Returns the amount of links in the platform */
 }
 
 /** @brief Returns the amount of links in the platform */
-size_t Engine::getLinkCount()
+size_t Engine::get_link_count()
 {
   return kernel::resource::LinkImpl::linksCount();
 }
 
 {
   return kernel::resource::LinkImpl::linksCount();
 }
 
-/** @brief Fills the passed list with all links found in the platform
- *
- *  @deprecated. Prefer Engine::getAllLinks() */
-void XBT_ATTRIB_DEPRECATED_v322(
-    "Engine::getLinkList() is deprecated in favor of Engine::getAllLinks(). Please switch before v3.22")
-    Engine::getLinkList(std::vector<Link*>* list)
-{
-  kernel::resource::LinkImpl::linksList(list);
-}
-
 /** @brief Returns the list of all links found in the platform */
 /** @brief Returns the list of all links found in the platform */
-std::vector<Link*> Engine::getAllLinks()
+std::vector<Link*> Engine::get_all_links()
 {
   std::vector<Link*> res;
   kernel::resource::LinkImpl::linksList(&res);
 {
   std::vector<Link*> res;
   kernel::resource::LinkImpl::linksList(&res);
index c26d4a5..cc6c203 100644 (file)
@@ -23,7 +23,7 @@ void XBT_ATTRIB_DEPRECATED_v322(
     "simgrid::s4u::getStorageList() is deprecated in favor of Engine::getAllStorages(). Please switch before v3.22")
     getStorageList(std::map<std::string, Storage*>* whereTo)
 {
     "simgrid::s4u::getStorageList() is deprecated in favor of Engine::getAllStorages(). Please switch before v3.22")
     getStorageList(std::map<std::string, Storage*>* whereTo)
 {
-  for (auto const& s : simgrid::s4u::Engine::getInstance()->getAllStorages())
+  for (auto const& s : simgrid::s4u::Engine::getInstance()->get_all_storages())
     whereTo->insert({s->get_name(), s});
 }
 
     whereTo->insert({s->get_name(), s});
 }
 
@@ -172,7 +172,7 @@ sg_storage_t sg_storage_get_by_name(const char* name)
  */
 xbt_dynar_t sg_storages_as_dynar()
 {
  */
 xbt_dynar_t sg_storages_as_dynar()
 {
-  std::vector<simgrid::s4u::Storage*> storage_list = simgrid::s4u::Engine::getInstance()->getAllStorages();
+  std::vector<simgrid::s4u::Storage*> storage_list = simgrid::s4u::Engine::getInstance()->get_all_storages();
   xbt_dynar_t res                                  = xbt_dynar_new(sizeof(sg_storage_t), nullptr);
   for (auto const& s : storage_list)
     xbt_dynar_push(res, &s);
   xbt_dynar_t res                                  = xbt_dynar_new(sizeof(sg_storage_t), nullptr);
   for (auto const& s : storage_list)
     xbt_dynar_push(res, &s);
index 74873ca..dd39c53 100644 (file)
@@ -162,7 +162,7 @@ static void onCommunicate(simgrid::kernel::resource::NetworkAction* action, simg
 
 static void onSimulationEnd()
 {
 
 static void onSimulationEnd()
 {
-  std::vector<simgrid::s4u::Link*> links = simgrid::s4u::Engine::getInstance()->getAllLinks();
+  std::vector<simgrid::s4u::Link*> links = simgrid::s4u::Engine::getInstance()->get_all_links();
 
   double total_energy = 0.0; // Total dissipated energy (whole platform)
   for (const auto link : links) {
 
   double total_energy = 0.0; // Total dissipated energy (whole platform)
   for (const auto link : links) {
index f9e5c7a..6a709c7 100644 (file)
@@ -19,7 +19,7 @@ extern std::map<std::string, simgrid::surf::StorageType*> storage_types;
 
 static void check_disk_attachment()
 {
 
 static void check_disk_attachment()
 {
-  for (auto const& s : simgrid::s4u::Engine::getInstance()->getAllStorages()) {
+  for (auto const& s : simgrid::s4u::Engine::getInstance()->get_all_storages()) {
     simgrid::kernel::routing::NetPoint* host_elm = sg_netpoint_by_name_or_null(s->getImpl()->getHost().c_str());
     if (not host_elm)
       surf_parse_error(std::string("Unable to attach storage ") + s->get_cname() + ": host " +
     simgrid::kernel::routing::NetPoint* host_elm = sg_netpoint_by_name_or_null(s->getImpl()->getHost().c_str());
     if (not host_elm)
       surf_parse_error(std::string("Unable to attach storage ") + s->get_cname() + ": host " +
index c305602..2401959 100644 (file)
@@ -61,7 +61,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Tremblay"), worker);
 
   e.run();
   simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Tremblay"), worker);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 94deef2..da1efbb 100644 (file)
@@ -12,9 +12,9 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_cloud_interrupt_migration, "Messages specific f
 static void vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
 {
   simgrid::s4u::Host* src_pm = vm->getPm();
 static void vm_migrate(simgrid::s4u::VirtualMachine* vm, simgrid::s4u::Host* dst_pm)
 {
   simgrid::s4u::Host* src_pm = vm->getPm();
-  double mig_sta             = simgrid::s4u::Engine::getClock();
+  double mig_sta             = simgrid::s4u::Engine::get_clock();
   sg_vm_migrate(vm, dst_pm);
   sg_vm_migrate(vm, dst_pm);
-  double mig_end = simgrid::s4u::Engine::getClock();
+  double mig_end = simgrid::s4u::Engine::get_clock();
 
   XBT_INFO("%s migrated: %s->%s in %g s", vm->get_cname(), src_pm->get_cname(), dst_pm->get_cname(), mig_end - mig_sta);
 }
 
   XBT_INFO("%s migrated: %s->%s in %g s", vm->get_cname(), src_pm->get_cname(), dst_pm->get_cname(), mig_end - mig_sta);
 }
@@ -65,7 +65,7 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Bye (simulation time %g)", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }
 
   return 0;
 }
index ab82939..f160b23 100644 (file)
@@ -188,7 +188,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
 
   e.run();
   simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 772c705..de5f855 100644 (file)
@@ -36,7 +36,7 @@ int main(int argc, char** argv)
     simgrid::s4u::Actor::create("host", simgrid::s4u::Host::by_name("bob"), host);
 
   e.run();
     simgrid::s4u::Actor::create("host", simgrid::s4u::Host::by_name("bob"), host);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index 0c8df39..007b894 100644 (file)
@@ -35,7 +35,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Jupiter"), worker);
 
   e.run();
   simgrid::s4u::Actor::create("worker", simgrid::s4u::Host::by_name("Jupiter"), worker);
 
   e.run();
-  XBT_INFO("Simulation time %g", e.getClock());
+  XBT_INFO("Simulation time %g", e.get_clock());
 
   return 0;
 }
 
   return 0;
 }
index b70d087..d02157f 100644 (file)
@@ -91,7 +91,7 @@ static void get_set_storage_data(const std::string& storage_name)
 
 static void dump_platform_storages()
 {
 
 static void dump_platform_storages()
 {
-  std::vector<simgrid::s4u::Storage*> storages = simgrid::s4u::Engine::getInstance()->getAllStorages();
+  std::vector<simgrid::s4u::Storage*> storages = simgrid::s4u::Engine::getInstance()->get_all_storages();
 
   for (auto const& s : storages) {
     XBT_INFO("Storage %s is attached to %s", s->get_cname(), s->getHost()->get_cname());
 
   for (auto const& s : storages) {
     XBT_INFO("Storage %s is attached to %s", s->get_cname(), s->getHost()->get_cname());
@@ -164,6 +164,6 @@ int main(int argc, char* argv[])
 
   e.run();
 
 
   e.run();
 
-  XBT_INFO("Simulated time: %g", e.getClock());
+  XBT_INFO("Simulated time: %g", e.get_clock());
   return 0;
 }
   return 0;
 }