On 7/24/20 3:32 AM, Alberto Salvadori wrote:

It turns out that this code produces a memory loss, quite significant since I am solving my system thousands of times, eventually inducing the run to fail. I am not sure what is causing this issue and how to solve it, maybe more experienced users than myself can catch the problem with a snap of fingers.

I have verified the issue on my mac (Catalina) as well as on linux ubuntu (4.15.0), using deal.ii 9.1.1. Apparently the issue reveals only when mpi is invoked with more than one processor, whereas it does not emerge when running in serial or by mpirun -np 1.

Alberto -- I've taken a look at the SolverBicgstab class and don't see anything glaringly obvious that would suggest where the memory is lost. It's also funny that that would only happen with more than one processor because the memory handling of PETSc vectors shouldn't be any different for one or more processors.

Do you think you could come up with a simple test case that illustrates the problem? In your case, I'd start with the code you have and remove basically everything you do: replace the assembly by a function that just fills the matrix with the identity matrix (or something similarly simple), remove everything that does anything useful with the solution, remove graphical output, etc. The only thing that should remain is the loop that repeatedly solves a linear system and illustrates the memory leak, but the program no longer has to do anything useful (in fact, it probably shouldn't -- it should only exercise the one part you suspect of causing the memory leak).

I think that would make finding the root cause substantially simpler!

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/5a63f6c5-48b7-a40a-36c8-5e0ef5bed327%40colostate.edu.

Reply via email to