Fix/varopti memory
Issue/feature addressed
The variational optimiser uses far too much system memory making it unusable for all but toy cases.
Proposed solution
Reduce the basic memory footprint of VarOpti when it constructs the mesh for optimisation. This is done by removing the set up storage reserved in NodeOpti
for GetFunctional
that was in place to avoid reallocation on each call. This storage was set up for every optimisation node regardless of if it is used in the optimisation or not and drastically increased the system memory usage.
Implementation
Remove the storage temporary storage used for GetFunctional
from the NodeOpti
constructor and instead look up this data during execution.
Tests
Not added yet. We should use the total memory used for the current varopti tests as the measure probably. I'm looking into how to add such a test to at least one of the linux runners as it might require some additional software.
Suggested reviewers
Dave, Kaloyan, Jacques, Ed?
Notes
This is a WIP and will be updated with more details in the coming days.
Checklist
-
Functions and classes, or changes to them, are documented. -
User guide/documentation is updated. -
Changelog is updated. -
Suitable tests added for new functionality. -
Contributed code is correctly formatted. (See the contributing guidelines). -
License added to any new files. -
No extraneous files have been added (e.g. compiler output or test data files).