Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Fix QOI/output correctness and probing geometry in
SNSolverHPCSummary
This branch fixes multiple correctness bugs in
src/solvers/snsolver_hpc.cppaffecting MPI reductions, RK2 consistency, probing geometry, restart-time continuity, and lattice perimeter tagging.Why
masterhad several issues that could skew reported QoIs or produce inconsistent behavior across run modes:BUILD_MPIin places where the project definesIMPORT_MPI.MAX_OUTFLOWwas not reduced globally across ranks.RMS_FLUXunder MPI used rank-local partial fluxes, making values rank-count dependent._scalarFluxcould be out of sync with the final Heun-averaged_solused for postprocessing.VAR_ABSORPTION_GREENscreen output used the wrong field.linspace2Ddenominator and odd probe-count layout assumptions).SIM_TIMEto zero instead of continuing from the loaded iteration.abs(bool)logic.What changed
File changed:
src/solvers/snsolver_hpc.cpp#ifdef BUILD_MPIwith#ifdef IMPORT_MPIin this file so MPI barriers/reductions compile and run under the project’s actual MPI macro.MPI_Allreduce(..., MPI_MAX)for_curMaxOrdinateOutflowinIterPostprocessing().FVMUpdate()snapshots previous global scalar flux._sol,_scalarFluxis recomputed (and allreduced in MPI) before postprocessing.VAR_ABSORPTION_GREENnow outputs_varAbsorptionHohlraumGreen(instead of_absorptionValsBlocksGreen[0])._centerGreen(cx,cy) so block QoIs track configured center offsets.assert( num_points > 1 )inlinspace2D.SetProbingCellsLineGreen()for even total line probe count and minimum side counts.#include <cassert>._curSimTimefrom_idx_start_iter * _dTinSolve()so resumed runs continue timeline correctly.else if) to avoid incorrect overlap/classification.Behavioral impact
MAX_OUTFLOW,RMS_FLUX, and MOMENTS reductions.Risk / compatibility
NDEBUG; release behavior remains non-terminating for those guards unless converted to runtime errors.Validation