Skip to content

Commit

Permalink
#774: active: move completed trace event to finish funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Apr 17, 2020
1 parent b8675a2 commit b5aadbf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 14 additions & 0 deletions src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,13 @@ void ActiveMessenger::finishPendingDataMsgAsyncRecv(InProgressDataIRecv* irecv)
auto dealloc_user_buf = irecv->dealloc_user_buf;
auto next = irecv->next;

# if backend_check_enabled(trace_enabled)
if (ArgType::vt_trace_mpi) {
auto tr_note = fmt::format("DM Irecv completed: from={}", irecv->sender);
trace::addUserNote(tr_note);
}
# endif

auto dealloc_buf = [=]{
debug_print(
active, node,
Expand Down Expand Up @@ -820,6 +827,13 @@ void ActiveMessenger::finishPendingActiveMsgAsyncRecv(InProgressIRecv* irecv) {
auto num_probe_bytes = irecv->probe_bytes;
auto sender = irecv->sender;

# if backend_check_enabled(trace_enabled)
if (ArgType::vt_trace_mpi) {
auto tr_note = fmt::format("AM Irecv completed: from={}", irecv->sender);
trace::addUserNote(tr_note);
}
# endif

MessageType* msg = reinterpret_cast<MessageType*>(buf);
messageConvertToShared(msg);
auto base = promoteMsgOwner(msg);
Expand Down
7 changes: 0 additions & 7 deletions src/vt/messaging/irecv_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ struct IRecvHolder {
continue;
}

# if backend_check_enabled(trace_enabled)
if (ArgType::vt_trace_mpi) {
auto tr_note = fmt::format("Irecv completed: from={}", stat.MPI_SOURCE);
trace::addUserNote(tr_note);
}
# endif

c(&e);
progress_made = true;
e.valid = false;
Expand Down

0 comments on commit b5aadbf

Please sign in to comment.