From 9bc9ab691afeeb676ae9b3c386a49c13a453dc0b Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 7 May 2021 09:07:20 +0200 Subject: Debug parser and cleaning --- src/Inputs.cc | 6 +++--- src/simulator.cc | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/Inputs.cc b/src/Inputs.cc index de81aec..d71d8f7 100644 --- a/src/Inputs.cc +++ b/src/Inputs.cc @@ -5,7 +5,7 @@ #include Inputs::Inputs(std::string node_name){ - // Here we doing all the boring stuff + // Here we do all the boring stuff FILE* input_file = fopen(INPUTS_FILE, "rb"); char input_file_buffer[JSON_BUFFER_SIZE]; rapidjson::FileReadStream is(input_file, input_file_buffer, sizeof(input_file_buffer)); @@ -64,7 +64,7 @@ void Inputs::MergeEvents(){ } double Inputs::GetNextTS(){ - // Ensure the caller is smart + // Ensure that the caller is smart if(wake_duration.size()<2){ std::cerr << "You are trying to access to the next timestamp but it does not exists" < 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 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 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(i.GetDuration()); simgrid::s4u::Mailbox *m_ext_sender = simgrid::s4u::Mailbox::by_name("medium"+p->node); p=m_ext_sender->get(); @@ -149,18 +149,18 @@ static void obs_node(std::vector 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++; } } -- cgit v1.2.3