Skip to content

Commit

Permalink
only output stats from I/O processor (#953)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Jul 20, 2022
1 parent 7acbea1 commit a495221
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions unit_test/test_react/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,15 @@ void main_main ()

write_job_info(prefix + name + integrator + language);

// Tell the I/O Processor to write out the "run time"
amrex::Print() << "Run time = " << stop_time << std::endl;
if (ParallelDescriptor::IOProcessor()) {

// Tell the I/O Processor to write out the "run time"
amrex::Print() << "Run time = " << stop_time << std::endl;

// print statistics
std::cout << "min number of rhs calls: " << n_rhs_min << std::endl;
std::cout << "avg number of rhs calls: " << n_rhs_sum / (n_cell*n_cell*n_cell) << std::endl;
std::cout << "max number of rhs calls: " << n_rhs_max << std::endl;
// print statistics
std::cout << "min number of rhs calls: " << n_rhs_min << std::endl;
std::cout << "avg number of rhs calls: " << n_rhs_sum / (n_cell*n_cell*n_cell) << std::endl;
std::cout << "max number of rhs calls: " << n_rhs_max << std::endl;
}

}

0 comments on commit a495221

Please sign in to comment.