diff options
Diffstat (limited to 'src/simulator.cc')
| -rw-r--r-- | src/simulator.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/simulator.cc b/src/simulator.cc index 167810f..5da125d 100644 --- a/src/simulator.cc +++ b/src/simulator.cc @@ -17,7 +17,7 @@ /// @brief Required by SimGrid XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[DAO]"); -/// @brief For convenience +/// @brief For convenience sake typedef unsigned int u32; /** @@ -61,7 +61,7 @@ int main(int argc, char **argv) { simgrid::s4u::Actor::create("ON", simgrid::s4u::Host::by_name(ss.str()), obs_node, args); } - // Setup/Run simulation + // Launch the simulation engine.run(); XBT_INFO("Simulation took %fs", simgrid::s4u::Engine::get_clock()); XBT_INFO("The simulated platform file is available in \"%s\"",PLATFORM_FILE); @@ -109,11 +109,11 @@ static void obs_node(std::vector<std::string> args) { } if(i.extended){ // We use a trick here - // First we send an instantanous message (size=0) with a timeout + // First we send an instantaneous message (size=0) with the usual timeout // to check whether there is a receiver! // If there is one, we are sure that a put in the "medium"+selfName // will not lead to a deadlock (cf anchor:5623) and we are using a exclusive - // channel (to avoid another receiver to get the message) + // channel (to avoid other receivers to get the message) m->put(p,0,i.GetDuration()); simgrid::s4u::Mailbox *m_ext= simgrid::s4u::Mailbox::by_name("medium"+selfName); m_ext->put(p,data_size); @@ -121,7 +121,7 @@ static void obs_node(std::vector<std::string> args) { else{ m->put(p,data_size,i.GetDuration()); } - XBT_INFO("%s send data successfully",selfName.c_str()); + XBT_INFO("%s sent data successfully",selfName.c_str()); isObserver=true; // Do one send for now... isSender=false; } @@ -130,7 +130,7 @@ static void obs_node(std::vector<std::string> args) { if(i.extended){ // anchor:5623 We can see here that // we first receive the instantaneous message - // and then use the mailbox specific to the sender (to have an exclusive channel) + // and then we use a mailbox specific to the sender (to have an exclusive channel) p=m->get<Payload>(i.GetDuration()); simgrid::s4u::Mailbox *m_ext_sender = simgrid::s4u::Mailbox::by_name("medium"+p->node); p=m_ext_sender->get<Payload>(); @@ -149,18 +149,18 @@ static void obs_node(std::vector<std::string> args) { } } else { - XBT_INFO("%s is observing is environment...",selfName.c_str()); + XBT_INFO("%s is observing his environment...",selfName.c_str()); simgrid::s4u::this_actor::sleep_until(i.GetDuration()); } } catch (...) { if(isSender){ - XBT_INFO("%s failed to send data",selfName.c_str()); + XBT_INFO("%s could not send any data",selfName.c_str()); nSendFail++; } else{ - XBT_INFO("%s failed to receive data",selfName.c_str()); + XBT_INFO("%s could not receive any data",selfName.c_str()); nRcvFail++; } } |
