On Tue, Jun 21, 2022 at 10:19 AM Dima Pasechnik <dimp...@gmail.com> wrote:
>
> On Tue, Jun 21, 2022 at 4:06 AM Nils Bruin <nbr...@sfu.ca> wrote:
> >
> > Perhaps this message (see the thread it's in for context) applies to your 
> > situation?
> >
> > https://groups.google.com/g/sage-devel/c/ntuqDmruI8w/m/vJOv6mgqCgAJ
>
> this is outdated. However, it seems that the very old doc suggestion in
> sage/interfaces/gap.py
>
> import sage.interfaces.gap
> sage.interfaces.gap.gap_cmd = '<whatever> '
>
> could never have worked, as gap_cmd is hardcoded to "gap -r" (or whatever)
> and it cannot be overwritten like this.

indeed:

sage: import sage.interfaces.gap
sage: sage.interfaces.gap.gap_cmd = "gap -r -o 3G -s 5G"
sage: gap.eval('GAPInfo.CommandLineOptions.s')
'"4g"'

so changing gap_cmd has no effect.

>
> This is the question of the correct class interface design here, and
> I'm a bit lost.
> I think the value of gap_cmd can be set somewhere early (in sagerc?),
> before the GAP pexcept is initialised.
> Then one could conditionally set gap_cmd to either the default value,
> or to the value in that initialisation parameter, if it was set at all.
>
> But where?
>
> Dima
>
>
>
>
>
>
> >
> > On Monday, 20 June 2022 at 19:30:04 UTC-6 AlexGhitza wrote:
> >>
> >> Thanks, John.
> >>
> >> But, I should have mentioned that we tried that and it does not seem to 
> >> work (unless I'm missing something):
> >>
> >> ┌────────────────────────────────────────────────────────────────────┐
> >> │ SageMath version 9.6, Release Date: 2022-05-15                     │
> >> │ Using Python 3.10.3. Type "help()" for help.                       │
> >> └────────────────────────────────────────────────────────────────────┘
> >> sage: gap("GAPInfo.CommandLineOptions;")
> >> rec(
> >>   [... redacted ...]
> >>   o := "2g",
> >>   [... redacted ...]
> >> )
> >> sage: sage.interfaces.gap.gap_cmd = 'gap -r -o 128G'
> >> sage: gap("GAPInfo.CommandLineOptions;")
> >> rec(
> >>   [... redacted ...]
> >>   o := "2g",
> >>   [... redacted ...]
> >> )
> >> On Tuesday, June 21, 2022 at 10:59:38 AM UTC+10 John H Palmieri wrote:
> >>>
> >>> According to 
> >>> https://ask.sagemath.org/question/61829/how-to-deal-with-gaperror-error-reached-the-pre-set-memory-limit/,
> >>>  try "sage.interfaces.gap.gap_cmd = 'gap -r -o 4G '".
> >>>
> >>> On Monday, June 20, 2022 at 5:12:27 PM UTC-7 AlexGhitza wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> I'm trying to help out a friend who is computing automorphism groups of 
> >>>> lattices in Sage (using GAP under the hood).  The computation is fairly 
> >>>> long and memory-intensive and eventually results in
> >>>>
> >>>>   sage.libs.gap.util.GAPError: Error, reached the pre-set memory limit
> >>>>   (change it with the -o command line option)
> >>>>
> >>>> Apparently, until late last year, achieving the desired -o command line 
> >>>> option effect from within Sage was possible via something like
> >>>>
> >>>>   from sage.interfaces.gap import get_gap_memory_pool_size, 
> >>>> set_gap_memory_pool_size
> >>>>   memory_gap = get_gap_memory_pool_size()
> >>>>   set_gap_memory_pool_size(9048*memory_gap)
> >>>>
> >>>> Now these functions are not available anymore, due to 
> >>>> https://trac.sagemath.org/ticket/32656
> >>>>
> >>>> Is it possible to achieve the same effect via some alternative method?
> >>>>
> >>>> Best,
> >>>> Alex
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to sage-devel+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/ce56865b-55b2-4efc-b37e-f5e81875d7c1n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq3Jt1OuMX%3DHkSYR_wXx2B-Z0bGSNLPtrQJy15%2BukPC%3Dww%40mail.gmail.com.

Reply via email to