Skip to content

Commit

Permalink
#1052: epoch: make changes to support memory footprinting
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jan 12, 2021
1 parent 7ff0e70 commit 0d5ca12
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/vt/epoch/epoch_manip.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,13 @@ struct EpochManip : runtime::component::Component<EpochManip> {
*/
EpochType getArchetype(EpochType epoch) const;

template <typename SerializerT>
void serialize(SerializerT& s) {
s | live_scopes_
| terminated_epochs_
| terminated_collective_epochs_;
}

private:
/**
* \internal \brief Destroy an eopch scope by removing it
Expand Down
5 changes: 4 additions & 1 deletion src/vt/epoch/epoch_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ struct EpochWindow {
template <typename Serializer>
void serialize(Serializer& s) {
s | archetype_epoch_
| terminated_epochs_;
| terminated_epochs_
| next_epoch_
| total_terminated_;
}

/**
Expand All @@ -147,6 +149,7 @@ struct EpochWindow {
private:
/// The archetypical epoch for this window container (category,rooted,user,..)
EpochType archetype_epoch_ = no_epoch;

/// The set of epochs terminated
vt::IntegralSet<EpochType> terminated_epochs_;

Expand Down
4 changes: 4 additions & 0 deletions src/vt/runtime/runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,10 @@ void Runtime::printMemoryFootprint() const {
printComponentFootprint(
static_cast<vt::phase::PhaseManager*>(base)
);
} else if (name == "EpochManip") {
printComponentFootprint(
static_cast<vt::epoch::EpochManip*>(base)
);
#if vt_check_enabled(trace_enabled)
} else if (name == "Trace") {
printComponentFootprint(
Expand Down
2 changes: 0 additions & 2 deletions src/vt/termination/termination.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,6 @@ struct TerminationDetector :
s | any_epoch_state_
| hang_
| epoch_state_
| epoch_arch_
| epoch_coll_
| epoch_ready_
| epoch_wait_status_
| has_printed_epoch_graph;
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/runtime/test_memory_footprint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ TEST_F(TestMemoryFootprinting, test_stats_reader) {
printMemoryFootprint(theStatsReader());
}

TEST_F(TestMemoryFootprinting, test_epoch) {
printMemoryFootprint(theEpoch());
}

#if vt_check_enabled(trace_enabled)
TEST_F(TestMemoryFootprinting, test_trace) {
printMemoryFootprint(theTrace());
Expand Down

0 comments on commit 0d5ca12

Please sign in to comment.