Remove declaration of global_tally_* values on Fortran side

No more OpenMP in Fortran code!
This commit is contained in:
Paul Romano 2019-02-19 23:09:10 -06:00
parent 4f0c217c18
commit 1542cf7bfd
3 changed files with 11 additions and 20 deletions

View file

@ -114,11 +114,15 @@ extern std::vector<int> active_surface_tallies;
} // namespace model
// Threadprivate variables
extern "C" double global_tally_absorption;
extern "C" double global_tally_collision;
extern "C" double global_tally_tracklength;
extern "C" double global_tally_leakage;
// It is possible to protect accumulate operations on global tallies by using an
// atomic update. However, when multiple threads accumulate to the same global
// tally, it can cause a higher cache miss rate due to invalidation. Thus, we
// use threadprivate variables to accumulate global tallies and then reduce at
// the end of a generation.
extern double global_tally_absorption;
extern double global_tally_collision;
extern double global_tally_tracklength;
extern double global_tally_leakage;
#pragma omp threadprivate(global_tally_absorption, global_tally_collision, \
global_tally_tracklength, global_tally_leakage)