Skip to content

Commit

Permalink
fix overlapping prep timers
Browse files Browse the repository at this point in the history
  • Loading branch information
elgarten committed Jul 30, 2024
1 parent 5bb1d16 commit 676c8a7
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions pando-rt/src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,29 +198,35 @@ int main(int argc, char* argv[]) {
rc = getrusage(RUSAGE_SELF, &end);
if(rc != 0) {PANDO_ABORT("GETRUSAGE FAILED");}
auto thisPlace = pando::getCurrentPlace();
SPDLOG_WARN("Total time on node: {}, was {}ns",
thisPlace.node.id,
end.ru_utime.tv_sec * 1000000000 + end.ru_utime.tv_usec * 1000 -
(start.ru_utime.tv_sec * 1000000000 + start.ru_utime.tv_usec * 1000) +
end.ru_stime.tv_sec * 1000000000 + end.ru_stime.tv_usec * 1000 -
(start.ru_stime.tv_sec * 1000000000 + start.ru_stime.tv_usec * 1000));
for(std::uint64_t i = 0; i < std::uint64_t(dims.core.x + 1); i++) {
SPDLOG_WARN("Idle time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
idleCount.get(i));
SPDLOG_WARN("Pointer time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
pointerCount.get(i));
SPDLOG_WARN("Scheduler time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
schedulerCount.get(i));
SPDLOG_WARN("DoAll time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
doAllCount.get(i));
for(std::int64_t j = 0; j < std::int64_t(dims.node.id); j++) {
if (j == thisPlace.node.id) {
SPDLOG_WARN("Total time on node: {}, was {}ns",
thisPlace.node.id,
end.ru_utime.tv_sec * 1000000000 + end.ru_utime.tv_usec * 1000 -
(start.ru_utime.tv_sec * 1000000000 + start.ru_utime.tv_usec * 1000) +
end.ru_stime.tv_sec * 1000000000 + end.ru_stime.tv_usec * 1000 -
(start.ru_stime.tv_sec * 1000000000 + start.ru_stime.tv_usec * 1000));
for(std::uint64_t i = 0; i < std::uint64_t(dims.core.x + 1); i++) {
SPDLOG_WARN("Idle time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
idleCount.get(i));
SPDLOG_WARN("Pointer time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
pointerCount.get(i));
SPDLOG_WARN("Scheduler time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
schedulerCount.get(i));
SPDLOG_WARN("DoAll time on node: {}, core: {} was {}",
thisPlace.node.id,
std::int8_t((i == std::uint64_t(dims.core.x)) ? -1 : i),
doAllCount.get(i));
}
}

pando::Nodes::barrier();
}


Expand Down

0 comments on commit 676c8a7

Please sign in to comment.