diff --git a/src/vt/trace/trace_lite.cc b/src/vt/trace/trace_lite.cc index 8777585e4b..db68dcd6e2 100644 --- a/src/vt/trace/trace_lite.cc +++ b/src/vt/trace/trace_lite.cc @@ -543,6 +543,10 @@ void TraceLite::flushTracesFile(bool useGlobalSync) { void TraceLite::writeTracesFile(int flush, bool is_incremental_flush) { auto const node = theContext()->getNode(); + vt::runInEpochCollective([&]{ + proxy.reduce(0, std::move(user_event_)); + }); + size_t to_write = traces_.size(); if (traceWritingEnabled(node) and to_write > 0) { diff --git a/src/vt/trace/trace_user_event.cc b/src/vt/trace/trace_user_event.cc index e707c1c840..3232ea0228 100644 --- a/src/vt/trace/trace_user_event.cc +++ b/src/vt/trace/trace_user_event.cc @@ -82,25 +82,12 @@ UserEventIDType UserEventRegistry::hash(std::string const& in_event_name) { id_hash = id_hash & 0x0FFF; auto ret = newEventImpl(false, false, in_event_name, id_hash, true); auto id = std::get<0>(ret); - auto inserted = std::get<1>(ret); - if (inserted) { - auto const node = theContext()->getNode(); - if (node != 0) { - auto msg = makeMessage(false, id, in_event_name); - theMsg()->sendMsg(0, msg); - } - } return id; } UserEventIDType UserEventRegistry::rooted(std::string const& in_event_name) { auto ret = newEventImpl(false, true, in_event_name, cur_root_event_++); auto id = std::get<0>(ret); - auto const node = theContext()->getNode(); - if (node != 0) { - auto msg = makeMessage(false, id, in_event_name); - theMsg()->sendMsg(0, msg); - } return id; } @@ -109,11 +96,6 @@ UserEventIDType UserEventRegistry::user( ) { auto ret = newEventImpl(true, false, in_event_name, seq); auto id = std::get<0>(ret); - auto const node = theContext()->getNode(); - if (node != 0) { - auto msg = makeMessage(true, id, in_event_name); - theMsg()->sendMsg(0, msg); - } return id; } #endif @@ -145,9 +127,18 @@ bool UserEventRegistry::insertEvent( ); return true; } else { + user_event_[event] += " COLLISION " + name; return false; } } +UserEventRegistry operator+( + UserEventRegistry r1, UserEventRegistry const& r2 +) { + for (auto& [hash, event_str] : r2.getEvents()) { + r1.insertEvent(hash, event_str); + } + return r1; +} }} /* end namespace vt::trace */