xbt_assert(in, "smpirun: Cannot open the host file: %s", hostfile.c_str());
std::string str;
while (std::getline(in, str)) {
- if (str.size() > 0)
+ if (not str.empty())
hosts.emplace_back(e->host_by_name(str));
}
- xbt_assert(hosts.size(), "smpirun: the hostfile '%s' is empty", hostfile.c_str());
+ xbt_assert(not hosts.empty(), "smpirun: the hostfile '%s' is empty", hostfile.c_str());
return hosts;
}
xbt_assert(in, "smpirun: Cannot open the replay file: %s", replayfile.c_str());
std::string str;
while (std::getline(in, str)) {
- if (str.size() > 0)
+ if (not str.empty())
replay.emplace_back(str);
}
{
std::vector<std::string> args{std::to_string(rank_id)};
// pass arguments to process only if not a replay execution
- if (replay.size() == 0) {
+ if (replay.empty()) {
for (int i = 0; i < argc; i++) {
args.push_back(argv[i]);
}
}
actor->set_property("instance_id", "smpirun");
actor->set_property("rank", rank_id);
- if (replay.size() > 0)
+ if (not replay.empty())
actor->set_property("smpi_replay", "true");
/* shared trace file, set it to rank 0 */
if (i == 0 && replay.size() == 1)