vt::utils::file_spec::FileSpec struct

Parses spec file when available and tests when its enabled. A single node parses the specification; all others receive the spec from a broadcast.

Parses the following format: [%]<phase> <range negative>=""> <range positive>=""> """ 0 0 10 %100 -3 3 200 -5 5 """

This specifies that tracing/lb will be enabled on the following phases: { [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 }

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/lb 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/lb would be enabled as:

{ [0,3], # any phase mod 100 from -3,+3 [97,103], [195,205], [297,303], ... }

Public types

using ProxyType = vt::objgroup::proxy::Proxy<FileSpec>
using SpecIndex = int64_t
using DoneMsg = collective::ReduceNoneMsg

Public static functions

static auto construct(FileSpecType type) -> ProxyType
Construct a new FileSpec objgroup.

Public functions

auto checkEnabled(SpecIndex in_phase) -> bool
Check entire spec to see if it is enabled on any of the entries.
auto hasSpec() -> bool
Check if a specification is enabled, file specified, and file exists. Aborts if file specified but the file is not accessible.
void parse()
Parse the specification file.
void broadcastSpec()
Broadcast parsed specification to all nodes.
auto specReceived() const -> bool
Check if spec has been received.

Function documentation

static ProxyType vt::utils::file_spec::FileSpec::construct(FileSpecType type)

Construct a new FileSpec objgroup.

Returns the proxy

bool vt::utils::file_spec::FileSpec::checkEnabled(SpecIndex in_phase)

Check entire spec to see if it is enabled on any of the entries.

Parameters
in_phase in the phase to check
Returns whether it is enabled

bool vt::utils::file_spec::FileSpec::hasSpec()

Check if a specification is enabled, file specified, and file exists. Aborts if file specified but the file is not accessible.

Returns whether a spec exists