Skip to content

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

Description

@sbryngelson

Symptom: one-shot memory leak + dangling GPU mapping per run; violates the project's ALLOCATE/DEALLOCATE pairing rule.

Mechanism: @:ALLOCATE(Gs_rs(1:num_fluids)) (src/simulation/m_riemann_solvers.fpp:3570 on master) and @:ALLOCATE(Res_gs(1:2, 1:Re_size_max)) (:3578) have no matching @:DEALLOCATE in s_finalize_riemann_solvers_module (:4691-4704).

Introduced: Res_gs never had a deallocate (2022 GPU merge, 6def75421, @anandrdbz); Gs_rs lost its deallocate as collateral in #39 (627bf85d0, 2022-12-29, @anshgupta1234) — the original hypoelasticity PR #29 had deallocate(gammas, pi_infs, Gs) and #39 deleted that line while relocating the other two arrays. Tagging @anandrdbz and @anshgupta1234 for context.

Fix: not yet fixed; tracked cleanup (documented in #1556's review notes). A two-line @:DEALLOCATE addition.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions