Too many heap sections

380 views
Skip to first unread message

Federico Galetto

unread,
May 27, 2013, 11:36:32 AM5/27/13
to maca...@googlegroups.com
Hello!

I have a computation that ran for a couple of days and then crashed M2 with the following message:

Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Aborted (core dumped)

I have no idea what this means. Can anyone shed some light please? Is there any way to avoid this if I decide to run the computation again?

Thanks!
Federico

Daniel R. Grayson

unread,
May 27, 2013, 12:08:47 PM5/27/13
to maca...@googlegroups.com
Our page documenting the garbage collector "libgc" that we use says a
bit: http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.6/share/doc/Macaulay2/Macaulay2Doc/html/___G__C_spgarbage_spcollector.html
.

The parameters that the message suggests you increase are compile-time
parameters, in the file private/gc_priv.h of the library, see, e.g.,
http://git.icir.org/binpacpp.git/blob/b742b1a090a410da91c9b335bf3715037305e99f:/hilti/libhilti/3rdparty/bdwgc/include/private/gc_priv.h
. So increasing those parameters would involve compiling M2 from
sources and probably just adding a -D macro definition to CPPFLAGS at
configure time.

But the first step is to make sure you're running a 64 bit version of
M2 on a 64 bit OS, as that affects the maximum number of heap
sections.

I think that libgc gets memory from the OS, and any block of
contiguous memory is called a section. The sections obtained so far
are stored in an array, and the length of that array is
MAX_HEAP_SECTS. When it gets memory, it gets MAXHINCR blocks at a
time, so the larger that is, the larger the contiguous sections are
likely to be (?).
> --
> You received this message because you are subscribed to the Google Groups
> "Macaulay2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to macaulay2+...@googlegroups.com.
> To post to this group, send email to maca...@googlegroups.com.
> Visit this group at http://groups.google.com/group/macaulay2?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Federico Galetto

unread,
May 28, 2013, 2:05:15 PM5/28/13
to maca...@googlegroups.com
Thank you!
Federico
Reply all
Reply to author
Forward
0 new messages