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
IBM: harden device-side patch_ib lookups against non-positive ids (silent on NVHPC GPU) #2396
Most unguarded patch_ib(id) reads in device kernels trace to ghost_points(:)%ib_patch_id, set in s_find_ghost_points and s_find_ghost_points_ordered from s_get_neighborhood_idx, which returns -1 when the marker's body is not in the rank's list. Sites include m_ibm.fpp (about 699, 1441-1457, 1568, 2011, 2348, 3949, 4284) and m_compute_levelset.fpp (about 41, 63). The collision code, momentum-set and face-flux sites are guarded. On an A100 (NVHPC 25.5), the IBM label with an aborting variant (clamp the id to 1 and abort after the loop on a flag) saw no non-positive id in 115 tests, so this is hardening, not a known bug; an undefined read would be silent on NVHPC GPU (cf. the conditionally-assigned private scalar fixed in #2330 and documented in the Silent-Failure Traps).
Proposal
A small guard or abort at the two setters (+20/-6 lines); parked until an id <= 0 is ever observed.
Activity
sbryngelson commentedon Nov 22, 2026
Related pull requests: #2330 (conditionally assigned private scalar, merged), #2329 (wall column, merged).
AI-assisted (Claude Code).