CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

FluentMeshToFoamfluent3DMeshToFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 2, 2008, 04:19
Default Hi it seems that both import u
  #1
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
Hi it seems that both import utilities fluentMeshToFoam/fluent3DMeshToFoam have a memory leak.
The error appears in both release 1.4.1 and development 1.4.1-dev distribution.
Here is a small sample msh file that produces this error: fluentMeshToFoamError
Here is the valgrind log for fluentMeshToFoam:
Quote:
==18676== Memcheck, a memory error detector.
==18676== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==18676== Using LibVEX rev 1804, a library for dynamic binary translation.
==18676== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==18676== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==18676== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==18676== For more details, rerun with: -v
==18676==
==18676== My PID = 18676, parent PID = 8547. Prog and args are:
==18676== fluentMeshToFoam
==18676== ./
==18676== disc
==18676== geom/disc.msh
==18676==
==18676== Invalid free() / delete / delete[]
==18676== at 0x4A1F96E: free (vg_replace_malloc.c:323)
==18676== by 0x614DD1A: free_mem (in /lib64/libc-2.4.so)
==18676== by 0x614D991: __libc_freeres (in /lib64/libc-2.4.so)
==18676== by 0x491C31C: _vgnU_freeres (vg_preloaded.c:60)
==18676== by 0x608E2F4: exit (in /lib64/libc-2.4.so)
==18676== by 0x607915A: (below main) (in /lib64/libc-2.4.so)
==18676== Address 0x4048630 is not stack'd, malloc'd or (recently) free'd
==18676==
==18676== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 9 from 2)
==18676== malloc/free: in use at exit: 8 bytes in 1 blocks.
==18676== malloc/free: 595,120 allocs, 595,120 frees, 27,887,659 bytes allocated.
==18676== For counts of detected errors, rerun with: -v
==18676== searching for pointers to 1 not-freed blocks.
==18676== checked 630,312 bytes.
==18676==
==18676== LEAK SUMMARY:
==18676== definitely lost: 8 bytes in 1 blocks.
==18676== possibly lost: 0 bytes in 0 blocks.
==18676== still reachable: 0 bytes in 0 blocks.
==18676== suppressed: 0 bytes in 0 blocks.
==18676== Rerun with --leak-check=full to see details of leaked memory.
and similarly for fluent3DMeshToFoam:
Quote:
==18677== Memcheck, a memory error detector.
==18677== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==18677== Using LibVEX rev 1804, a library for dynamic binary translation.
==18677== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==18677== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==18677== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==18677== For more details, rerun with: -v
==18677==
==18677== My PID = 18677, parent PID = 8547. Prog and args are:
==18677== fluent3DMeshToFoam
==18677== ./
==18677== disc
==18677== geom/disc.msh
==18677==
==18677== Invalid free() / delete / delete[]
==18677== at 0x4A1F96E: free (vg_replace_malloc.c:323)
==18677== by 0x614DD1A: free_mem (in /lib64/libc-2.4.so)
==18677== by 0x614D991: __libc_freeres (in /lib64/libc-2.4.so)
==18677== by 0x491C31C: _vgnU_freeres (vg_preloaded.c:60)
==18677== by 0x608E2F4: exit (in /lib64/libc-2.4.so)
==18677== by 0x607915A: (below main) (in /lib64/libc-2.4.so)
==18677== Address 0x4048630 is not stack'd, malloc'd or (recently) free'd
==18677==
==18677== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 9 from 2)
==18677== malloc/free: in use at exit: 8 bytes in 1 blocks.
==18677== malloc/free: 173,856 allocs, 173,856 frees, 9,157,314 bytes allocated.
==18677== For counts of detected errors, rerun with: -v
==18677== searching for pointers to 1 not-freed blocks.
==18677== checked 630,312 bytes.
==18677==
==18677== LEAK SUMMARY:
==18677== definitely lost: 8 bytes in 1 blocks.
==18677== possibly lost: 0 bytes in 0 blocks.
==18677== still reachable: 0 bytes in 0 blocks.
==18677== suppressed: 0 bytes in 0 blocks.
==18677== Rerun with --leak-check=full to see details of leaked memory.
Dragos
dmoroian is offline   Reply With Quote

