Skip to content

Commit 33c3211

Browse files
committed
#2380: examples: Fix perf data example
1 parent ed2a61d commit 33c3211

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/collection/do_flops_perf.cc

+2-3
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,14 @@ double pi(uint64_t n) {
6363

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

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

7170
// ----------------------------------------------------------
7271
// test non packed double precision floating point operations
7372
// should result in ~4*n of these operations
74-
double p = pi(10000000);
73+
double p = pi(flopsPerIter_);
7574
fmt::print("pi: {}\n", p);
7675
// ----------------------------------------------------------
7776

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

138137
for (std::size_t i = 0; i < maxIter; i++) {
139138
vt::runInEpochCollective([&]{
140-
col_proxy.broadcastCollective<&GenericWork::doIteration>(flopsPerIter);
139+
col_proxy.broadcastCollective<&GenericWork::doIteration>();
141140
});
142141
vt::thePhase()->nextPhaseCollective();
143142
}

0 commit comments

Comments
 (0)