MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / init

Method init

src/Monitoring/FlopCounter.cpp:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65namespace seissol::monitoring {
66
67void FlopCounter::init(const std::string& outputFileNamePrefix) {
68 const std::string outputFileName = outputFileNamePrefix + "-flops.csv";
69 const int rank = seissol::MPI::mpi.rank();
70 const auto worldSize = static_cast<size_t>(seissol::MPI::mpi.size());
71 if (rank == 0) {
72 out.open(outputFileName);
73 out << "time,";
74 for (size_t i = 0; i < worldSize - 1; ++i) {
75 out << "rank_" << i << "_accumulated,";
76 out << "rank_" << i << "_current,";
77 }
78 out << "rank_" << worldSize - 1 << "_accumulated,";
79 out << "rank_" << worldSize - 1 << "_current" << std::endl;
80 }
81}
82
83void FlopCounter::printPerformanceUpdate(double wallTime) {
84 const int rank = seissol::MPI::mpi.rank();

Callers

nothing calls this directly

Calls 3

rankMethod · 0.80
sizeMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected