General changes for optimization and scalability - #109
Draft
TmsRC wants to merge 19 commits into
Draft
Conversation
…ption (default off)
…r controlling which one is used
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.
Summary
Implements a series of memory and compute optimizations to allow for larger grids and faster execution times. Depends on updated version of freegs4e (pull request #61).
NKGSsolverGreen's function and implements a new batched strategy for computing it; exposes an option to the user to avoid caching this structure in memory.Myy.dot()that uses even less memory.Performance
Using example 02, at 513x1025, tolerance 1e-08
Using example 05a, tolerance 1e-08, 40 steps, 64 threads, using DST solver, cached Green's function
Special considerations
A possible oversubscription issue was identified where multiprocessing is used for parallelism (currently only in
nonlinear_solve.py) due to unmanaged contention with the threads fromfreegs4e.parallel. The issue should only show itself whencache_greens=Falseis set duringNKGSsolverinitialization and that solver is used for linearized evolution (this combination should be discouraged regardless). An issue will be opened for this bug once this pull request is merged.Verification
Merge checks failing due to dependence on updated freegs4e. Verification stats below contingent on the corresponding freegs4e pull request.
test_dynamics.py) fails for second order solvers, meaning it doesn't pass with DST: marked as xfail. It is recommended that the test is checked.test_static_solve()intest_static_solver.pyfails when the second order multigrid solver is used. No attempt has been made at resolving the issue as support for multigrid solvers is planned to be abandoned: marked as xfail. Issue will be addressed at a later point.