Old   April 2, 2008, 04:36
Default Just ran it on the tutorials i
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Just ran it on the tutorials icoFoam/elbow/elbow.msh file in 1.4.1 and no problem. Something special about your case? Can you attach it or send it to me?

valgrind fluentMeshToFoam $FOAM_RUN/icoFoam elbow $FOAM_TUTORIALS/icoFoam/elbow/elbow.msh

..
End
==4387==
==4387== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1)
==4387== malloc/free: in use at exit: 0 bytes in 0 blocks.
==4387== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==4387== For counts of detected errors, rerun with: -v
==4387== All heap blocks were freed -- no leaks are possible.
mattijs is offline   Reply With Quote

Old   April 2, 2008, 04:48
Default Hi Mattijs, As I put it above
  #3
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
Hi Mattijs,
As I put it above, the sample msh file can be downloaded from: fluentMeshToFoamError, and represents just 2 cylinders one on top of another. The first is discretized using hexahedra, whereas the second is discretized using tetrahedra:

Thank you for looking at it,
Dragos
dmoroian is offline   Reply With Quote

Old   April 2, 2008, 07:00
Default Hmm, I've just tried it on th
  #4
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
Hmm,
I've just tried it on the elbow mesh, and I get the same error:
Quote:
==22414== Memcheck, a memory error detector.
==22414== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==22414== Using LibVEX rev 1804, a library for dynamic binary translation.
==22414== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==22414== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==22414== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==22414== For more details, rerun with: -v
==22414==
==22414== My PID = 22414, parent PID = 21418. Prog and args are:
==22414== fluentMeshToFoam
==22414== ./
==22414== elbow
==22414== elbow/elbow.msh
==22414==
==22414== Invalid free() / delete / delete[]
==22414== at 0x4A1F96E: free (vg_replace_malloc.c:323)
==22414== by 0x614DD1A: free_mem (in /lib64/libc-2.4.so)
==22414== by 0x614D991: __libc_freeres (in /lib64/libc-2.4.so)
==22414== by 0x491C31C: _vgnU_freeres (vg_preloaded.c:60)
==22414== by 0x608E2F4: exit (in /lib64/libc-2.4.so)
==22414== by 0x607915A: (below main) (in /lib64/libc-2.4.so)
==22414== Address 0x4048630 is not stack'd, malloc'd or (recently) free'd
==22414==
==22414== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 9 from 2)
==22414== malloc/free: in use at exit: 8 bytes in 1 blocks.
==22414== malloc/free: 111,616 allocs, 111,616 frees, 6,025,695 bytes allocated.
==22414== For counts of detected errors, rerun with: -v
==22414== searching for pointers to 1 not-freed blocks.
==22414== checked 630,344 bytes.
==22414==
==22414== LEAK SUMMARY:
==22414== definitely lost: 8 bytes in 1 blocks.
==22414== possibly lost: 0 bytes in 0 blocks.
==22414== still reachable: 0 bytes in 0 blocks.
==22414== suppressed: 0 bytes in 0 blocks.
==22414== Rerun with --leak-check=full to see details of leaked memory.
I'm using the latest available version of valgrind at this date (3.3.0 Current Release)
What version of valgrind are you using?

Dragos
dmoroian is offline   Reply With Quote

Old   April 2, 2008, 10:32
Default valgrind 3.2.3 and 3.3.0 both
  #5
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
valgrind 3.2.3 and 3.3.0 both give 0 errors. Maybe there is a difference in the (f)lex versions and the bug is in the flex part. Feel free to debug it ;-)
mattijs is offline   Reply With Quote

