From 414936833e025894e8d3107dc11251440f1a0c04 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 8 Dec 2020 15:49:40 +0100 Subject: [PATCH] Fire Comm::on_completion in any case. --- .../trace-process-migration/trace-process-migration.tesh | 9 +++++++++ src/s4u/s4u_Comm.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/deprecated/msg/trace-process-migration/trace-process-migration.tesh b/examples/deprecated/msg/trace-process-migration/trace-process-migration.tesh index 772f8718cc..853cbc68c6 100644 --- a/examples/deprecated/msg/trace-process-migration/trace-process-migration.tesh +++ b/examples/deprecated/msg/trace-process-migration/trace-process-migration.tesh @@ -261,6 +261,7 @@ $ tail -n +3 procmig.trace > 13 2.025708 7 33 > 15 2.025708 13 0 SR 33 p1 > 12 2.025708 7 33 11 +> 13 2.025708 7 32 > 16 2.025708 13 0 SR 32 p0 > 15 2.025708 13 0 M 32 0 > 7 2.025708 6 32 @@ -272,6 +273,7 @@ $ tail -n +3 procmig.trace > 13 4.025903 7 33 > 15 4.025903 13 0 SR 33 p2 > 12 4.025903 7 33 11 +> 13 4.025903 7 34 > 16 4.025903 13 0 SR 34 p1 > 15 4.025903 13 0 M 34 1 > 7 4.025903 6 34 @@ -283,6 +285,7 @@ $ tail -n +3 procmig.trace > 13 6.044918 7 33 > 15 6.044918 13 0 SR 33 p3 > 12 6.044918 7 33 11 +> 13 6.044918 7 35 > 16 6.044918 13 0 SR 35 p2 > 15 6.044918 13 0 M 35 2 > 7 6.044918 6 35 @@ -294,6 +297,7 @@ $ tail -n +3 procmig.trace > 13 8.070626 7 33 > 15 8.070626 13 0 SR 33 p4 > 12 8.070626 7 33 11 +> 13 8.070626 7 36 > 16 8.070626 13 0 SR 36 p3 > 15 8.070626 13 0 M 36 3 > 7 8.070626 6 36 @@ -305,6 +309,7 @@ $ tail -n +3 procmig.trace > 13 10.087178 7 33 > 15 10.087178 13 0 SR 33 p5 > 12 10.087178 7 33 11 +> 13 10.087178 7 37 > 16 10.087178 13 0 SR 37 p4 > 15 10.087178 13 0 M 37 4 > 7 10.087178 6 37 @@ -316,6 +321,7 @@ $ tail -n +3 procmig.trace > 13 12.112617 7 33 > 15 12.112617 13 0 SR 33 p6 > 12 12.112617 7 33 11 +> 13 12.112617 7 38 > 16 12.112617 13 0 SR 38 p5 > 15 12.112617 13 0 M 38 5 > 7 12.112617 6 38 @@ -327,6 +333,7 @@ $ tail -n +3 procmig.trace > 13 14.138325 7 33 > 15 14.138325 13 0 SR 33 p7 > 12 14.138325 7 33 11 +> 13 14.138325 7 39 > 16 14.138325 13 0 SR 39 p6 > 15 14.138325 13 0 M 39 6 > 7 14.138325 6 39 @@ -338,6 +345,7 @@ $ tail -n +3 procmig.trace > 13 16.138521 7 33 > 15 16.138521 13 0 SR 33 p8 > 12 16.138521 7 33 11 +> 13 16.138521 7 40 > 16 16.138521 13 0 SR 40 p7 > 15 16.138521 13 0 M 40 7 > 7 16.138521 6 40 @@ -347,6 +355,7 @@ $ tail -n +3 procmig.trace > 13 18.138521 7 41 > 12 18.138521 7 41 10 > 13 18.155073 7 33 +> 13 18.155073 7 41 > 16 18.155073 13 0 SR 41 p8 > 7 18.155073 6 33 > 7 18.155073 6 41 diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 7e9d64857b..ebb2567ff9 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -182,7 +182,6 @@ Comm* Comm::wait_for(double timeout) case State::STARTED: simcall_comm_wait(get_impl(), timeout); - on_completion(*Actor::self()); state_ = State::FINISHED; this->release_dependencies(); break; @@ -193,6 +192,7 @@ Comm* Comm::wait_for(double timeout) default: THROW_IMPOSSIBLE; } + on_completion(*Actor::self()); return this; } -- 2.20.1