28 static long long ns_of(
double t)
34 return static_cast<long long>(std::llround(t));
37 static std::string
sanitize(
const std::string &name)
40 out.reserve(name.size());
43 if (c ==
' ' || c ==
'\t')
47 else if (c !=
'\n' && c !=
'\r')
52 return out.empty() ? std::string(
"region") : out;
57 return src == dst || bytes <= 0.0;
65 this->rank = mpi_rank - 1;
66 this->filename = args_info->
getValue<std::string>(
"chromevizfilename") + std::to_string(this->rank) +
".avt";
73 if (!
ofs.is_open() || dur_ns < 0.0)
77 ofs <<
"COMP " << app_rank <<
" " <<
ns_of(start_ns) <<
" " <<
ns_of(dur_ns) <<
" " <<
sanitize(name) <<
"\n";
87 ofs <<
"SEND " << src <<
" " << dst <<
" " <<
ns_of(start_ns) <<
" " <<
ns_of(dur_ns) <<
" "
88 <<
ns_of(bytes) <<
" " << tag <<
"\n";
98 ofs <<
"RECV " << dst <<
" " << src <<
" " <<
ns_of(start_ns) <<
" " <<
ns_of(dur_ns) <<
" "
99 <<
ns_of(bytes) <<
" " << tag <<
"\n";
104 if (!
ofs.is_open() || dur_ns < 0.0)
108 ofs <<
"COLL " << app_rank <<
" " <<
ns_of(start_ns) <<
" " <<
ns_of(dur_ns) <<
" " <<
sanitize(name) <<
"\n";
std::size_t DisCosTiC_Indextype
std::size_t DisCosTiC_Datatype
a wrapper class which contains functions for parsing the configuration file end class configParser
scalarT getValue(const std::string &key, scalarT const &defaultValue=scalarT()) const
a function that retrieves the value of a specific key
static std::string sanitize(const std::string &name)
void comp(DisCosTiC_Indextype app_rank, double start_ns, double dur_ns, const std::string &name)
ItacVtf(UserInterface::ConfigParser *args_info, DisCosTiC_Datatype mpi_rank, DisCosTiC_Datatype)
void send(DisCosTiC_Indextype src, DisCosTiC_Indextype dst, double start_ns, double dur_ns, double bytes, DisCosTiC_Indextype tag)
void collective(DisCosTiC_Indextype app_rank, double start_ns, double dur_ns, const std::string &name)
static bool skip_message(DisCosTiC_Indextype src, DisCosTiC_Indextype dst, double bytes)
void recv(DisCosTiC_Indextype dst, DisCosTiC_Indextype src, double start_ns, double dur_ns, double bytes, DisCosTiC_Indextype tag)
static long long ns_of(double t)
it parses the user-defined configuration file (.cfg)