aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-05-20 11:13:19 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-05-20 11:13:19 +0200
commita342ca0c893341be0c23396339ecfcd179950936 (patch)
tree6b64eab00d2eab19106995a69fd171849908bd86 /src
parent404eb004ad4752883301249245ad4158087132ee (diff)
Debug
Diffstat (limited to 'src')
-rw-r--r--src/simulator.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/simulator.cc b/src/simulator.cc
index 7128929..4f37def 100644
--- a/src/simulator.cc
+++ b/src/simulator.cc
@@ -153,6 +153,7 @@ static void obs_node(std::vector<std::string> args) {
double upsince=simgrid::s4u::Engine::get_clock();
double upuntil=i.GetTS()+i.GetDuration();
bool forward_mode=false;
+ bool onlyf=false;
while(uptime>0)
{
if(i.is_sender){
@@ -178,16 +179,18 @@ static void obs_node(std::vector<std::string> args) {
}
MODE_TX();
// Then try sending the data
- if(i.extended){
- if(is_data_rcv_ready()){
- SEND(m_ded->put(p,i.data_size));
+ if(is_data_rcv_ready()){
+ if(i.extended){
+ SEND(m_ded->put(p,i.data_size));
+
+
+ }
+ else{
+ SEND(m_ded->put(p,i.data_size,uptime));
}
- else
- throw "Attemps to send when no receiver available in extended mode";
- }
- else{
- SEND(m_ded->put(p,i.data_size,uptime));
}
+ else
+ throw "Attemps to send when no receiver available in extended mode";
// If we reach here, data has been sent successfully
XBT_INFO("%s sent data successfully",CNAME);
nSend++;
@@ -272,7 +275,8 @@ static void obs_node(std::vector<std::string> args) {
if(i.use_hint){
double try_for=forward_mode ? 1 : 1;
try_for=try_for>uptime ? uptime : try_for;
-
+ if(onlyf)
+ forward_mode=true;
if(forward_mode && hint_forward!=NULL && CLOCK < hint_forward->hint){
FORWARD_HINT(try_for);
}
@@ -284,6 +288,7 @@ static void obs_node(std::vector<std::string> args) {
} while(p->HisForward); // Ignore forwarded hint
simgrid::s4u::Mailbox *m_ded= simgrid::s4u::Mailbox::by_name(p->DedicatedMailbox);
// Start receiving hint from sender
+ onlyf=true;
MODE_RX();
if(p->HasHint){
TRACK_UPTIME(p=m_ded->get<Payload>(uptime));