Skip to content

Commit 66221f7

Browse files
lifflandercz4rs
authored andcommitted
Merge pull request #1688 from DARMA-tasking/1685-fix-tracing-issue
1685 Fix tracing issue
2 parents 9ace85e + ded7a38 commit 66221f7

File tree

8 files changed

+35
-22
lines changed

8 files changed

+35
-22
lines changed

src/vt/collective/reduce/reduce.impl.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ void Reduce::reduceRootRecv(MsgT* msg) {
7878
msg->is_root_ = true;
7979

8080
auto const& from_node = theContext()->getFromNodeCurrentTask();
81+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
8182

8283
auto m = promoteMsg(msg);
83-
runnable::makeRunnable(m, false, handler, from_node)
84+
runnable::makeRunnable(m, false, handler, from_node, han_type)
8485
.withTDEpochFromMsg()
8586
.run();
8687
}
@@ -258,7 +259,8 @@ void Reduce::startReduce(detail::ReduceStamp id, bool use_num_contrib) {
258259

259260
// this needs to run inline.. threaded not allowed for reduction
260261
// combination
261-
runnable::makeRunnable(state.msgs[0], false, handler, from_node)
262+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
263+
runnable::makeRunnable(state.msgs[0], false, handler, from_node, han_type)
262264
.withTDEpochFromMsg()
263265
.run();
264266
}

src/vt/messaging/active.cc

+6-3
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,10 @@ EventType ActiveMessenger::doMessageSend(
540540
}
541541
}
542542

543-
runnable::makeRunnable(base, true, envelopeGetHandler(msg->env), dest)
544-
.withTDEpochFromMsg(is_term)
543+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
544+
runnable::makeRunnable(
545+
base, true, envelopeGetHandler(msg->env), dest, han_type
546+
) .withTDEpochFromMsg(is_term)
545547
.withLBStats(&bare_handler_stats_, bare_handler_dummy_elm_id_for_lb_stats_)
546548
.enqueue();
547549
}
@@ -1000,7 +1002,8 @@ bool ActiveMessenger::prepareActiveMsgToRun(
10001002
}
10011003

