Memory leak
suspecting a memory leak in openfoam-dev when compiled on a cluster using gcc 4.9.3 and openmpi 1.8.6
==39345== LEAK SUMMARY:
==39345== definitely lost: 0 bytes in 0 blocks
==39345== indirectly lost: 0 bytes in 0 blocks
==39345== possibly lost: 538 bytes in 12 blocks
==39345== still reachable: 2,056 bytes in 3 blocks
==39345== suppressed: 0 bytes in 0 blocks
==39345== Reachable blocks (those to which a pointer was found) are not shown.
==39345== To see them, rerun with: --leak-check=full --show-reachable=yes
==39345==
==39345== For counts of detected and suppressed errors, rerun with: -v
==39345== ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 8 from 6)
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Developer
- Maintainer
Still reachable
is notmemory leak.
- Maintainer
This is valgrind? Can you run with '--leak-check=full --show-reachable=yes'?
It is generally (open-)mpi that does not clean up data. Are there any 'still reachable' that do not originate from mpi?
- Mark OLESEN changed title from Memeory leak to Memory leak
changed title from Memeory leak to Memory leak
- Mark OLESEN changed the description
changed the description
- Author
I ran with '--leak-check=full --show-reachable=yes'
This is the result
==21441== HEAP SUMMARY: ==21441== in use at exit: 2,715 bytes in 16 blocks ==21441== total heap usage: 38,237 allocs, 38,221 frees, 3,776,981 bytes allocated ==21441== ==21441== 8 bytes in 1 blocks are still reachable in loss record 1 of 16 ==21441== at 0x4C29192: operator new[](unsigned long) (vg_replace_malloc.c:363) ==21441== by 0x7CB02DD: Foam::HashTable<Foam::string, Foam::word, Foam::string::hash>::HashTable(int) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CAF278: Foam::argList::argList(int&, char**&, bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x421392: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 16 bytes in 1 blocks are possibly lost in loss record 2 of 16 ==21441== at 0x4C29192: operator new[](unsigned long) (vg_replace_malloc.c:363) ==21441== by 0x7CAF185: Foam::argList::argList(int&, char**&, bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x421392: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 26 bytes in 1 blocks are possibly lost in loss record 3 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x7DE36D3: Foam::Time::timeName(double, int) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DE2AB4: Foam::TimeState::TimeState() (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DEB392: Foam::Time::Time(Foam::word const&, Foam::argList const&, Foam::word const&, Foam::word const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x42155A: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 31 bytes in 1 blocks are possibly lost in loss record 4 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x8818014: char* std::string::_S_construct<char const>(char const, char const*, std::allocator const&, std::forward_iterator_tag) (basic_string.tcc:138) ==21441== by 0x8818445: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (basic_string.h:1743) ==21441== by 0x4244DB: Foam::word::word(char const*, bool) [clone .constprop.594] (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== by 0x42153A: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 32 bytes in 1 blocks are possibly lost in loss record 5 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x8818014: char* std::string::_S_construct<char const>(char const, char const*, std::allocator const&, std::forward_iterator_tag) (basic_string.tcc:138) ==21441== by 0x8818445: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (basic_string.h:1743) ==21441== by 0x7CAF39C: Foam::argList::argList(int&, char**&, bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x421392: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 32 bytes in 1 blocks are possibly lost in loss record 6 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x8818014: char* std::string::_S_construct<char const>(char const, char const*, std::allocator const&, std::forward_iterator_tag) (basic_string.tcc:138) ==21441== by 0x8818445: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (basic_string.h:1743) ==21441== by 0x7CAF3E4: Foam::argList::argList(int&, char**&, bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x421392: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 32 bytes in 1 blocks are possibly lost in loss record 7 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x43D3D4: char* std::string::_S_construct<char>(char, char*, std::allocator const&, std::forward_iterator_tag) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== by 0x8817EF0: std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&, unsigned long, unsigned long) (basic_string.h:1743) ==21441== by 0x7D53C39: Foam::fileName::name() const (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CA91F9: Foam::argList::getRootCase() (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CAD4B0: Foam::argList::parse(bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CAF733: Foam::argList::argList(int&, char**&, bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x421392: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 33 bytes in 1 blocks are possibly lost in loss record 8 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x8818014: char* std::string::_S_construct<char const>(char const, char const*, std::allocator const&, std::forward_iterator_tag) (basic_string.tcc:138) ==21441== by 0x8818445: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (basic_string.h:1743) ==21441== by 0x7C630FB: Foam::word::word(char const*, bool) [clone .constprop.58] (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7C633D8: _GLOBAL__sub_I_IOobject.C (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x400E9CE: _dl_init (in /lib64/ld-2.12.so) ==21441== by 0x4000B69: ??? (in /lib64/ld-2.12.so) ==21441== ==21441== 33 bytes in 1 blocks are possibly lost in loss record 9 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x8818014: char* std::string::_S_construct<char const>(char const, char const*, std::allocator const&, std::forward_iterator_tag) (basic_string.tcc:138) ==21441== by 0x8818445: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (basic_string.h:1743) ==21441== by 0x4244DB: Foam::word::word(char const*, bool) [clone .constprop.594] (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== by 0x421524: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 36 bytes in 1 blocks are possibly lost in loss record 10 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x8818014: char* std::string::_S_construct<char const>(char const, char const*, std::allocator const&, std::forward_iterator_tag) (basic_string.tcc:138) ==21441== by 0x8818445: std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (basic_string.h:1743) ==21441== by 0x7DE309B: Foam::word::word(char const*, bool) [clone .constprop.85] (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7C64836: _GLOBAL__sub_I_Time.C (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x400E9CE: _dl_init (in /lib64/ld-2.12.so) ==21441== by 0x4000B69: ??? (in /lib64/ld-2.12.so) ==21441== ==21441== 57 bytes in 1 blocks are possibly lost in loss record 11 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x43D3D4: char* std::string::_S_construct<char>(char, char*, std::allocator const&, std::forward_iterator_tag) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== by 0x8817EF0: std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&, unsigned long, unsigned long) (basic_string.h:1743) ==21441== by 0x7D54DE9: Foam::fileName::path() const (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CA91BC: Foam::argList::getRootCase() (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CAD4B0: Foam::argList::parse(bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CAF733: Foam::argList::argList(int&, char**&, bool, bool, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x421392: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 89 bytes in 1 blocks are possibly lost in loss record 12 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x881730A: std::string::_Rep::_M_clone(std::allocator const&, unsigned long) (basic_string.tcc:629) ==21441== by 0x88173AF: std::string::reserve(unsigned long) (basic_string.tcc:510) ==21441== by 0x8817824: std::string::append(unsigned long, char) [clone .part.20] (basic_string.tcc:288) ==21441== by 0x88178C0: std::string::append(unsigned long, char) (basic_string.tcc:283) ==21441== by 0x7D5648E: Foam::operator/(Foam::string const&, Foam::string const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DBD901: Foam::objectRegistry::objectRegistry(Foam::Time const&, int) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DEB37C: Foam::Time::Time(Foam::word const&, Foam::argList const&, Foam::word const&, Foam::word const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x42155A: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 121 bytes in 1 blocks are possibly lost in loss record 13 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x881730A: std::string::_Rep::_M_clone(std::allocator const&, unsigned long) (basic_string.tcc:629) ==21441== by 0x88173AF: std::string::reserve(unsigned long) (basic_string.tcc:510) ==21441== by 0x8817487: std::string::append(std::string const&) (basic_string.tcc:332) ==21441== by 0x7D56499: Foam::operator/(Foam::string const&, Foam::string const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DA4FC0: Foam::baseIOdictionary::baseIOdictionary(Foam::IOobject const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DA642D: Foam::unwatchedIOdictionary::unwatchedIOdictionary(Foam::IOobject const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DEB428: Foam::Time::Time(Foam::word const&, Foam::argList const&, Foam::word const&, Foam::word const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x42155A: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 121 bytes in 1 blocks are possibly lost in loss record 14 of 16 ==21441== at 0x4C295FC: operator new(unsigned long) (vg_replace_malloc.c:298) ==21441== by 0x8816698: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (new_allocator.h:104) ==21441== by 0x881730A: std::string::_Rep::_M_clone(std::allocator const&, unsigned long) (basic_string.tcc:629) ==21441== by 0x88173AF: std::string::reserve(unsigned long) (basic_string.tcc:510) ==21441== by 0x8817487: std::string::append(std::string const&) (basic_string.tcc:332) ==21441== by 0x7D56499: Foam::operator/(Foam::string const&, Foam::string const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CC28C0: Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, Foam::fileName const&, Foam::word const&, bool) const (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DB7506: Foam::regIOobject::readStream(bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DB7A7E: Foam::regIOobject::readStream(Foam::word const&, bool) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7CC56E2: Foam::fileOperations::uncollatedFileOperation::read(Foam::regIOobject&, bool, Foam::IOstream::streamFormat, Foam::word const&) const (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DB731F: Foam::regIOobject::readHeaderOk(Foam::IOstream::streamFormat, Foam::word const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DA646B: Foam::unwatchedIOdictionary::unwatchedIOdictionary(Foam::IOobject const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== ==21441== 1,024 bytes in 1 blocks are still reachable in loss record 15 of 16 ==21441== at 0x4C29192: operator new[](unsigned long) (vg_replace_malloc.c:363) ==21441== by 0x7DBDAB0: Foam::objectRegistry::objectRegistry(Foam::Time const&, int) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DEB37C: Foam::Time::Time(Foam::word const&, Foam::argList const&, Foam::word const&, Foam::word const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x42155A: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== 1,024 bytes in 1 blocks are still reachable in loss record 16 of 16 ==21441== at 0x4C29192: operator new[](unsigned long) (vg_replace_malloc.c:363) ==21441== by 0x7D830A6: Foam::dictionary::dictionary() (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DA4F81: Foam::baseIOdictionary::baseIOdictionary(Foam::IOobject const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DA642D: Foam::unwatchedIOdictionary::unwatchedIOdictionary(Foam::IOobject const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x7DEB428: Foam::Time::Time(Foam::word const&, Foam::argList const&, Foam::word const&, Foam::word const&) (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so) ==21441== by 0x42155A: main (in /a/fs-3/export/home/deepthought2/mmahmed/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/icoFoam) ==21441== ==21441== LEAK SUMMARY: ==21441== definitely lost: 0 bytes in 0 blocks ==21441== indirectly lost: 0 bytes in 0 blocks ==21441== possibly lost: 659 bytes in 13 blocks ==21441== still reachable: 2,056 bytes in 3 blocks ==21441== suppressed: 0 bytes in 0 blocks ==21441== ==21441== For counts of detected and suppressed errors, rerun with: -v ==21441== ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 8 from 6)
- Maintainer
What version are you running? Do you have a testcase that can replicate your problem? I just ran icoFoam in the develop branch and get
==14810== ==14810== HEAP SUMMARY: ==14810== in use at exit: 0 bytes in 0 blocks ==14810== total heap usage: 41,808 allocs, 41,808 frees, 4,972,873 bytes allocated ==14810== ==14810== All heap blocks were freed -- no leaks are possible ==14810== ==14810== For counts of detected and suppressed errors, rerun with: -v ==14810== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
- Author
I just tried it with and without a test case, it shows same errors. The version is: openfoam-dev, Build: dev-940e28f63681 a test case for FireFOAM Build Version: 0a3476f19d2c050f09290eea57dedf2dabe16244 is attached (you need to run blockMesh)Test.tar.xz
- Author
By the way on my local machine (gcc 7.3.0), the code does not show memory leak. However, it does on a cluster (gcc 4.9.3, openmpi 1.8.6)
- Maintainer
For older gcc versions gcc < 5.0, there were reported incompatibilities for false valgrind reports for codes compiled by gcc. Since 2016, valgrind & libstdc++ maintainers allegedly decided to collaborate more.
There are even flags to avoid those gcc bugs:
---workaround-gcc296-bugs=
which is advised to be used for gcc 4.x compiled code: memcheck-manual.Therefore, I would always trust the latest valgrind & gcc versions output if results from both versions contradict.
Edited by Kutalmış Berçin - Author
I consulted the IT of the cluster and they suggest that there is a memory leak which coinsides with the result of valgrind. If this is true, how would a memory leak exist on the same solver that shows no memory leak when tested on my local PC? Is it some incompatibility between the solver and the compiler?
- Maintainer
- yes there might be a library issue
- we cannot run your Test.tar.xz - the blockMeshDict seems to be a reactions file.
- if you post some output you can put it inside ``` - this will trigger the verbatim mode. Or even better attach it.
- Author
Please consider this case instead TestRun.tar.xz
You need to run createMesh.sh to generate the mesh
Edited by Mohamed Ahmed - Author
You need to run createMesh.sh to generate the mesh
- Maintainer
I cannot find a blockMeshDict.
- Author