Repository navigation
Remove allocator traffic from the hot vertex loop by computing phi via Phi_of_field - #651
Open
sashagavrishev wants to merge 2 commits into
Open
sashagavrishev wants to merge 2 commits into
sashagavrishev wants to merge 2 commits into
Conversation
sashagavrishev
added a commit
to sashagavrishev/ALF
that referenced
this pull request
Sep 29, 2026
sashagavrishev
added a commit
to sashagavrishev/ALF
that referenced
this pull request
Sep 29, 2026
Takes the delayed-update files from the pull-request branch as they now stand: delay_resolve resolves the depth once, auto can keep the immediate update and logs it beside the probed depths, a fixed depth is capped at Ndim, and the panels are sized by Op%N_non_zero. Tests 40-43 and a Z2_Matter set for the delayed-vs-immediate check come with them. Operator_mod keeps ALF-QMC#651's Phi_of_field reads and gains the same in Op_Wrap_panels; its docstring now matches the PR. CHANGELOG keeps the fork-local NBin/CPU_MAX entry.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This short change which addresses an inefficiency highlighted by @johanneshofmann87 in #646; this PR is also designed to merge cleanly with #646.
In
Operator_mod.F90The routinesOp_WrapupandOp_Wrapdosit in the hot loop of the sequential field updates;Op_mmultL,Op_mmultRrun for every operator on every time slice when building the propagation matrices. Each call builds a one-entry Fields object just to read φ for a single HS field value, which appears asALF/Prog/Operator_mod.F90
Lines 569 to 571 in f81b5cb
Op_*routines. Therefore we get three heap allocations and their deallocations per callALF/Prog/Fields_mod.F90
Line 242 in f81b5cb
%phiis looked up repeatedly on every loop iteration, e.g.ALF/Prog/Operator_mod.F90
Line 586 in f81b5cb
Instead, this PR adds
Phi_of_fieldtoFields_mod.F90and makesFields_Phicall it. The four routines now compute φ once per call into a localphi_loc, so the loop no longer touches the allocator.There is no actual change to the calculation, so the results should be identical.