[petsc-users] Memory leak in snesnpc ?
Adolfo Rodriguez
adantra at gmail.com
Tue Aug 18 12:14:08 CDT 2020
I am suspecting that there is a memory leak in the implementation of
non-linear preconditioners in PETSc.
When I use the following options I see the memory usage increase (using the
windows process monitor) during consecutive time steps.
PetscOptionsSetValue(NULL, "-snes_type", "qn");
PetscOptionsSetValue(NULL, "-snes_qn_monitor", "");
PetscOptionsSetValue(NULL, "-snes_qn_scale_type ", "jacobian");
PetscOptionsSetValue(NULL, "-npc_snes_max_it", max_it);
PetscOptionsSetValue(NULL, "-npc_snes_type", "newtonls");
PetscOptionsSetValue(NULL, "-npc_pc_factor_levels", ilu_level);
PetscOptionsSetValue(NULL, "-npc_ksp_rtol", s_ksp_rtol);
PetscOptionsSetValue(NULL, "-npc_snes_linesearch_type", "bt");
PetscOptionsSetValue(NULL, "-npc_snes_linesearch_max_it", "5");
SNESSetFromOptions(snes);
I destroy the context after each time step
However, if I don't use a non-linear preconditioner, ie.,
PetscOptionsSetValue(NULL, "-snes_converged_reason", "");
PetscOptionsSetValue(NULL, "-snes_type", "qn");
PetscOptionsSetValue(NULL, "-snes_qn_monitor", "");
PetscOptionsSetValue(NULL, "-snes_qn_scale_type ", "jacobian");
SNESSetFromOptions(snes);
Then everything works fine.
Am I missing something?
Thanks!
Adolfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200818/1a79e51b/attachment.html>
More information about the petsc-users
mailing list