Gap pexpect error when most Gap packages are installed

58 views
Skip to first unread message

Isuru Fernando

unread,
Jun 23, 2019, 2:25:45 PM6/23/19
to sage-devel
In the conda package for gap, we packaged almost all of the gap packages (136 of 145) and sage pexpect gives an error for the following,

sage: SymmetricGroup(7).conjugacy_classes_subgroups()

saying,
RuntimeError: Gap produced error output
Error, sorry, the GAP Tables Of Marks Library is not installed

I checked gap separately and tomlib imports fine and also running the equivalent command on gap runs fine. When I run the command in gap with the sage created workspace I get the same issue.

I removed all gap packages except for the 18 packages that sage installs, cleared the cache and it works. So, this is clearly an issue with a package that sage doesn't install.

Has anyone seen such an error before?

Isuru



---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-1-f1931822b935> in <module>()
----> 1 SymmetricGroup(Integer(7)).conjugacy_classes_subgroups()

/projects/3ae7bec7-0b36-47fd-9e01-c1fda619cf35/conda-sagelib-tests/sagemath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.pyc in conjugacy_classes_subgroups(self)
   3372         - David Joyner (2006-10)
   3373         """
-> 3374         cl = self._gap_().ConjugacyClassesSubgroups()
   3375         return [self.subgroup(gap_group=sub.Representative()) for sub in cl]
   3376

/projects/3ae7bec7-0b36-47fd-9e01-c1fda619cf35/conda-sagelib-tests/sagemath/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, *args, **kwds)                                                                                                                                                                
    661
    662     def __call__(self, *args, **kwds):
--> 663         return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds)
    664
    665     def help(self):

/projects/3ae7bec7-0b36-47fd-9e01-c1fda619cf35/conda-sagelib-tests/sagemath/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in function_call(self, function, args, kwds)                                                                                                                                                          
    937             # We combine the two commands so we only run eval() once and the
    938             #   only output would be from the second command
--> 939             res = self.eval(marker+cmd)
    940         else:
    941             self.eval(marker)

/projects/3ae7bec7-0b36-47fd-9e01-c1fda619cf35/conda-sagelib-tests/sagemath/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in eval(self, x, newlines, strip, split_lines, **kwds)                                                                                                                                                
    581             if not input_line.endswith(';'):
    582                 input_line += ';'
--> 583         result = Expect.eval(self, input_line, **kwds)
    584         if not newlines:
    585             result = result.replace("\\\n","")

/projects/3ae7bec7-0b36-47fd-9e01-c1fda619cf35/conda-sagelib-tests/sagemath/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)                                                                                                              
   1350                 elif split_lines:
   1351                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1352                                         for L in code.split('\n') if L != ''])
   1353                 else:
   1354                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/projects/3ae7bec7-0b36-47fd-9e01-c1fda619cf35/conda-sagelib-tests/sagemath/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)                                                                                                                        
    788                     return ''
    789             else:
--> 790                 raise RuntimeError(message)
    791
    792         except KeyboardInterrupt:

RuntimeError: Gap produced error output
Error, sorry, the GAP Tables Of Marks Library is not installed

   executing __SAGE_LAST__:="__SAGE_LAST__";;ConjugacyClassesSubgroups(\$sage1);;

Dima Pasechnik

unread,
Jun 23, 2019, 2:39:21 PM6/23/19
to sage-devel
does

sage: gap.load_package("tomlib")

work?

if it does, do you get the same error message if you run your command after this one?

--
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+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CA%2B01voOFt2NxM%3DHoRWNfORifmOqX%2B_ULHe-BNY6PK-rEZ6JheQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Isuru Fernando

unread,
Jun 23, 2019, 2:44:33 PM6/23/19
to sage-devel
Yes, gap.load_package("tomlib") works and running the "SymmetricGroup(7).conjugacy_classes_subgroups()" command doesn't work even tomlib is imported. I cleared the gap workspace and it doesn't help either.

Isuru

Vincent Delecroix

unread,
Jun 23, 2019, 3:48:29 PM6/23/19
to sage-...@googlegroups.com
Isuru, I installed successfully Sage in conda yesterday and my
version *does* work

$ conda activate sage
$ conda list|grep sage
sage 8.8.rc1 py36hcb32578_0 conda-forge

and then in the Sage console I obtain

sage: SymmetricGroup(7).conjugacy_classes_subgroups()
[Subgroup generated by [()] of
(Symmetric group of order 7! as a permutation group),
...
Subgroup generated by [(1,2), (1,2,3,4,5,6,7)] of
(Symmetric group of order 7! as a permutatio

However, launching gap I see a lot of warnings about missing packages
such as

#I autpgrp package is not available. Check that the name is correct
#I and it is present in one of the GAP root directories (see '??RootPaths')

and then gap informs me that only the following are available

Packages: GAPDoc 1.6.2, PrimGrp 3.3.2, SmallGrp 1.3, TransGrp 2.0.4

It is clear that we don't have the same setup! What did i miss in the
installation?

Vincent
>>> <https://groups.google.com/d/msgid/sage-devel/CA%2B01voOFt2NxM%3DHoRWNfORifmOqX%2B_ULHe-BNY6PK-rEZ6JheQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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+...@googlegroups.com.
>> To post to this group, send email to sage-...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-devel.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-devel/CAAWYfq1%3DjdZ5Emm4Eorm5Y4e1BFPQ1DwuxUdE00Z6aCfoANqqQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/sage-devel/CAAWYfq1%3DjdZ5Emm4Eorm5Y4e1BFPQ1DwuxUdE00Z6aCfoANqqQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .

Isuru Fernando

unread,
Jun 23, 2019, 3:51:21 PM6/23/19
to sage-devel
Hi,

Thanks for trying out sage conda package.
sage on conda comes only with "gap-core" which is just gap + those 4 packages.
You need to install "gap" to get all the other packages.

Isuru

Vincent Delecroix

unread,
Jun 23, 2019, 4:18:38 PM6/23/19
to sage-...@googlegroups.com
Now I do reproduce the error!

Antonio Rojas

unread,
Jun 23, 2019, 4:24:09 PM6/23/19
to sage-devel
I just noticed this yesterday after updating GAP to 4.10.2 in Arch. SymmetricGroup(n).conjugacy_classes_subgroups() works fine for n<=4, and fails for n>=5. Same as you, it works after removing all additional GAP packages.

Additionally, after the update (and with all GAP packages installed) some tests started failing due to using more memory than the default 330 maximum. Running them with -m0 makes them pass. Again, no issue if I remove the additional packages. 

Isuru Fernando

unread,
Jun 23, 2019, 4:38:34 PM6/23/19
to sage-devel
On Sun, Jun 23, 2019 at 6:24 PM Antonio Rojas <nqn...@gmail.com> wrote:
I just noticed this yesterday after updating GAP to 4.10.2 in Arch. SymmetricGroup(n).conjugacy_classes_subgroups() works fine for n<=4, and fails for n>=5. Same as you, it works after removing all additional GAP packages.

Additionally, after the update (and with all GAP packages installed) some tests started failing due to using more memory than the default 330 maximum. Running them with -m0 makes them pass. Again, no issue if I remove the additional packages. 

I did see this issue, but it somehow got fixed and I can't reproduce it anymore.

Isuru


El domingo, 23 de junio de 2019, 16:25:45 (UTC+2), Isuru Fernando escribió:
In the conda package for gap, we packaged almost all of the gap packages (136 of 145) and sage pexpect gives an error for the following,

sage: SymmetricGroup(7).conjugacy_classes_subgroups()

saying,
RuntimeError: Gap produced error output
Error, sorry, the GAP Tables Of Marks Library is not installed

I checked gap separately and tomlib imports fine and also running the equivalent command on gap runs fine. When I run the command in gap with the sage created workspace I get the same issue.

I removed all gap packages except for the 18 packages that sage installs, cleared the cache and it works. So, this is clearly an issue with a package that sage doesn't install.

Has anyone seen such an error before?

Isuru


--
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+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.

Vincent Delecroix

unread,
Jun 23, 2019, 4:39:06 PM6/23/19
to sage-...@googlegroups.com
Sage does some funny things to launch gap

- first of all gap inside Sage is started with a workspace
by the command line given as the output of
sage.interfaces.gap.gap_command()

- secondly it loads a certain list of packages that is given
by the function
sage.tests.gap_packages.all_installed_packages()

Also, it is possible to run the gap console from sage by doing

$ sage
sage: %gap

--> Switching to Gap <--

gap:

and the failure is reproducible in the above environment.

Le 23/06/2019 à 17:51, Isuru Fernando a écrit :

Dima Pasechnik

unread,
Jun 23, 2019, 6:28:52 PM6/23/19
to sage-devel
On Sun, Jun 23, 2019 at 5:39 PM Vincent Delecroix
<20100.d...@gmail.com> wrote:
>
> Sage does some funny things to launch gap
>
> - first of all gap inside Sage is started with a workspace
> by the command line given as the output of
> sage.interfaces.gap.gap_command()
>
> - secondly it loads a certain list of packages that is given
> by the function
> sage.tests.gap_packages.all_installed_packages()

note that this function actually calls libgap, not gap.
Now, if libgap and gap are somehow out of sync, weird things might happen.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/ecdea982-4117-d51e-ac8a-1f7e093f11cd%40gmail.com.

Vincent Delecroix

unread,
Jun 23, 2019, 6:31:38 PM6/23/19
to sage-...@googlegroups.com
I can reproduce in a gap session by loading the workspace that SageMath
created. More precisely with

$ gap -r -L /home/vincent/.sage/gap/gap-workspace-0x1322bf55a264f3c9 -E

I got

gap> S := SymmetricGroup(7);
Sym( [ 1 .. 7 ] )
gap> ConjugacyClassesSubgroups(S);
Error, sorry, the GAP Tables Of Marks Library is not installed at
/home/vincent/miniconda3/envs/sage/share/gap/lib/tom.gi:930 called from
TableOfMarksFromLibrary( str ) at
/home/vincent/miniconda3/envs/sage/share/gap/lib/tom.gi:942 called from
TableOfMarks( i ) at
/home/vincent/miniconda3/envs/sage/share/gap/lib/grplatt.gi:2968 called from
TomExtensionNames( inf ); at
/home/vincent/miniconda3/envs/sage/share/gap/lib/grplatt.gi:3032 called from
TomDataAlmostSimpleRecognition( G
) at /home/vincent/miniconda3/envs/sage/share/gap/lib/grplatt.gi:2834
called from
SubgroupsTrivialFitting( G
) at /home/vincent/miniconda3/envs/sage/share/gap/lib/grplatt.gi:911
called from
... at *stdin*:2
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk>

Dima Pasechnik

unread,
Jun 23, 2019, 9:49:14 PM6/23/19
to sage-devel
Sage assumes that every GAP package that is installed can be used in
its pexpect GAP as well as in its libgap GAP.
And not every GAP package out there in GAP upstream tarball can be
used in libgap, yet.
Basically, packages that need compiling might need special treatment
(have a look in build/pkgs/gap_packages/spkg-install)
and even patches (we patch cohomolo and guava presently).

(The GAP packages that don't need compiling should be fine, though).

So, I presume this is the reason for this problem
(as pexpect and libgap GAPs both do check for its packages via libgap)
In fact, this probably is not so hard to fix, just have different checks
for different interfaces.







On Sun, Jun 23, 2019 at 7:31 PM Vincent Delecroix
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e73b980c-df1b-0f9c-8afd-e5c304125107%40gmail.com.

Dima Pasechnik

unread,
Jul 9, 2019, 2:29:55 PM7/9/19
to sage-devel
by the way, could please someone review https://trac.sagemath.org/ticket/28088
(update to GAP 4.10.2)
Reply all
Reply to author
Forward
0 new messages