[us-commits] [ehb54/ultrascan3] cf4ff5: somo/grpy: pre-flight memory guard for oversized m...
emre brookes
noreply at github.com
Thu Aug 6 22:24:17 MDT 2026
Branch: refs/heads/ehb54-issue-984
Home: https://github.com/ehb54/ultrascan3
Commit: cf4ff58c731891c97b578dafc5b53166931a183e
https://github.com/ehb54/ultrascan3/commit/cf4ff58c731891c97b578dafc5b53166931a183e
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/develop/src/us_hydrodyn_grpy.cpp
Log Message:
-----------
somo/grpy: pre-flight memory guard for oversized models
The in-process GRPY solver holds the tiled upper triangle of the 11N x 11N
mobility matrix in RAM (peak ~ (11N)^2/2 * scalar bytes), so a model larger
than physical RAM cannot fit in-core -- e.g. 20k beads needs ~180 GB double /
~90 GB single. Because the solve runs synchronously on the GUI thread, such a
model previously sent the machine into heavy swapping with a frozen interface.
Add a pre-flight guard in calc_grpy_hydro() before the batch starts: estimate
peak memory for the largest selected model from its used-bead count and the
chosen precision, read physical RAM (macOS hw.memsize / Linux sysconf; unknown
-> no guard), and if the estimate exceeds ~70% of RAM:
- interactive: a Cancel / Run-anyway dialog naming the estimate, the machine
RAM, and the remedies (single precision, or a smaller model);
- script mode (gui_script): never block on a dialog -- report the error to the
editor and stderr and fail with a non-zero exit.
Verified: a headless run of a 20,000-bead model on a 32 GB machine reports
"~198.3 GB needed, 32.0 GB available" and exits non-zero pre-flight, instead of
thrashing.
Fixes ehb54/ultrascan-tickets#987
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: 9107bb46c07f34ea32ea5afe4a775af018020f3d
https://github.com/ehb54/ultrascan3/commit/9107bb46c07f34ea32ea5afe4a775af018020f3d
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/develop/src/us_hydrodyn_grpy.cpp
Log Message:
-----------
somo/grpy: memory guard - add Windows physical-RAM detection
Windows is a shipped SOMO target (GRPY_win64) but was falling through to the
"unknown -> no guard" path. Add GlobalMemoryStatusEx (ullTotalPhys) so the
pre-flight memory guard applies there too. Mac/Linux paths unchanged; the
Windows branch is #if'd out off-Windows and needs verifying on the win build.
Refs ehb54/ultrascan-tickets#987
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: a23a53982b33f7f85c4b33b422037f8355c0656a
https://github.com/ehb54/ultrascan3/commit/a23a53982b33f7f85c4b33b422037f8355c0656a
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/develop/src/us_hydrodyn_grpy.cpp
Log Message:
-----------
somo/grpy: memory guard - point oversized models to ZENO
Single precision only ~halves the footprint, so a genuinely huge structure
(e.g. 20k beads ~90 GB single) still will not fit on a modest machine. Add
ZENO to the guard's remedy message as the size-independent alternative, noting
its limitation (it does not compute rotational diffusion).
Refs ehb54/ultrascan-tickets#987
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: de70ea2fcf18a94984a1f865fb30dee38f26b8db
https://github.com/ehb54/ultrascan3/commit/de70ea2fcf18a94984a1f865fb30dee38f26b8db
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/develop/src/us_hydrodyn_grpy.cpp
Log Message:
-----------
somo/grpy: clear grpy_used_beads at run start (fix stale count)
grpy_used_beads was populated with push_back each run but, unlike its sibling
lists (grpy_to_process, grpy_model_numbers), was never cleared at the top of
calc_grpy_hydro -- it only drained via pop_front as models processed. So any
run that aborts before processing (now including the pre-flight memory guard,
but also the stop-flag and filename-length aborts) left a stale count behind,
and the next run's max()/processing saw it. Observed as: a vdW model triggers
the memory guard, then a subsequent smaller SoMo model in the same session is
wrongly reported with the vdW bead count. Clear grpy_used_beads at run start,
consistent with the other lists.
Refs ehb54/ultrascan-tickets#987
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: e34ae2102472da996832c77372c968ca5a6d4e72
https://github.com/ehb54/ultrascan3/commit/e34ae2102472da996832c77372c968ca5a6d4e72
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/somo/doc/manual/somo/somo_hydro.html
M us_somo/somo/doc/manual/somo/somo_misc.html
Log Message:
-----------
somo/doc: update manual for in-process GRPY, precision, memory guard
The GRPY overhaul (#972) and the memory guard (#987) left the SOMO manual
stale/incomplete:
- somo_misc.html documented the removed "Enable Parallel GRPY" checkbox and the
Docker-based parallel path. Rewritten: GRPY now runs in-process, multi-threaded
by default (no checkbox); notes the memory-lean/single-precision solver and the
pre-flight memory guard, and points oversized models to single precision, a
smaller model, or ZENO (size-independent, no rotational diffusion). Also softened
the "GRPY can crash" note to the guarded behavior.
- somo_hydro.html: document the new "GRPY Numerical Precision" (Double/Float)
control; drop the stale "parallel GRPY ... July 2024 release" clause from the
buried-beads paragraph.
Release date in somo_misc.html marked with an HTML comment to confirm at release.
Refs ehb54/ultrascan-tickets#987
Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
Commit: a11dc0be21767815c933c548a3f40de397ea5fe4
https://github.com/ehb54/ultrascan3/commit/a11dc0be21767815c933c548a3f40de397ea5fe4
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/somo/doc/manual/somo/somo_hydro.html
M us_somo/somo/doc/manual/somo/somo_misc.html
Log Message:
-----------
somo/doc: bump manual last-updated/last-modified dates
Update both date fields (top "Last updated" and bottom "Last modified on")
on somo_misc.html and somo_hydro.html to reflect the GRPY doc edits.
Refs ehb54/ultrascan-tickets#987
Commit: e4cc0467b55c3728bfcb217aa2623ea2ad65da6e
https://github.com/ehb54/ultrascan3/commit/e4cc0467b55c3728bfcb217aa2623ea2ad65da6e
Author: emre brookes <ehb54 at users.noreply.github.com>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/develop/src/us_hydrodyn_grpy.cpp
M us_somo/somo/doc/manual/somo/somo_hydro.html
M us_somo/somo/doc/manual/somo/somo_misc.html
Log Message:
-----------
Merge pull request #497 from ehb54/ehb54-issue-987
somo/grpy: pre-flight memory guard for oversized models
Commit: 35066a6c487776dbf7c210256ac1985ed5403000
https://github.com/ehb54/ultrascan3/commit/35066a6c487776dbf7c210256ac1985ed5403000
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/develop/src/us_hydrodyn_grpy.cpp
M us_somo/somo/doc/manual/somo/somo_hydro.html
M us_somo/somo/doc/manual/somo/somo_misc.html
Log Message:
-----------
Merge remote-tracking branch 'origin/somo-dev' into ehb54-issue-984
Commit: a782414c59388273e6decf00fb44cc9acfc3ee88
https://github.com/ehb54/ultrascan3/commit/a782414c59388273e6decf00fb44cc9acfc3ee88
Author: ehb54 <brookes at uthscsa.edu>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M us_somo/somo/doc/manual/somo/somo_hydro.html
Log Message:
-----------
somo/doc: drop duplicate precision paragraph, fix shell-reduction cross-ref
Merging somo-dev brought in its own "GRPY Numerical Precision" paragraph
(e34ae210, PR #497), written independently of the one added on this branch.
Git merged both cleanly since they landed in adjacent places, leaving the box
documented twice. Upstream's is the project's own wording and landed first,
so this drops ours and keeps it.
Also fixes a cross-reference this exposed. The shell-reduction paragraph was
written directly after the GRPY buried-bead paragraph and referred to "the
question raised in the paragraph above". Our precision paragraph was later
inserted between the two, silently breaking that reference; upstream's now
sits in the same position. Rather than depend on ordering again, the
reference now names the buried-bead option explicitly.
Box order in the page matches the window: buried beads, precision, shell
reduction. Page remains pure ASCII under its declared ISO-8859-1 charset.
Compare: https://github.com/ehb54/ultrascan3/compare/c9ac1177ffb8...a782414c5938
To unsubscribe from these emails, change your notification settings at https://github.com/ehb54/ultrascan3/settings/notifications
More information about the us-commits
mailing list