Skip to content

Commit

Permalink
#1111: active: fix argument handling
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Dec 21, 2020
1 parent a9a551c commit afff29e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/vt/configs/arguments/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,10 @@ static std::unique_ptr<char*[]> new_argv = nullptr;
/*
* Options for configuring the runtime
*/
auto max_size = "Maximum MPI send size (causes larger messages to be split "
"into multiple MPI sends)";
auto a1x = app.add_option(
"--vt_max_mpi_send_size", config_.vt_max_mpi_send_size, max_size, true
"--vt_max_mpi_send_size", vt_max_mpi_send_size, max_size, true
);

auto configRuntime = "Runtime";
Expand Down
2 changes: 1 addition & 1 deletion src/vt/configs/arguments/args.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ struct ArgConfig {
static bool vt_debug_objgroup;

static bool vt_debug_print_flush;
std::size_t vt_max_mpi_send_size;
static std::size_t vt_max_mpi_send_size;

static bool vt_user_1;
static bool vt_user_2;
Expand Down
10 changes: 5 additions & 5 deletions src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void ActiveMessenger::handleChunkedMultiMsg(MultiMsg* msg) {
auto const tag = info.getTag();

auto fn = [buf,sender,size,tag,this](PtrLenPairType,ActionType){
vt_debug_print(
debug_print(
active, node,
"handleChunkedMultiMsg: all chunks arrived tag={}, size={}, from={}\n",
tag, size, sender
Expand All @@ -234,13 +234,13 @@ EventType ActiveMessenger::sendMsgMPI(

char* untyped_msg = reinterpret_cast<char*>(base_typed_msg);

vt_debug_print(
debug_print(
active, node,
"sendMsgMPI: dest={}, msg_size={}, send_tag={}\n",
dest, msg_size, send_tag
);

auto const max_per_send = theConfig()->vt_max_mpi_send_size;
auto const max_per_send = ArgType::vt_max_mpi_send_size;
if (static_cast<std::size_t>(msg_size) < max_per_send) {
auto const event_id = theEvent()->createMPIEvent(this_node_);
auto& holder = theEvent()->getEventHolder(event_id);
Expand Down Expand Up @@ -274,7 +274,7 @@ EventType ActiveMessenger::sendMsgMPI(

return event_id;
} else {
vt_debug_print(
debug_print(
active, node,
"sendMsgMPI: (multi): size={}\n", msg_size
);
Expand Down Expand Up @@ -487,7 +487,7 @@ std::tuple<EventType, int> ActiveMessenger::sendDataMPI(
}
#endif

vt_debug_print(
debug_print(
active, node,
"sendDataMPI: remainder={}, node={}, tag={}, num_sends={}, subsize={},"
"total size={}\n",
Expand Down

0 comments on commit afff29e

Please sign in to comment.