10021004
if (has_handler) {
1003-
runnable::makeRunnable(base, not is_term, handler, from_node)
1005+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
1006+
runnable::makeRunnable(base, not is_term, handler, from_node, han_type)
10041007
.withContinuation(cont)
10051008
.withTag(tag)
10061009
.withTDEpochFromMsg(is_term)

src/vt/objgroup/manager.static.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ void send(MsgSharedPtr<MsgT> msg, HandlerType han, NodeType dest_node) {
6666
auto holder = detail::getHolderBase(han);
6767
auto const& elm_id = holder->getElmID();
6868
auto stats = &holder->getStats();
69+
auto han_type = auto_registry::RegistryTypeEnum::RegObjGroup;
6970

70-
runnable::makeRunnable(msg, true, han, this_node)
71+
runnable::makeRunnable(msg, true, han, this_node, han_type)
7172
.withTDEpoch(cur_epoch)
7273
.withLBStats(stats, elm_id)
7374
.enqueue();
@@ -87,7 +88,8 @@ void invoke(messaging::MsgPtrThief<MsgT> msg, HandlerType han, NodeType dest_nod
8788
);
8889

8990
// this is a local invocation.. no thread required
90-
runnable::makeRunnable(msg.msg_, false, han, this_node)
91+
auto han_type = auto_registry::RegistryTypeEnum::RegObjGroup;
92+
runnable::makeRunnable(msg.msg_, false, han, this_node, han_type)
9193
.withTDEpochFromMsg()
9294
.run();
9395
}

src/vt/pipe/callback/handler_send/callback_send.impl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ CallbackSend<MsgT>::triggerDispatch(SignalDataType* data, PipeType const& pid) {
110110
if (this_node == send_node_) {
111111
auto msg = reinterpret_cast<ShortMessage*>(data);
112112
auto m = promoteMsg(msg);
113-
runnable::makeRunnable(m, true, handler_, this_node)
113+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
114+
runnable::makeRunnable(m, true, handler_, this_node, han_type)
114115
.withTDEpochFromMsg()
115116
.enqueue();
116117
} else {

src/vt/pipe/callback/handler_send/callback_send_tl.impl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ void CallbackSendTypeless::trigger(MsgT* msg, PipeType const& pipe) {
7171
);
7272
auto pmsg = promoteMsg(msg);
7373
if (this_node == send_node_) {
74-
runnable::makeRunnable(pmsg, true, handler_, this_node)
74+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
75+
runnable::makeRunnable(pmsg, true, handler_, this_node, han_type)
7576
.withTDEpochFromMsg()
7677
.enqueue();
7778
} else {

src/vt/runnable/make_runnable.h

+7-8
Original file line numberDiff line numberDiff line change
@@ -313,19 +313,19 @@ struct RunnableMaker {
313313
* \param[in] is_threaded whether it is threaded
314314
* \param[in] handler the handler bits
315315
* \param[in] from the node that caused this runnable to execute
316-
* \param[in] han_type the type of handler (default RegGeneral)
316+
* \param[in] han_type the type of handler
317317
*
318318
* \return the maker for further customization
319319
*/
320320
template <typename U>
321321
RunnableMaker<U> makeRunnable(
322322
MsgSharedPtr<U> const& msg, bool is_threaded, HandlerType handler,
323-
NodeType from, auto_registry::RegistryTypeEnum han_type =
324-
auto_registry::RegistryTypeEnum::RegGeneral
323+
NodeType from, auto_registry::RegistryTypeEnum han_type
325324
) {
326325
auto r = std::make_unique<RunnableNew>(msg, is_threaded);
327326
if (han_type == auto_registry::RegistryTypeEnum::RegVrt or
328-
han_type == auto_registry::RegistryTypeEnum::RegGeneral) {
327+
han_type == auto_registry::RegistryTypeEnum::RegGeneral or
328+
han_type == auto_registry::RegistryTypeEnum::RegObjGroup) {
329329
r->template addContext<ctx::Trace>(msg, handler, from, han_type);
330330
}
331331
r->template addContext<ctx::FromNode>(from);
@@ -339,15 +339,14 @@ RunnableMaker<U> makeRunnable(
339339
* \param[in] is_threaded whether it is threaded
340340
* \param[in] handler the handler bits
341341
* \param[in] from the node that caused this runnable to execute
342-
* \param[in] han_type the type of handler (default RegGeneral)
343342
*
344343
* \return the maker for further customization
345344
*/
346345
inline RunnableMaker<BaseMsgType> makeRunnableVoid(
347-
bool is_threaded, HandlerType handler,
348-
NodeType from, auto_registry::RegistryTypeEnum han_type =
349-
auto_registry::RegistryTypeEnum::RegGeneral
346+
bool is_threaded, HandlerType handler, NodeType from
350347
) {
348+
// These are currently only types of registry entries that can be void
349+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
351350
auto r = std::make_unique<RunnableNew>(is_threaded);
352351
// @todo: figure out how to trace this?
353352
r->template addContext<ctx::FromNode>(from);

src/vt/serialization/messaging/serialized_messenger.impl.h

+8-4
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ template <typename UserMsgT>
8888
auto msg_data = ptr_offset;
8989
auto user_msg = deserializeFullMessage<UserMsgT>(msg_data);
9090

91-
runnable::makeRunnable(user_msg, true, handler, sys_msg->from_node)
91+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
92+
runnable::makeRunnable(user_msg, true, handler, sys_msg->from_node, han_type)
9293
.withTDEpochFromMsg()
9394
.enqueue();
9495
}
@@ -132,7 +133,8 @@ template <typename UserMsgT>
132133
handler, recv_tag, envelopeGetEpoch(msg->env)
133134
);
134135

135-
runnable::makeRunnable(msg, true, handler, node)
136+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
137+
runnable::makeRunnable(msg, true, handler, node, han_type)
136138
.withTDEpoch(epoch, not is_valid_epoch)
137139
.withContinuation(action)
138140
.enqueue();
@@ -174,7 +176,8 @@ template <typename UserMsgT, typename BaseEagerMsgT>
174176
print_ptr(user_msg.get()), envelopeGetEpoch(sys_msg->env)
175177
);
176178

177-
runnable::makeRunnable(user_msg, true, handler, sys_msg->from_node)
179+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
180+
runnable::makeRunnable(user_msg, true, handler, sys_msg->from_node, han_type)
178181
.withTDEpochFromMsg()
179182
.enqueue();
180183
}
@@ -407,7 +410,8 @@ template <typename MsgT, typename BaseT>
407410

408411
auto base_msg = msg.template to<BaseMsgType>();
409412
return messaging::PendingSend(base_msg, [=](MsgPtr<BaseMsgType> in){
410-
runnable::makeRunnable(msg, true, typed_handler, node)
413+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
414+
runnable::makeRunnable(msg, true, typed_handler, node, han_type)
411415
.withTDEpochFromMsg()
412416
.enqueue();
413417
});

src/vt/topos/location/location.impl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,8 @@ void EntityLocationCoord<EntityID>::routeMsgNode(
538538
hid, from, handler, envelopeGetRef(msg->env)
539539
);
540540

541-
runnable::makeRunnable(msg, true, handler, from)
541+
auto han_type = auto_registry::RegistryTypeEnum::RegGeneral;
542+
runnable::makeRunnable(msg, true, handler, from, han_type)
542543
.withTDEpochFromMsg()
543544
.run();
544545
} else {

0 commit comments

Comments
 (0)