Old   April 2, 2008, 10:39
Default Ok, thanks for the support, I'
  #6
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
Ok, thanks for the support, I'll try.
Though the flex part should not play a role here since the realease version 1.4.1 is not compiled by me (I've donwloaded the binaries together with the sources).

Dragos
dmoroian is offline   Reply With Quote

Old   April 3, 2008, 09:13
Default Hello again, I did some more
  #7
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
Hello again,
I did some more tests on different machines, both at the office and at home (all 64bit). On all of them, I get the same result from valgrind:
Quote:
==22414== LEAK SUMMARY:
==22414== definitely lost: 8 bytes in 1 blocks.
I've asked a friend to do a similar test. He has 1.4 release version, and when he tried it he got also a memory leak error:
Quote:
==23077== LEAK SUMMARY:
==23077== definitely lost: 241,295 bytes in 8,326 blocks.
To summarize:
- OpenFoam-1.4.1 on Suse 10.1 64 bit
- OpenFoam-1.4.1-dev on Suse 10.1 64 bit
- OpenFoam-1.4.1 on OpenSuse 10.3 64 bit
- OpenFoam-1.4.1-dev on OpenSuse 10.3 64 bit
- OpenFoam-1.4 on CentOS 4.6 (32 bit OS on 64 bit proc)
They all show a memory leak in valgrind:
valgrind fluentMeshToFoam ./ elbow elbow/elbow.msh
Anyone out there can please confirm this? Just run the above command.

Thanks,
Dragos
dmoroian is offline   Reply With Quote

Old   April 3, 2008, 09:57
Default A new test on Linux evs-008 2.
  #8
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
A new test on Linux evs-008 2.6.18-5-686 #1 SMP Wed Oct 3 00:12:50 UTC 2007 i686 GNU/Linux
Debian GNU/Linux 4.0
with the same command:
valgrind fluentMeshToFoam ./ elbow elbow/elbow.msh
gives the following:
Quote:
==3604== LEAK SUMMARY:
==3604== definitely lost: 160 bytes in 12 blocks.
Anyone else?
dmoroian is offline   Reply With Quote

Old   May 15, 2008, 18:47
Default I to get this problem on Fedor
  #9
New Member
 
adam mitchell
Join Date: Mar 2009
Posts: 1
Rep Power: 0
adam_mitchell is on a distinguished road
I to get this problem on Fedora Core release 6 (Zod)

valgrind fluentMeshToFoam ./ elbow elbow/elbow.msh

==22808== Invalid free() / delete / delete[]
==22808== at 0x4A0548E: free (vg_replace_malloc.c:233)
==22808== by 0x3594702DAA: free_mem (in /lib64/libc-2.5.so)
==22808== by 0x35947029C1: __libc_freeres (in /lib64/libc-2.5.so)
==22808== by 0x4802314: _vgnU_freeres (vg_preloaded.c:60)
==22808== by 0x3594632EA4: exit (in /lib64/libc-2.5.so)
==22808== by 0x359461DA4A: (below main) (in /lib64/libc-2.5.so)
==22808== Address 0x773EAC0 is not stack'd, malloc'd or (recently) free'd
==22808==
==22808== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 1)
==22808== malloc/free: in use at exit: 8 bytes in 1 blocks.
==22808== malloc/free: 111,669 allocs, 111,669 frees, 5,932,062 bytes allocated.
==22808== For counts of detected errors, rerun with: -v
==22808== searching for pointers to 1 not-freed blocks.
==22808== checked 599,960 bytes.
==22808==
==22808== LEAK SUMMARY:
==22808== definitely lost: 8 bytes in 1 blocks.
==22808== possibly lost: 0 bytes in 0 blocks.
==22808== still reachable: 0 bytes in 0 blocks.
==22808== suppressed: 0 bytes in 0 blocks.
==22808== Use --leak-check=full to see details of leaked memory.
adam_mitchell is offline   Reply With Quote

Old   May 16, 2008, 03:17
Default Both 1.4.1 and 1.5beta give me
  #10
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Both 1.4.1 and 1.5beta give me:

==27496== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 1)

with --leak-check=full it reports that the two leaks are in
- yyFlexLexer::yyensure_buffer_stack() and
- getpwuid_r@@GLIBC_2.2.5
neither I think are anything to do with us.

Running 4.2.1 & 4.2.2 gcc, OpenSuse 10.2, 64bit mode, double precision.
mattijs is offline   Reply With Quote

Old   May 19, 2008, 02:56
Default It seems that you're right Mat
  #11
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 647
Rep Power: 11
dmoroian is on a distinguished road
It seems that you're right Mattijs, I found on the internet several posts related to this error (but on different topics: Memory leak in flex generated file). There are also some work around's, so as soon as I have time I will try one of them.
...but first I have to learn flex and its capability.

Dragos
dmoroian is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:27.