You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Semi-Lagrangian record of a units field is 1000 times too large at np 2 and up #992
The semi-Lagrangian record of a units-carrying field is 1000 times too large at np 2 and up, with no error.
T raw 0.5 in K, SemiLagrangian record, update_pre_solve (p27_record_units.py): psi_star raw 0.5 at np 1, 500 at np 2.
_record_psi_star_from_field_data (systems/ddt.py:3520) reads var.array, which is dimensional, strips the units, and writes the plain number as non-dimensional. np 1 takes another route. No full advection-diffusion solve was run, so its effect on a solve is not measured.
The same function also reads a SYM_TENSOR's S[1,1] from S[0,1]'s slot: 11 where 12 is right, at np 2 and 3 (p14_sl.py). It flattens var.array by row and takes the index from meshVariable_lookup_by_symbol.
Found in the third review of the #909 branch. Measured on eddab70 (development before #954 to #973, which do not touch these paths) unless stated; not rerun on f31edcb. Probes on hyperion in runs/2026-11-06/review909r3/probes/.
Part of the units bundle the hub is recording for one owner: #979, and the issues linked below.
Underworld development team with AI support from Claude Code
Still live on development a6eebb6, and not the same defect as #990: the record error survives a fix to the clamp, and at np 2 the two cancel.
Probe: reference quantities (1000 km, 1 Myr, 1e24 kg, 1000 K), T in K with raw value 0.5, SemiLagrangian(..., units="K"), update_pre_solve(0.01), raw psi_star. The patched arm wraps _apply_monotone_limit to work in non-dimensional values, which is the fix for #989 and #990.
The np 2 error does not depend on the limiter. It comes from _record_psi_star_from_field_data (ddt.py:3497, vflat = np.asarray(var.array)), which reads the dimensional var.array, strips its units and stores the number as non-dimensional. That is the same class as #991 (np.asarray(cv.coords)), applied to values rather than coordinates. The fixes for #989 and #990 and for this issue should land together. Otherwise a clamped parallel run that is right today by accident becomes 1000 times wrong.
Script: runs/2026-11-10-sweep/D/probes/g9_clamp.py on hyperion.
Underworld development team with AI support from Claude Code
Re-verified on development 8f0ed0a (H3 units). Raw psi_star is 0.5 at np 1 and 500 at np 2 with no clamp, and 0.0005 and 0.5 with the clamp, the same as the comment above. H3 owns this fix. It reads var.array with its units kept, and picks the component by its (i, j) position, which also fixes the SYM_TENSOR slot. It will be stacked on #1003 and merged right after it, so that no merge order leaves a clamped parallel run 1000 times off.
Underworld development team with AI support from Claude Code
Fixed in development by #1205 (units PR 2), merge commit 04d6f84. The PR body gives the change for this issue and the test that fails on development without it. H1 checked each reproducer, at np 1 to 4 where the issue is parallel. The issue stays open until the release.
Underworld development team with AI support from Claude Code
Activity
lmoresi commentedon Nov 10, 2026
Still live on development a6eebb6, and not the same defect as #990: the record error survives a fix to the clamp, and at np 2 the two cancel.
Probe: reference quantities (1000 km, 1 Myr, 1e24 kg, 1000 K),
Tin K with raw value 0.5,SemiLagrangian(..., units="K"),update_pre_solve(0.01), rawpsi_star. Thepatchedarm wraps_apply_monotone_limitto work in non-dimensional values, which is the fix for #989 and #990.monotone_mode="clamp", plainmonotone_mode="clamp", limiter patchedThe np 2 error does not depend on the limiter. It comes from
_record_psi_star_from_field_data(ddt.py:3497,vflat = np.asarray(var.array)), which reads the dimensionalvar.array, strips its units and stores the number as non-dimensional. That is the same class as #991 (np.asarray(cv.coords)), applied to values rather than coordinates. The fixes for #989 and #990 and for this issue should land together. Otherwise a clamped parallel run that is right today by accident becomes 1000 times wrong.Script:
runs/2026-11-10-sweep/D/probes/g9_clamp.pyon hyperion.Underworld development team with AI support from Claude Code
lmoresi commentedon Nov 10, 2026
Re-verified on development 8f0ed0a (H3 units). Raw
psi_staris 0.5 at np 1 and 500 at np 2 with no clamp, and 0.0005 and 0.5 with the clamp, the same as the comment above. H3 owns this fix. It readsvar.arraywith its units kept, and picks the component by its (i, j) position, which also fixes the SYM_TENSOR slot. It will be stacked on #1003 and merged right after it, so that no merge order leaves a clamped parallel run 1000 times off.Underworld development team with AI support from Claude Code
Merge pull request #1205 from underworldcode/units/frame-defects
lmoresi commentedon Nov 16, 2026
Fixed in development by #1205 (units PR 2), merge commit 04d6f84. The PR body gives the change for this issue and the test that fails on development without it. H1 checked each reproducer, at np 1 to 4 where the issue is parallel. The issue stays open until the release.
Underworld development team with AI support from Claude Code
Generated by Claude Code
SemiLagrangian: the parallel record copies the non-dimensional data (u…