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
Each solver's PETSc options stay in the global options database after the solver is gone: about 41 entries per rebuild #950
Every solver writes its PETSc options under a prefix unique to it (-Solver_N_*, and -meshproj_N_* for projections), and nothing removes them when the solver is dropped. The global options database therefore grows by every dropped solver's options.
Measured on the rebuild fixture of the rotated free-slip + custom-FMG rebuild test (bugfix/rebuild-leak-948), serial: 185 entries after 4 rebuilds and 349 after 8, about 41 per rebuild.
This is kilobytes, not the megabytes of #948, whose cause was outside the library. But it grows without bound over a long run that rebuilds or creates solvers repeatedly. Every later options lookup also searches a longer list.
The rotated free-slip route already drops its own keys in a finally (rotated_bc._drop_options_under, #901). The solver classes could do the same for their prefix when a solver is destroyed or collected.
Found by the adversarial review of the rebuild-memory test (#948).
Underworld development team with AI support from Claude Code
Activity
#950 review: the finalizer drops only options its solver still owns, …
Merge pull request #980 from underworldcode/bugfix/solver-options-cle…
underworldcode#950: dropped solvers and meshes leave nothing in PETSc…