-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an action in the terminator should produce/consume on epoch? #649
Comments
Add a (mandatory) parameter or distinct method for each and force the caller to choose? |
Agreed with Paul - we don't want to just change present behavior. Making it explicit, and consequently auditing all current calls, is probably the right approach. Moreover, what should the epoch stack look like when that action runs? I think my default expectation would be bare, but I don't know if that's currently accurate or the best design. |
So let's say we have the following program. It is currently non-deterministic. Sometimes, send X may be grouped inside int main() {
auto ep1 = theTerm()->makeEpochCollective();
theMsg()->pushEpoch(ep1);
// send some messages with ep1
{ // scope for illustration
auto ep2 = theTerm()->makeEpochCollective();
theMsg()->pushEpoch(ep2);
// send some messages with ep2
theMsg()->popEpoch(ep2);
theTerm()->finishedEpoch(ep2);
theTerm()->addAction(ep2, []{
theMsg()->sendMsg<MyMsg, handler>(msg); // send X
});
}
theMsg()->popEpoch(ep1);
theTerm()->finishedEpoch(ep1);
} |
Ok, that example is pretty close to what I would have imagined. I didn't realize we were currently completely at the mercy of ambient state for how it would work out, though. We definitely can't stick with that. I see at least a few options
I think only 1 and 4 are reasonable choices here. I'd support 1, since it's easiest to simulate any of the others with that simply by what epoch argument gets passed. |
Oops, sorry |
I'm going to start a branch to eliminate some of the unnecessary |
The resolution to this issue can then go on there as well. |
Has this moved forward? Since I want to close out beta.6, I'm removing this from beta.6 for now. |
Sorry, I started on it, and then paused efforts. I'll probably be able to push something coherent later this week or early next, though. |
…nEpochCollective/Rooted, with added addAction as a nuisance
…nEpochCollective/Rooted, with added addAction as a nuisance
In conversation with Jonathan, there's a decent way we can enforce option 4 - designate a |
Checking that none of the PRs removing calls to |
https://github.com/DARMA-tasking/vt/pull/979/files#diff-63280c3ae5ef295b295afa9290cfe4d9L211 may have been misuse-adjacent. If we were to add an error check that messages not be sent inside an action without an explicit epoch being activated, that would trigger it. It wasn't broken in context, though. |
https://github.com/DARMA-tasking/vt/pull/979/files#diff-3b24b898691f8d36d7ffbb22cf09562bL92 et seq were called inside |
All of the sequencer tests' usage of |
Looks like we refactored |
Describe the bug
If you do,
theTerm()->addAction(new_epoch, []{});
with a current epoch on the stack, it should probably produce/consume on the outer epoch so it doesn't terminate before an enqueued action on the child epoch completes.The text was updated successfully, but these errors were encountered: