Skip to content

QL: final NTV output reads an unallocated local-solve exchange vector #129

Description

@krystophny

Reproduction

Build NEO-2-QL at 4b00b887b6a9c37928b6575130b9ad494d2cdc2b
with GNU Fortran bounds/runtime checks and run the driven fileless HELCORE case
described in #127. With GNU Fortran 12.2.0, one MPI rank, and libneo
13387c26305fec88158ff109516a10729e2df206, the local solves and final
propagator joining complete.

Expected

Final NTV output uses the same final geometry/normalization vector already
selected by diag_propagator_res: y_axi_averages for the axisymmetric path
or prop_a%y otherwise. The output writer must not depend on allocation state
left by an earlier local ripple solve.

Actual

The bounds build terminates while writing final single-species output:

nl,nr = 24 24
Fortran runtime error: Allocatable argument 'y_ntv_mod' is not allocated
#3 __ntv_mod_MOD_write_ntv_output_a at NEO-2-QL/ntv_mod.f90:813
#4 diag_propagator_res at NEO-2-QL/propagator.f90:953
#5 propagator_solver_loc at NEO-2-QL/propagator.f90:1452

diag_propagator_res has already allocated and populated its local y from
the final physical-output state at propagator.f90:824-829. It then calls
write_ntv_output(prop_a%p%qflux) at line 956. The writer ignores that local
state and allocates from the module exchange buffer at ntv_mod.f90:813-814.
That buffer is allocated only around local ripple solves at
propagator.f90:1093-1100; it is not a documented final-output lifetime.

The run exits nonzero after producing partial/local qflux files and before a
complete NTV result. Those files are not accepted transport output.

Environment

Evidence

The clean SLURM run passed the zero/driven source guards and mode-3 parity
test, completed the HELCORE local solves, printed nl,nr = 24 24, and then
failed at the unallocated module vector. Elapsed time was 5m37s and MaxRSS was
about 745 MiB. The executable and inputs were built from pinned Git heads; no
dirty checkout or copied binary was used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions