[Gmsh] Out of memory

Christophe Geuzaine cgeuzaine at ulg.ac.be
Sat Jun 20 18:10:42 CEST 2009


Mark van Doesburg wrote:
> Hello Christophe,
> 
> The pos file was generated with getdp version 2.0.0-cvs-20090525.

Ah, indeed: getdp still uses the old format... :-(

I'm not sure if we should merge your patch for ListUtils.h as is: I
don't understand why the access functions would work (since the index
should definitely also be a long int), the I/O will be inconsistent, etc.

Would you be willing to go over the full code in ListUtils.cpp and make
it 64 bit aware?



> Note that it's a large simulation with 3.8e6 DoF (complex) and at nine
> frequencies. The error occurs while reading the .pos file.
> 
> Here's the backtrace (note this is of version gmsh-2.3.1-cvs-20090512)
> 
> Breakpoint 6, Realloc (ptr=0x0, size=<value optimized out>)
>     at MallocUtils.cpp:42
> 42          Msg::Fatal("Out of memory (buy some more RAM!)");
> (gdb) bt
> #0  Realloc (ptr=0x0, size=<value optimized out>) at MallocUtils.cpp:42
> #1  0x00000000004b6f65 in List_Realloc (liste=0xf8eb00,
>     n=<value optimized out>) at ListUtils.cpp:64
> #2  0x00000000004b7102 in List_Add (liste=0x7f63340008b0, data=0x7fff4ef30f28)
>     at ListUtils.cpp:72
> #3  0x00000000006769e6 in gmsh_yyparse ()
> #4  0x00000000004b1495 in ParseFile (fileName=
>         {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7fff4ef34550 "8QÍ"}}, close=true, warnIfMissing=<value optimized out>)
>     at OpenFile.cpp:174
> #5  0x0000000000568670 in GModel::readGEO (this=0xccf550,
>     name=<value optimized out>) at GModelIO_Geo.cpp:39
> #6  0x00000000004b2c60 in MergeFile (fileName=
>         {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7fff4ef34860 "8QÍ"}}, warnIfMissing=<value optimized out>)
>     at OpenFile.cpp:351
> #7  0x00000000004b2db9 in OpenProject (fileName=
>         {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7fff4ef348d0 "8QÍ"}}) at OpenFile.cpp:427
> #8  0x000000000041b0db in main (argc=2, argv=0x7fff4ef34a48) at Main.cpp:76
> 
> Mark.
> 
> 
> Christophe Geuzaine <cgeuzaine at ulg.ac.be> wrote:
> 
> 	Mark van Doesburg wrote:
> 	> Hello,
> 	> 
> 	> Gmsh was complaining that I should buy more RAM... that seemed highly
> 	> unlikely and it turns out it was lying ;-)
> 
> 	Hi Mark - Can you tell us where such large old-style lists were 
> 	generated in the code? (Are you using the old post-pro format?)
> 
> 
> 
> 	> 
> 	> Here's a patch.
> 	> 
> 	> regards,
> 	> 
> 	> Mark van Doesburg
> 	> 
> 	> 
> 	> ------------------------------------------------------------------------
> 	> 
> 	> _______________________________________________
> 	> gmsh mailing list
> 	> gmsh at geuz.org
> 	> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 
> 	-- 
> 	Prof. Christophe Geuzaine
> 	University of Liege, Electrical Engineering and Computer Science
> 	http://www.montefiore.ulg.ac.be/~geuzaine
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine