Skip to content

Commit

Permalink
#2380: examples: Fix perf data example
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepebay committed Feb 3, 2025
1 parent 5678f61 commit c68f792
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/collection/do_flops_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ double pi(uint64_t n) {

struct GenericWork : vt::Collection<GenericWork, vt::Index1D> {
void doIteration() {
iter_ += 1;
fmt::print("-- Starting Iteration --\n");

vt::theContext()->getTask()->startMetrics();

// ----------------------------------------------------------
// test non packed double precision floating point operations
// should result in ~4*n of these operations
double p = pi(10000000);
double p = pi(flopsPerIter_);
fmt::print("pi: {}\n", p);
// ----------------------------------------------------------

Expand Down Expand Up @@ -137,7 +136,7 @@ int main(int argc, char** argv) {

for (std::size_t i = 0; i < maxIter; i++) {
vt::runInEpochCollective([&]{
col_proxy.broadcastCollective<&GenericWork::doIteration>(flopsPerIter);
col_proxy.broadcastCollective<&GenericWork::doIteration>();
});
vt::thePhase()->nextPhaseCollective();
}
Expand Down

0 comments on commit c68f792

Please sign in to comment.