Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS macaulay #500

Closed
kutschan opened this issue Jul 20, 2016 · 5 comments
Closed

Comments

@kutschan
Copy link

I'm having the "Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS macaulay"-problem, when calculating a Gröbner basis with Macaulay2.

The program fills up all 8GB of RAM and then only a little fraction of my swap space before prompting this error and exiting. I tried setting "export MAX_HEAP_SECTS=1000000000000" just before running ./M2 which didn't help.

I have the 64 bit version from github compiled on a 64 bit Ubuntu.

How exactly can I increase MAX_HEAP_SECTS?

@mikestillman
Copy link
Member

The problem is that if you are using the Boehm garbage collector that comes with your packaging system (the default for many systems), it often is compiled for small memory use.

Here is one relevant environment variable for controlling the garbage collector:

GC_INITIAL_HEAP_SIZE=<bytes> -  Initial heap size in bytes.  May speed up
                                process start-up.  Optionally, may be
                                specified with a multiplier ('k', 'M' or 'G')
                                suffix.

For example, try running (in bash, or in emacs, by using meta-f12 to reset the M2 command line):

GC_INITIAL_HEAP_SIZE=8G M2

or, as you suggest:

export GC_INITIAL_HEAP_SIZE=8G
M2

I had a similar problem where I hit the same issue (even compiled with large memory use), which I think gives the error message you obtained at about 130 GB, so I set this environment variable to 300G, and M2 then ran to completion (the machine had 512 GB of RAM, and ended up using most of it)

— mike

@DanGrayson
Copy link
Member

You may also see some settings this way:


i30 : GCstats()

o30 = HashTable{don't expand => false           }
                finalize on demand => false
                full freq => 19
                GC_ALL_INTERIOR_POINTERS => 
                GC_all_interior_pointers => 1
                GC_BACKTRACES => 
                GC_DISABLE_INCREMENTAL => 
                GC_DONT_GC => 
                GC_DUMP_REGULARLY => 
                GC_ENABLE_INCREMENTAL => 
                GC_FIND_LEAK => 
                GC_FORCE_UNMAP_ON_GCOLLECT => 
                GC_FREE_SPACE_DIVISOR => 
                GC_free_space_divisor => 12
                GC_FULL_FREQUENCY => 
                GC_IGNORE_GCJ_INFO => 
                GC_INITIAL_HEAP_SIZE => 
                GC_LARGE_ALLOC_WARN_INTERVAL => 
                GC_LOG_FILE => 
                GC_LOOP_ON_ABORT => 
                GC_MARKERS => 
                GC_MAXIMUM_HEAP_SIZE => 
                GC_NO_BLACKLIST_WARNING => 
                GC_NPROCS => 
                GC_PAUSE_TIME_TARGET => 
                GC_PRINT_ADDRESS_MAP => 
                GC_PRINT_BACK_HEIGHT => 
                GC_PRINT_STATS => 
                GC_PRINT_VERBOSE_STATS => 
                GC_RETRY_SIGNALS, => 
                GC_TRACE => 
                GC_UNMAP_THRESHOLD => 
                GC_USE_GETWRITEWATCH => 
                heap size => 449941504
                java finalization => true
                max retries => 0
                number of collections => 31
                parallel => true
                time limit => 999999

o30 : HashTable

@kutschan
Copy link
Author

This solution works.

With
export GC_INITIAL_HEAP_SIZE=50G
M2

it now writes to my swap space which is about 50G after having filled up all RAM.

Thank you!

@imanbj
Copy link
Contributor

imanbj commented Jan 17, 2018

Dear All,

the code "export GC_INITIAL_HEAP_SIZE=50G" works for me too. But it just works in terminal, not in Aquamacs. Any suggestion?

Best wishes,
Iman.

@mikestillman
Copy link
Member

mikestillman commented Jan 17, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants