FS#70640 - sagemath gap interface broken if gap-packages installed
Attached to Project:
Community Packages
Opened by Austin (vujazzman) - Thursday, 29 April 2021, 18:58 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 01 May 2021, 18:26 GMT
Opened by Austin (vujazzman) - Thursday, 29 April 2021, 18:58 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 01 May 2021, 18:26 GMT
|
Details
Description:
If sagemath, its dependency gap, and gap's optional package gap-packages are installed, gap inside sagemath does not work. Additional info: * package version(s) sagemath 9.2-18 gap 4.11.1-1 gap-packages 4.11.1-1 Those versions and also many prior versions; I just haven't bothered reporting this bug until now. * config and/or log files etc. Problem exists even after deleting configuration files Steps to reproduce: Install sagemath and gap-packages $ sage sage: gap('2+2') this will eventually issue an error, ending with something like TypeError: unable to start gap: End Of File (EOF). Exception style platform. Gap with PID 2709581 running /usr/bin/gap -r -L /home/austin/.sage/gap/gap-workspace-5c0e77c46be77719bc1c0a5ec9c64b94d2a2e50c -b -p -T -E -o 401m -s 401m -m 64m /usr/lib/python3.9/site-packages/sage/ext_data/gap/sage.g command: /usr/bin/gap args: ['/usr/bin/gap', '-r', '-L', '/home/austin/.sage/gap/gap-workspace-5c0e77c46be77719bc1c0a5ec9c64b94d2a2e50c', '-b', '-p', '-T', '-E', '-o', '401m', '-s', '401m', '-m', '64m', '/usr/lib/python3.9/site-packages/sage/ext_data/gap/sage.g'] buffer (last 100 chars): b'' before (last 100 chars): b'[?1l\x1b>@fError, @freached the pre-set memory limit@J@f(change it with the -o command line option)@f@J' after: <class 'pexpect.exceptions.EOF'> match: None match_index: None exitstatus: None flag_eof: True pid: 2709581 child_fd: 16 closed: False timeout: None delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 4194304 ignorecase: False searchwindowsize: None delaybeforesend: None delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: |
This task depends upon
This error means it's not allocating enough memory to load all packages on your system. You'll need at least 1GB, you can bypass sage's allocation by using something like this in your init.sage:
from sage.interfaces.gap import set_gap_memory_pool_size
set_gap_memory_pool_size(2^30)
Please report it upstream if you think sage's algorithm should be improved.
Do you know if there are other ways to affect the settings with which sage calls gap?
In any case I agree this doesn't look like an arch problem.
gap = Gap()
~/.sage/init.sage after the change to gap memory pool size did work.
For what its worth I do find sage's default memory allocation for gap too small, but it's hard to say if it should be considered a bug upstream; perhaps it needs some guidance in the error message on how to increase the default allocation. As for specifically breaking with gap-packages, perhaps this shouldn't be considered upstream's fault as the install for self contained sage doesn't include gap-packages.
Thank you for your help! At least I wont have this problem anymore.