Skip to content
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

1941 move EpochStack to TerminationDetector #1961

Merged
merged 14 commits into from
Sep 22, 2022

Conversation

stmcgovern
Copy link
Contributor

@stmcgovern stmcgovern commented Sep 14, 2022

Closes #1941. Add EpockStack to TerminationDetector.

@stmcgovern stmcgovern linked an issue Sep 14, 2022 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Sep 14, 2022

Pipelines results

PR tests (clang-5.0, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (clang-3.9, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-5, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-10, ubuntu, openmpi, no LB)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-6, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (clang-9, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-9, ubuntu, mpich, zoltan)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 11.0, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (clang-13, alpine, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (nvidia cuda 10.1, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-8, ubuntu, mpich, address sanitizer)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (intel icpx, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (clang-11, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (clang-12, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (clang-14, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-11, ubuntu, mpich)

Build for bbb3077

Compilation - successful

Testing - passed

Build log


PR tests (clang-10, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (clang-13, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-12, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (intel icpc, ubuntu, mpich)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-11, ubuntu, mpich, json schema test)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


PR tests (gcc-7, ubuntu, mpich, trace runtime, LB)

Build for 6658d17

Compilation - successful

Testing - passed

Build log


@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Merging #1961 (6658d17) into develop (c537410) will decrease coverage by 0.08%.
The diff coverage is 85.93%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1961      +/-   ##
===========================================
- Coverage    84.11%   84.02%   -0.09%     
===========================================
  Files          728      728              
  Lines        25604    25605       +1     
===========================================
- Hits         21536    21514      -22     
- Misses        4068     4091      +23     
Impacted Files Coverage Δ
src/vt/messaging/active.h 72.91% <ø> (ø)
src/vt/context/runnable_context/td.cc 57.14% <33.33%> (+0.73%) ⬆️
src/vt/termination/termination.impl.h 97.87% <96.87%> (-2.13%) ⬇️
src/vt/messaging/active.cc 86.84% <100.00%> (-0.17%) ⬇️
src/vt/messaging/active.impl.h 98.94% <100.00%> (+0.83%) ⬆️
src/vt/termination/termination.cc 70.08% <100.00%> (-1.13%) ⬇️
src/vt/termination/termination.h 100.00% <100.00%> (ø)
src/vt/topos/location/location.impl.h 88.19% <0.00%> (-5.91%) ⬇️
src/vt/phase/phase_manager.cc 91.21% <0.00%> (-1.36%) ⬇️
src/vt/vrt/collection/manager.impl.h 95.49% <0.00%> (-0.99%) ⬇️
... and 1 more

@lifflander lifflander self-requested a review September 14, 2022 17:08
@stmcgovern stmcgovern force-pushed the 1941-move-epoch-stack-to-terminationdetector branch 2 times, most recently from 7c36300 to 79e7faa Compare September 19, 2022 22:48
auto const& non_zero = epoch_stack_.size() > 0;
vtAssertExprInfo(
non_zero and (epoch_stack_.top() == epoch.get() or epoch == no_epoch),
epoch, non_zero, epoch_stack_.top()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
epoch, non_zero, epoch_stack_.top()
epoch, non_zero, non_zero ? epoch_stack_.top() : no_epoch

unsigned int size() const { return cur_; }

int cur_ = 0;
std::array<DataType, 64> stack_;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd discussed making this a potentially dynamically sized structure.

As in the scheduler queue, where we use a circular buffer, we may want to do something clever where we keep the std::array for the shallow case, and do a bulk hand-off to a growable structure for the bottom of the stack that's not changing as rapidly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest opening an issue and doing that in a follow-up commit

@stmcgovern stmcgovern force-pushed the 1941-move-epoch-stack-to-terminationdetector branch from 79e7faa to ddd37f8 Compare September 20, 2022 19:45
Copy link
Collaborator

@lifflander lifflander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

}

inline EpochType ActiveMessenger::getEpoch() const {
return getGlobalEpoch();
return theTerm()->getEpoch();
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like keeping these wrappers here, but I guess it spares us rewriting all the call sites at the same time. It does also allow for caching theTerm() in ActiveMessenger for internal usage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not changed this. Do you think it's worth an issue to remove them or to go with the caching, @PhilMiller @lifflander ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave it be for now, and think about caching if that lookup ever turns up as a hot spot in profiles

@PhilMiller
Copy link
Member

Merging vs fixing stuff is up to you, @lifflander

@lifflander
Copy link
Collaborator

Since these problems already existed, I would prefer to merge and then fix them in a separate issue.

@lifflander lifflander merged commit 13c86c5 into develop Sep 22, 2022
cz4rs pushed a commit that referenced this pull request Sep 28, 2022
…terminationdetector

1941 move EpochStack to TerminationDetector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move epoch stack to TerminationDetector
3 participants