rugnux: the scaling engine's card memory goes back before molecular replacement

The rotation merge engine is released before model validation decides whether its GPU path fits,
but a predicted model (or --mr) skips that validation and went into molecular replacement with the
engine still on the card - about 10 GB on the AF 9v16 run, which then failed with 0.0 GB free on
some runs and on the others got fewer rigid-body engines. It is now released before the search
too, on the same condition (no finalist-ledger merge still running on it). Card peak of that run
15.75 -> 14.05 GB; MR keys identical.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EizBKhTqrAYago9KJG3dA3
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-10-13 16:07:33 +02:00
1 parent df14a1e631
commit 7c622f9e7f
1 file changed
+4
+4
View File
@@ -4124,6 +4124,10 @@ bool Rugnux::ScaleMergeAndSymmetry(PipelineLocals &p) {
phase("Molecular replacement");
Step("Molecular replacement");
TimingMark mark(logger, "model prior");
// As before the validation above, which a predicted model or --mr does not run: the engine's card
// memory goes back before the search sizes its rigid-body engines from what the card has free.
if (!ledger_ahead.valid())
rsm.reset();
std::vector<MRMerge> merges{{"MERGE", &sm.merged, *result.consensus_cell, experiment_.GetSpaceGroupOrP1()}};
if (twin_file)
merges.push_back({"TWIN_SUBGROUP_MERGE", &twin_file->merged, twin_file->cell, twin_file->space_group,