diff --git a/src/eigenvalue.F90 b/src/eigenvalue.F90 index 4028dc2359..6647603c46 100644 --- a/src/eigenvalue.F90 +++ b/src/eigenvalue.F90 @@ -161,10 +161,6 @@ contains integer :: i ! loop index for state point batches - ! Before accumulating results for global_tallies, we need to get the - ! current batch estimate of k_analog for displaying to output - k_batch(current_batch) = global_tallies(K_ANALOG) % value - ! Collect tallies if (tallies_on) then call timer_start(time_tallies) @@ -549,6 +545,8 @@ contains ! ========================================================================= ! SINGLE-BATCH ESTIMATE OF K-EFFECTIVE + if (.not. active_batches) k_batch(current_batch) = global_tallies(K_ANALOG) % value + #ifdef MPI if ((.not. active_batches) .or. (.not. reduce_tallies)) then ! Reduce value of k_batch if running in parallel diff --git a/src/tally.F90 b/src/tally.F90 index e1af9ae664..8bcffcd13e 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -1506,6 +1506,14 @@ contains curr_ptr => curr_ptr % next end do + if (run_mode == MODE_EIGENVALUE) then + ! Get the current batch estimate of k_analog for displaying to output + ! --- this has to be performed after reduce_tally_values and before + ! accumulate_result + + k_batch(current_batch) = global_tallies(K_ANALOG) % value + end if + ! Accumulate results for global tallies if (active_batches) call accumulate_result(global_tallies) end if