diff --git a/src/eigenvalue.F90 b/src/eigenvalue.F90 index 1bbcbe850e..c4b9b9a678 100644 --- a/src/eigenvalue.F90 +++ b/src/eigenvalue.F90 @@ -176,19 +176,19 @@ contains !$omp critical global_tallies(K_TRACKLENGTH) % value = & global_tallies(K_TRACKLENGTH) % value + global_tally_tracklength - global_tallies(K_COLLISION) % value = & + global_tallies(K_COLLISION) % value = & global_tallies(K_COLLISION) % value + global_tally_collision - global_tallies(LEAKAGE) % value = & + global_tallies(LEAKAGE) % value = & global_tallies(LEAKAGE) % value + global_tally_leakage - global_tallies(K_ABSORPTION) % value = & + global_tallies(K_ABSORPTION) % value = & global_tallies(K_ABSORPTION) % value + global_tally_absorption !$omp end critical ! reset private tallies - global_tally_tracklength = 0 - global_tally_collision = 0 - global_tally_leakage = 0 - global_tally_absorption = 0 + global_tally_tracklength = ZERO + global_tally_collision = ZERO + global_tally_leakage = ZERO + global_tally_absorption = ZERO !$omp end parallel #ifdef _OPENMP diff --git a/src/fixed_source.F90 b/src/fixed_source.F90 index 9e2d34600b..9dbd57324f 100644 --- a/src/fixed_source.F90 +++ b/src/fixed_source.F90 @@ -117,6 +117,17 @@ contains subroutine finalize_batch() +! Update global tallies with the omp private accumulation variables +!$omp parallel +!$omp critical + global_tallies(LEAKAGE) % value = & + global_tallies(LEAKAGE) % value + global_tally_leakage +!$omp end critical + + ! reset private tallies + global_tally_leakage = ZERO +!$omp end parallel + ! Collect and accumulate tallies call time_tallies % start() call synchronize_tallies() diff --git a/src/output.F90 b/src/output.F90 index cd08e46110..939451c6fb 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -7,7 +7,7 @@ module output use endf, only: reaction_name use error, only: fatal_error, warning use geometry_header, only: Cell, Universe, Surface, Lattice, RectLattice, & - &HexLattice, BASE_UNIVERSE + HexLattice, BASE_UNIVERSE use global use math, only: t_percentile use mesh_header, only: StructuredMesh diff --git a/tests/test_fixed_source/results_true.dat b/tests/test_fixed_source/results_true.dat index 2ec2d00b8e..99eb15e10d 100644 --- a/tests/test_fixed_source/results_true.dat +++ b/tests/test_fixed_source/results_true.dat @@ -1,3 +1,6 @@ tally 1: 4.483337E+02 2.017057E+04 +leakage: +9.820000E+00 +9.648000E+00 diff --git a/tests/test_fixed_source/test_fixed_source.py b/tests/test_fixed_source/test_fixed_source.py index 1f4382c08f..e96a3ad8fe 100644 --- a/tests/test_fixed_source/test_fixed_source.py +++ b/tests/test_fixed_source/test_fixed_source.py @@ -28,6 +28,10 @@ class FixedSourceTestHarness(TestHarness): outstr += '\n'.join(results) + '\n' tally_num += 1 + outstr += 'leakage:\n' + outstr += '{0:12.6E}'.format(sp._global_tallies[3][0]) + '\n' + outstr += '{0:12.6E}'.format(sp._global_tallies[3][1]) + '\n' + return outstr