|
[Sponsors] |
September 21, 2010, 10:52 |
Memory leak in OpenFOAM?
|
#1 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
It looks like OpenFOAM has a memory leak.
I ran scalarTransportFoam on the swirlTest tutorial, set the timestep to 0.1, end time to 1000, write interval 1. As it ran I watched the process monitor. Memory use climbed slowly and steadily from 400 mb to 500 mb before I finally stopped the simulation. Why would this be? This happened on an old revision of 1.5-dev, as well as 1.6. I don't have 1.7 installed yet. I started looking into this because my custom solver seems to have a bad case of the memory leaks. Any ideas? |
|
September 21, 2010, 13:37 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
I have confirmed this is a legitimate memory leak. It is case directory dependent - I can only duplicate it using the old swirlTest tutorial from OpenFOAM-1.5. (It doesn't happen for pitzDaily.)
I have isolated it to: runTime.write(); Enjoy! |
|
September 22, 2010, 05:25 |
|
#3 |
Senior Member
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23 |
Did you try running it through valgrind? If your OF is compiled for debugging it will even tell you the offending code lines:
valgrind --tool=memcheck --leak-check=yes scalarTransportFoam
__________________
Laurence R. McGlashan :: Website |
|
September 22, 2010, 10:11 |
|
#5 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Interesting. Since you mention that you've isolated the problem to runTime.write(), I'm curious to see whether the leak depends on the write mode (ascii/binary) and/or precision.
|
|
September 22, 2010, 10:35 |
|
#6 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
It might not be present in OF1.7.x - Henry ran my test case and valgrind reported nothing for him.
It's just the old swirlTest tutorial from 1.5... if no one else can duplicate it, it's my machine. I also found the source of the (big) leak in my custom solver - you can't use a single fvMeshSubset object to produce more than one submesh, or else you lose a mesh-sized chunk of memory. |
|
September 28, 2010, 10:15 |
|
#7 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
We've finally got a proper bug reporting system :-)
Please report any OpenFOAM bugs on http://www.openfoam.com/bugs. Thanks, Mattijs |
|
September 28, 2010, 12:37 |
|
#8 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
Yes I have been informed, and am now registered with Mantis. We should put a sticky announcement at the top of this forum.
|
|
October 14, 2010, 13:49 |
|
#9 |
Member
Alex
Join Date: Mar 2010
Posts: 33
Rep Power: 16 |
Hi,
Could you help me please? check this if you dont mind. http://www.cfd-online.com/Forums/ope...litiy-how.html Thanks in advance. Regards. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
autoPtr, derived classes and memory leak | johndeas | OpenFOAM | 1 | July 29, 2009 06:29 |
Modified OpenFOAM Forum Structure and New Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 06:56 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |