Skip to content

Fix: Adding missing @:DEALLOCATE's#1592

Merged
sbryngelson merged 6 commits into
MFlowCode:masterfrom
joshgillis:deallocate-branch
Jun 24, 2026
Merged

Fix: Adding missing @:DEALLOCATE's#1592
sbryngelson merged 6 commits into
MFlowCode:masterfrom
joshgillis:deallocate-branch

Conversation

@joshgillis

Copy link
Copy Markdown
Contributor

Description

Added the two DEALLOCATE calls for Res_gs (line 105, within viscous if statement) and Gs_rs (line 111) needed in src/simulation/m_riemann_solvers.fpp

Closes #1568.

Type of change

  • Bug fix

Testing

Ran test suite on personal machine using CPU for both --no-mpi and --mpi. Then ran test suite on Tuolumne in lustre5 storage, using ./mfc.sh test -j 16 --mpi --gpu acc -- -c tuo. All cases passed for all testing instances.

Checklist

Check these like this [x] to indicate which of the below applies.

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed

See the developer guide for full coding standards.

GPU changes (expand if you modified src/simulation/)
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

AI code reviews

Reviews are not retriggered automatically. To request a review, comment on the PR:

  • @claude full review — Claude full review (also triggers on PR open/reopen/ready)
  • Or add label claude-full-review — Claude full review via label

@joshgillis joshgillis marked this pull request as ready for review June 13, 2026 23:21
@joshgillis joshgillis requested a review from sbryngelson as a code owner June 13, 2026 23:21
@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.48%. Comparing base (9b5507d) to head (c41f7e2).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1592   +/-   ##
=======================================
  Coverage   60.48%   60.48%           
=======================================
  Files          83       83           
  Lines       19888    19888           
  Branches     2951     2951           
=======================================
  Hits        12030    12030           
  Misses       5864     5864           
  Partials     1994     1994           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbryngelson sbryngelson marked this pull request as draft June 15, 2026 03:38
@joshgillis joshgillis marked this pull request as ready for review June 17, 2026 00:09
@sbryngelson sbryngelson marked this pull request as draft June 20, 2026 05:59
@sbryngelson sbryngelson marked this pull request as ready for review June 24, 2026 17:40
Copilot AI review requested due to automatic review settings June 24, 2026 17:40
@sbryngelson sbryngelson merged commit 05eda2d into MFlowCode:master Jun 24, 2026
44 of 81 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a one-shot memory leak (and associated GPU mapping leak) in the simulation Riemann solvers module by ensuring all module-allocated arrays are properly deallocated during finalization.

Changes:

  • Added missing @:DEALLOCATE(Res_gs) inside the viscous finalization path.
  • Added missing @:DEALLOCATE(Gs_rs) during module finalization.

fahnab666 pushed a commit to fahnab666/mfc-nabid that referenced this pull request Jul 6, 2026
Co-authored-by: Joshua Alan Gillis <gillis5@tuolumne2152.llnl.gov>
Co-authored-by: Daniel J. Vickers <dnlvickers5@gmail.com>
Co-authored-by: Spencer Bryngelson <sbryngelson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Gs_rs and Res_gs are @:ALLOCATE'd but never deallocated in the Riemann finalizer

4 participants