Skip to content

Commit

Permalink
Merge pull request #2010 from DARMA-tasking/2009-release-1-2-1
Browse files Browse the repository at this point in the history
2009: Create release 1.2.1
  • Loading branch information
nlslatt authored Nov 9, 2022
2 parents 3ff11e0 + 672ebc1 commit 7c16301
Show file tree
Hide file tree
Showing 100 changed files with 4,073 additions and 3,438 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.1
6 changes: 5 additions & 1 deletion ci/ctest_job_script.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ set(CTEST_SOURCE_DIRECTORY
set(CTEST_BINARY_DIRECTORY
"$ENV{VT_BUILD}"
)
set(CTEST_GIT_COMMAND "git")
set(CTEST_UPDATE_VERSION_ONLY 1)

if ( NOT DEFINED ENV{VT_TRACE_RUNTIME_ENABLED} )
set(ENV{VT_TRACE_RUNTIME_ENABLED} "0")
Expand Down Expand Up @@ -169,8 +171,10 @@ set(configureOpts
)
#ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
ctest_start(Continuous)
ctest_update()
ctest_submit(PARTS Start Update RETRY_COUNT 6 RETRY_DELAY 10)
ctest_configure(OPTIONS "${configureOpts}" RETURN_VALUE ret_conf)
ctest_submit(PARTS Start Configure RETRY_COUNT 6 RETRY_DELAY 10)
ctest_submit(PARTS Configure RETRY_COUNT 6 RETRY_DELAY 10)
if (NOT ret_conf)
ctest_build(RETURN_VALUE ret_build)
ctest_submit(PARTS Build RETRY_COUNT 6 RETRY_DELAY 10)
Expand Down
12 changes: 6 additions & 6 deletions docs/md/lb-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ instrumentation of work and communication performed by collection elements.
To run a load balancer at runtime:

- Pass `--vt_lb --vt_lb_name=<LB>` as a command line argument
- Write a LB specification file `--vt_lb --vt_lb_file_name=<FILE>`
- Write a LB config file `--vt_lb --vt_lb_file_name=<FILE>`
- One can also pass `--vt_lb_self_migration` as a command line argument to allow load balancer to migrate objects to the same node

Note that one should use either `--vt_lb_name` or `--vt_lb_file_name` option, not both.

\section lb-specification-file LB Specification File
\section lb-config-file LB Config File

The LB specification file allows users to specify which load balancer along with
The LB config file allows users to specify which load balancer along with
which LB-specific configuration parameters are passed to the load balancer
instance for any given phase. The order of the LB phase specification lines in
the file disambiguates lines---higher precedence for earlier lines.

The format of the LB specification file is:
The format of the LB config file is:

\code
[%] <$phase> <$lbname> [$LB-specific-arg-1] ... [$LB-specific-arg-N]
Expand All @@ -42,7 +42,7 @@ balancer are allowed to customize how the load balancer is run with the format
of `key=value`. These arguments are the equivalent of passing
`--vt_lb_args="A=test B=test2"` on the command line.

The following is an example LB specification:
The following is an example LB config:

\code
%10 TemperedLB c=1 k=5 f=2 i=10
Expand All @@ -51,7 +51,7 @@ The following is an example LB specification:
120 GreedyLB c=0 k=2 f=3 i=3
\endcode

To print LB specification during startup, use `--vt_lb_show_spec` command line flag.
To print LB config during startup, use `--vt_lb_show_config` command line flag.

\section load-balancers Load balancers

Expand Down
7 changes: 7 additions & 0 deletions docs/md/node-lb-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,10 @@ The type of communication lines up with the enum

For all the broadcast-like edges, the communication logging will occur on the
receive of the broadcast side (one entry per broadcast recipient).

\section lb-spec-file LB Specification File
In order to customize when LB output is enabled and disabled, a LB
specification file can be passed to \vt via a command-line flag:
`--vt_lb_spec --vt_lb_spec_file=filename.spec`.

For details about vt's Specification File see \ref spec-file
48 changes: 48 additions & 0 deletions docs/md/spec-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
\page spec-file Spec File
\brief Specification File for vt components

VT is using Specification Files for various components (trace and LB). Such files can be used to control when (on which Phases) these components should be enabled/disabled.

The parser will read the following format:

\code
[%] <phase> <range negative> <range positive>
\endcode

The following is an example of a specification file:

\code
0 0 10
%100 -3 3
200 -5 5
\endcode

This specifies that component will be enabled on the following phases:

\code
{
[0,10], # phase 0 with offsets 0,+10 (subsumes [0,3] from %100 -3 3)
[97,103] # any phase % 100 with offset -3,+3
[195,205] # phase 200 with offsets -5,+5 (subsumes [197,203] from %100 -3 3)
[297,303] # any phase % 100 with offset -3,+3
[n%100-3,n%100+3] ... # any phase % 100 with offset -3,+3
}
\endcode

The sets of mod-phase and phase-specific entries must be unique. There may be
overlap across the two sets, but not within them. Having two entries that
start with `%100` or two entries that start with `100` would be invalid and
trigger a parsing error. But having a `%100` and `100` entry is valid.
Whether component is enabled is calculated as an OR across all specification
entries. Thus, if a given phase is contained in any spec line, it is
enabled. Note that `0 % 100 = 0`. Therefore, if the above example did not
contain the first line, component would be enabled as:

\code
{
[0,3], # any phase mod 100 from -3,+3
[97,103],
[195,205],
[297,303], ...
}
\endcode
44 changes: 1 addition & 43 deletions docs/md/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,4 @@ In order to customize when tracing is enabled and disabled, a trace
specification file can be passed to \vt via a command-line flag:
`--vt_trace_spec --vt_trace_spec_file=filename.spec`.

The parser will read the following format:

\code
[%] <phase> <range negative> <range positive>
\endcode

The following is an example of a trace specification:

\code
0 0 10
%100 -3 3
200 -5 5
\endcode

This specifies that tracing will be enabled on the following phases:

\code
{
[0,10], # phase 0 with offsets 0,+10 (subsumes [0,3] from %100 -3 3)
[97,103] # any phase % 100 with offset -3,+3
[195,205] # phase 200 with offsets -5,+5 (subsumes [197,203] from %100 -3 3)
[297,303] # any phase % 100 with offset -3,+3
[n%100-3,n%100+3] ... # any phase % 100 with offset -3,+3
}
\endcode

The sets of mod-phase and phase-specific entries must be unique. There may be
overlap across the two sets, but not within them. Having two entries that
start with `%100` or two entries that start with `100` would be invalid and
trigger a parsing error. But having a `%100` and `100` entry is valid.
Whether tracing is enabled is calculated as an OR across all specification
entries. Thus, if a given phase is contained in any spec line, it is
enabled. Note that `0 % 100 = 0`. Therefore, if the above example did not
contain the first line, tracing would be enabled as:

\code
{
[0,3], # any phase mod 100 from -3,+3
[97,103],
[195,205],
[297,303], ...
}
\endcode
For details about vt's Specification File see \ref spec-file
3 changes: 2 additions & 1 deletion scripts/report_logs_in_comment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ fi

# Build comment
commit_sha="$(git log --skip=1 -1 --pretty=format:%H)"
commit_date="$(TZ=UTC0 git show -s --format=%cd --date=format-local:'%Y-%m-%d %H:%M:%S' "$commit_sha")"
build_link='[Build log](https://dev.azure.com/DARMA-tasking/DARMA/_build/results?buildId='"$build_id"'&view=logs&j='"$job_id"'&t='"$task_id)"
comment_body="Build for $commit_sha\n\n"'```'"\n$val\n"'```'"\n\n$build_link"
comment_body="Build for $commit_sha ($commit_date UTC)\n\n"'```'"\n$val\n"'```'"\n\n$build_link"

# Fix new lines
new_line="\n"
Expand Down
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ set(
serialization
serialization/messaging serialization/traits serialization/auto_dispatch
serialization/sizing
utils/demangle utils/container utils/bits utils/mutex
utils/demangle utils/container utils/bits utils/mutex utils/file_spec
utils/hash utils/atomic utils/tls utils/static_checks utils/string
utils/memory utils/mpi_limits utils/compress utils/json utils/strong
registry/auto
Expand All @@ -107,7 +107,6 @@ set(
objgroup/proxy objgroup/holder objgroup/active_func objgroup/dispatch
objgroup/type_registry
trace
trace/file_spec
)
list(APPEND PROJECT_SUBDIRS_LIST ${TOP_LEVEL_SUBDIRS})

Expand Down
2 changes: 1 addition & 1 deletion src/vt/collective/collective_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void printOverwrittens(
printIfOverwritten(vt_trace_event_polling);
printIfOverwritten(vt_trace_irecv_polling);
printIfOverwritten(vt_lb);
printIfOverwritten(vt_lb_show_spec);
printIfOverwritten(vt_lb_show_config);
printIfOverwritten(vt_lb_quiet);
printIfOverwritten(vt_lb_file_name);
printIfOverwritten(vt_lb_name);
Expand Down
7 changes: 5 additions & 2 deletions src/vt/configs/arguments/app_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct AppConfig {
bool vt_trace_irecv_polling = false;

bool vt_lb = false;
bool vt_lb_show_spec = false;
bool vt_lb_show_config = false;
bool vt_lb_quiet = false;
std::string vt_lb_file_name = "";
std::string vt_lb_name = "NoLB";
Expand All @@ -155,6 +155,9 @@ struct AppConfig {
std::string vt_lb_statistics_dir = "";
bool vt_help_lb_args = false;
bool vt_lb_self_migration = false;
bool vt_lb_spec = false;
std::string vt_lb_spec_file = "";


bool vt_no_detect_hang = false;
bool vt_print_no_progress = true;
Expand Down Expand Up @@ -306,7 +309,7 @@ struct AppConfig {
| vt_trace_irecv_polling

| vt_lb
| vt_lb_show_spec
| vt_lb_show_config
| vt_lb_quiet
| vt_lb_file_name
| vt_lb_name
Expand Down
22 changes: 14 additions & 8 deletions src/vt/configs/arguments/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void addTraceArgs(CLI::App& app, AppConfig& appConfig) {
auto qy = app.add_flag("--vt_trace_sys_collection", appConfig.vt_trace_sys_collection, tsyscoll);
auto qz = app.add_flag("--vt_trace_sys_serial_msg", appConfig.vt_trace_sys_serial_msg, tsyssmsg);
auto qza = app.add_flag("--vt_trace_spec", appConfig.vt_trace_spec, tspec);
auto qzb = app.add_option("--vt_trace_spec_file", appConfig.vt_trace_spec_file, tspecfile)->capture_default_str();
auto qzb = app.add_option("--vt_trace_spec_file", appConfig.vt_trace_spec_file, tspecfile)->capture_default_str()->check(CLI::ExistingFile);
auto qzc = app.add_flag("--vt_trace_memory_usage", appConfig.vt_trace_memory_usage, tmemusage);
auto qzd = app.add_flag("--vt_trace_event_polling", appConfig.vt_trace_event_polling, tpolled);
auto qze = app.add_flag("--vt_trace_irecv_polling", appConfig.vt_trace_irecv_polling, tirecv);
Expand Down Expand Up @@ -459,11 +459,11 @@ void addLbArgs(CLI::App& app, AppConfig& appConfig) {
/*
* Flags for enabling load balancing and configuring it
*/
auto lb = "Enable load balancing";
auto lb_args = "Arguments pass to LB: \"x=0 y=1\"; try --vt_help_lb_args";
auto lb_quiet = "Silence load balancing output";
auto lb_file_name = "LB specification file to read";
auto lb_show_spec = "Show LB specification during startup";
auto lb = "Enable load balancing";
auto lb_args = "Arguments pass to LB: \"x=0 y=1\"; try --vt_help_lb_args";
auto lb_quiet = "Silence load balancing output";
auto lb_file_name = "LB config file to read";
auto lb_show_config = "Show LB config during startup";
auto lb_name = "Name of the load balancer to use";
auto lb_interval = "Load balancing interval";
auto lb_keep_last_elm = "Do not migrate last element in collection";
Expand All @@ -478,10 +478,12 @@ void addLbArgs(CLI::App& app, AppConfig& appConfig) {
auto lb_statistics_file = "Load balancing statistics output file name";
auto lb_statistics_dir = "Load balancing statistics output directory name";
auto lb_self_migration = "Allow load balancer to migrate objects to the same node";
auto lb_spec = "Enable LB spec file (defines which phases output LB data)";
auto lb_spec_file = "File containing LB spec; --vt_lb_spec to enable";
auto s = app.add_flag("--vt_lb", appConfig.vt_lb, lb);
auto t1 = app.add_flag("--vt_lb_quiet", appConfig.vt_lb_quiet, lb_quiet);
auto u = app.add_option("--vt_lb_file_name", appConfig.vt_lb_file_name, lb_file_name)->capture_default_str()->check(CLI::ExistingFile);
auto u1 = app.add_flag("--vt_lb_show_spec", appConfig.vt_lb_show_spec, lb_show_spec);
auto u1 = app.add_flag("--vt_lb_show_config", appConfig.vt_lb_show_config, lb_show_config);
auto v = app.add_option("--vt_lb_name", appConfig.vt_lb_name, lb_name)->capture_default_str();
auto v1 = app.add_option("--vt_lb_args", appConfig.vt_lb_args, lb_args)->capture_default_str();
auto w = app.add_option("--vt_lb_interval", appConfig.vt_lb_interval, lb_interval)->capture_default_str();
Expand All @@ -496,7 +498,9 @@ void addLbArgs(CLI::App& app, AppConfig& appConfig) {
auto yy = app.add_flag("--vt_lb_statistics_compress", appConfig.vt_lb_statistics_compress, lb_statistics_comp);
auto yz = app.add_option("--vt_lb_statistics_file", appConfig.vt_lb_statistics_file, lb_statistics_file)->capture_default_str();
auto zz = app.add_option("--vt_lb_statistics_dir", appConfig.vt_lb_statistics_dir, lb_statistics_dir)->capture_default_str();
auto lbasm = app.add_flag("--vt_lb_self_migration", appConfig.vt_lb_self_migration, lb_self_migration);
auto lbasm = app.add_flag("--vt_lb_self_migration", appConfig.vt_lb_self_migration, lb_self_migration);
auto lbspec = app.add_flag("--vt_lb_spec", appConfig.vt_lb_spec, lb_spec);
auto lbspecfile = app.add_option("--vt_lb_spec_file", appConfig.vt_lb_spec_file, lb_spec_file)->capture_default_str()->check(CLI::ExistingFile);

auto debugLB = "Load Balancing";
s->group(debugLB);
Expand All @@ -518,6 +522,8 @@ void addLbArgs(CLI::App& app, AppConfig& appConfig) {
yz->group(debugLB);
zz->group(debugLB);
lbasm->group(debugLB);
lbspec->group(debugLB);
lbspecfile->group(debugLB);

// help options deliberately omitted from the debugLB group above so that
// they appear grouped with --vt_help when --vt_help is used
Expand Down
20 changes: 9 additions & 11 deletions src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ void ActiveMessenger::initialize() {
}

void ActiveMessenger::startup() {
auto const this_node = theContext()->getNode();
bare_handler_dummy_elm_id_for_lb_data_ =
elm::ElmIDBits::createBareHandler(this_node);
elm::ElmIDBits::createBareHandler(this_node_);

#if vt_check_enabled(lblite)
// Hook to collect LB data about objgroups
Expand Down Expand Up @@ -225,7 +224,7 @@ EventType ActiveMessenger::sendMsgBytesWithPut(
}

vtWarnIf(
dest == theContext()->getNode() &&
dest == this_node_ &&
not is_bcast &&
not theConfig()->vt_lb_self_migration,
fmt::format("Destination {} should != this node", dest)
Expand Down Expand Up @@ -375,7 +374,6 @@ EventType ActiveMessenger::sendMsgMPI(
"sendMsgMPI: (multi): size={}\n", msg_size
);
auto tag = allocateNewTag();
auto this_node = theContext()->getNode();

// Send the actual data in multiple chunks
PtrLenPairType tup = std::make_tuple(untyped_msg, msg_size);
Expand All @@ -387,7 +385,7 @@ EventType ActiveMessenger::sendMsgMPI(
mpi_event->setManagedMessage(base.to<ShortMessage>());

// Send the control message to receive the multiple chunks of data
auto m = makeMessage<MultiMsg>(info, this_node, msg_size);
auto m = makeMessage<MultiMsg>(info, this_node_, msg_size);
sendMsg<MultiMsg, chunkedMultiMsg>(dest, m);

return event_id;
Expand Down Expand Up @@ -491,9 +489,8 @@ EventType ActiveMessenger::doMessageSend(
);

// Don't go through MPI with self-send, schedule the message locally instead
auto const this_node = theContext()->getNode();
if (deliver) {
if (dest != this_node) {
if (dest != this_node_) {
sendMsgBytesWithPut(dest, base, send_tag);
} else {
recordLBDataCommForSend(dest, base, base.size());
Expand Down Expand Up @@ -611,7 +608,7 @@ std::tuple<EventType, int> ActiveMessenger::sendDataMPI(
}

if (events.size() > 1) {
ret_event = theEvent()->createParentEvent(theContext()->getNode());
ret_event = theEvent()->createParentEvent(this_node_);
auto& holder = theEvent()->getEventHolder(ret_event);
for (auto&& child_event : events) {
holder.get_event()->addEventToList(child_event);
Expand Down Expand Up @@ -864,8 +861,9 @@ void ActiveMessenger::recordLBDataCommForSend(
NodeType const dest, MsgSharedPtr<BaseMsgType> const& base,
MsgSizeType const msg_size
) {
if (theContext()->getTask() != nullptr) {
auto lb = theContext()->getTask()->get<ctx::LBData>();
auto the_task = theContext()->getTask();
if (the_task != nullptr) {
auto lb = the_task->get<ctx::LBData>();

if (lb) {
auto const& msg = base.get();
Expand All @@ -874,7 +872,7 @@ void ActiveMessenger::recordLBDataCommForSend(

if (not already_recorded) {
auto dest_elm_id = elm::ElmIDBits::createBareHandler(dest);
theContext()->getTask()->send(dest_elm_id, msg_size);
the_task->send(dest_elm_id, msg_size);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/vt/messaging/active.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ ActiveMessenger::PendingSendType ActiveMessenger::sendMsgCopyableImpl(
}

if (is_bcast) {
dest = theContext()->getNode();
dest = this_node_;
}
if (tag != no_tag) {
envelopeSetTag(rawMsg->env, tag);
Expand Down
1 change: 1 addition & 0 deletions src/vt/runtime/runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ void Runtime::setup() {
# if vt_check_enabled(trace_enabled)
theTrace->loadAndBroadcastSpec();
# endif
theNodeLBData->loadAndBroadcastSpec();

if (theConfig()->vt_pause) {
pauseForDebugger();
Expand Down
Loading

0 comments on commit 7c16301

Please sign in to comment.