gap: cannot extend the workspace any more! with tons of free memory.

132 views
Skip to first unread message

sbran...@web.de

unread,
May 29, 2018, 5:04:22 PM5/29/18
to sage-support
Dear all,
 
I am running some calculations with libgap. At some point I get
{{{
gap: cannot extend the workspace any more!
}}}
and sage quits disgracefully.

Yet my memory manager claims that I still have 10 GB of free RAM.

Is there a way to tell libGAP  to extend the workspace? / raise the memory limit?

Volker Braun

unread,
May 30, 2018, 12:53:14 PM5/30/18
to sage-support
You probably need swap to back the anonymous mmap that is the gap workspace. If you don't have swap you wont' be able to use all available ram.

sbran...@web.de

unread,
May 30, 2018, 4:06:46 PM5/30/18
to sage-support
Dear Volker,
thank you for your answer. Could you please explain what you mean?

If it helps, I seem to have "swap"?:
This is how my memory looks like before gap crashes:

Every 5.0s: free -m                                     Wed May 30 22:03:55 2018

                      total        used        free     shared  buff/cache   available
Mem:          15960        2539       11498         300        2021      12845
Swap:          8007           0            8007

Jori Mäntysalo

unread,
May 31, 2018, 1:27:13 AM5/31/18
to sage-support
On Wed, 30 May 2018, sbran...@web.de wrote:

> This is how my memory looks like before gap crashes:
>
> Every 5.0s: free -m                                     Wed May 30 22:03:55 2018
>
>                       total        used        free     shared  buff/cache   available
> Mem:          15960        2539       11498         300        2021      12845
> Swap:          8007           0            8007

I suggest that you try to increase swap to 2 times on RAM. Something like
this might work (as root):

head -c $((12*1024**3)) /dev/zero > /home/SWAPFILE
chmod og= /home/SWAPFILE
mkswap /home/SWAPFILE
swapon /home/SWAPFILE

--
Jori Mäntysalo

sbran...@web.de

unread,
May 31, 2018, 4:51:57 AM5/31/18
to sage-support
I upgraded the swap to 40 GB.  The computation gets through now.
Thank you.

sbran...@web.de

unread,
Sep 19, 2018, 3:32:44 AM9/19/18
to sage-support
While adding swap helps a little, you have to add unreasonably much swap for things to work.
The real reason is an internal memory limit in gap and libgap.
You can set it with
set_gap_memory_pool_size()

from interfaces/gap.py

and that helps.

This solution is thanks to Dima in
https://groups.google.com/forum/#!topic/sage-devel/ntuqDmruI8w
Reply all
Reply to author
Forward
0 new messages