Flexibilization of storage of intermediate results in EigenLinearSolver solves memory
Up to now the results of EigenLinearSolver::compute()
are always kept and can be reused under some conditions. In the suggested changes the caching is done only when the user enforces this via the tag <linear_solver_compute_only_upon_timestep_change>true</linear_solver_compute_only_upon_timestep_change>
in the project file and the time step increment didn't change.
-
Feature description was added to the changelog -
Tests covering your feature were added? - no new tests -
Any new feature or behaviour change was documented? - no new features implemented
here and here)
memory measurements (used examples are describedprocess | measurement | current master | configurable linear solver cache |
---|---|---|---|
LiquidFlow | peak memory consumption [GB] | 4.5 | 4.2 |
Simulation::initializeDataStructures [GB] | 3.1 | 3.1 | |
Simulation::executeSimulation [GB] | 1.4 | 1.1 | |
HT | peak memory consumption [GB] | 11.1 | 9.8 |
Simulation::initializeDataStructures [GB] | 5.5 | 5.5 | |
Simulation::executeSimulation [GB] | 5.6 | 4.3 | |
ComponentTransport | peak memory consumption [GB] | 11.4 | 10.1 |
Simulation::initializeDataStructures [GB] | 5.8 | 5.8 | |
Simulation::executeSimulation [GB] | 5.6 | 4.3 |
For those examples the caching mechanism in linear solver wasn't activated and memory could saved.
Run time comparison for benchmarks using the caching
benchmark | run time [s] - master | run time [s] - branch with configurable linear solver cache |
---|---|---|
ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/linear_compute_only_on_dt_change/1d_decay_chain_GIA | 2.04 | 2.08 |
ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/SparseLU_linear_compute_only_on_dt_change/1d_decay_chain_GIA | 1.98 | 1.96 |
ComponentTransport/ReactiveTransport/DecayChain/GlobalImplicitApproach/varying_dt_linear_compute_only_on_dt_change/1d_decay_chain_GIA | 2.24 | 2.55 |
1D_HeatConduction_dirichlet_linear_dt_change | 0.06 | 0.07 |
1D_HeatConduction_dirichlet_varying_dt_linear_compute_only_on_dt_change | 0.07 | 0.07 |