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: num_local_ibs_max is a compile-time 30000 and sizes several arrays; make it a runtime parameter #2395
num_local_ibs_max = 30000 (src/common/m_constants.fpp) is not a loop bound anywhere; it only sizes allocations and checks: collision_lookup(num_local_ibs_max*27*8, 4) (about 104 MB per rank), wall_overlap_distances(num_local_ibs_max*27, 6) (about 39 MB), ib_box(6, num_local_ibs_max, -1:1, -1:1, -1:1), ib_face_ft, local_ib_patch_ids, an automatic local_ib_idx_old in the handoff routine, the handoff MPI buffer (patch_bytes * min(num_local_ibs_max, num_gbl_ibs)), the pair-bitset capacity cap, and the aborts from #2351. With about 1000 immersed boundaries per GPU that is about 150 to 200 MB of device memory per rank held for nothing.
Proposal
A runtime parameter (default 30000, same behaviour) read by those allocations; local_ib_patch_ids and the automatic array become allocatable. Low priority: it saves memory only, but it matters if several ranks share a GPU.
Activity
sbryngelson commentedon Nov 22, 2026
Related pull requests: #2330 (sparse relax path and handoff, merged), #2351 (aborts), #2354. See also #1703.
AI-assisted (Claude Code).