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

Upgrade to GAP 4.8.6 #20914

Closed
slel opened this issue Jun 30, 2016 · 59 comments
Closed

Upgrade to GAP 4.8.6 #20914

slel opened this issue Jun 30, 2016 · 59 comments

Comments

@slel
Copy link
Member

slel commented Jun 30, 2016

GAP 4.8.6 was released on 2016-11-14.

Release announcement:
http://mail.gap-system.org/pipermail/forum/2016/005368.html

GAP 4.8.6 page
http://gap-system.org/Releases/4.8.6.html

Changelog:
http://www.gap-system.org/Manuals/doc/changes/chap2.html#X7B6C9EFD7DF68823

Tarballs:

Depends on #22272

Upstream: Reported upstream. No feedback yet.

CC: @dimpase @kiwifb @vbraun @jdemeyer @tscrim

Component: group theory

Author: Dima Pasechnik

Branch/Commit: 8b8bff3

Reviewer: Volker Braun

Issue created by migration from https://trac.sagemath.org/ticket/20914

@slel slel added this to the sage-7.3 milestone Jun 30, 2016
@slel

This comment has been minimized.

@slel slel changed the title Upgrade to GAP 4.8.4 Upgrade to GAP 4.8.6 Jan 7, 2017
@slel slel modified the milestones: sage-7.3, sage-7.6 Jan 7, 2017
@dimpase
Copy link
Member

dimpase commented Jan 22, 2017

comment:2

Debian has patches for 4.8.6 update of libgap and gap, see
https://groups.google.com/d/msg/sage-packaging/O2PAsuAELMA/vKCdnu3RBAAJ

so we just should take them. Due to miscommunication with the Debian people, I only found out by chance, as I saw them asking what a GAP-related Sage doctest would output for GAP 4.8.6 in place of 4.8.3 :-)

@dimpase
Copy link
Member

dimpase commented Jan 23, 2017

comment:3

a 1st try for update; already includes the patch from #22116, but still needs few doctest fixes, due to changes in random sources, mostly.

@dimpase
Copy link
Member

dimpase commented Jan 23, 2017

Branch: u/dimpase/gap4.8.6

@dimpase
Copy link
Member

dimpase commented Jan 23, 2017

Commit: 0244812

@dimpase

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 23, 2017

Changed commit from 0244812 to ba1e2ae

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 23, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

ba1e2aewe don't have these packages installed by default

@dimpase
Copy link
Member

dimpase commented Jan 23, 2017

Upstream: Reported upstream. No feedback yet.

@dimpase
Copy link
Member

dimpase commented Jan 23, 2017

comment:5

libgap is built using modified upstream with manually adding src/libgap.map to the tarball as mentioned here. A proper (upstream) fix should be via automake config, I presume.

@dimpase
Copy link
Member

dimpase commented Jan 23, 2017

Author: Dima Pasechnik

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

b6b44c7GAPs random object generator has changed
2d86709use improved GAPs Iterator and Enuerator in matrix_group.py
ce16e91remaining easy doctest fixes

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2017

Changed commit from ba1e2ae to ce16e91

@jdemeyer
Copy link

comment:9

What do you expect from me? As I mentioned on #22116, I disagree with build/pkgs/gap_packages/patches/guava_leon.patch

@jdemeyer
Copy link

comment:10

I also wonder why you need the change to build/pkgs/database_gap/spkg-install. I don't know enough about GAP to know when gap_reset_workspace() is needed, but I think that you should give justification for that removal.

@dimpase
Copy link
Member

dimpase commented Jan 24, 2017

comment:11

Replying to @jdemeyer:

What do you expect from me? As I mentioned on #22116, I disagree with build/pkgs/gap_packages/patches/guava_leon.patch

This is now upstream and will be in the next release of Guava.

@jdemeyer
Copy link

comment:12

Replying to @dimpase:

Replying to @jdemeyer:

What do you expect from me? As I mentioned on #22116, I disagree with build/pkgs/gap_packages/patches/guava_leon.patch

This is now upstream and will be in the next release of Guava.

Then please update the patch file with a pointer to upstream. For reference, also add it on this Trac page.

@dimpase
Copy link
Member

dimpase commented Jan 24, 2017

comment:13

Replying to @jdemeyer:

I also wonder why you need the change to build/pkgs/database_gap/spkg-install. I don't know enough about GAP to know when gap_reset_workspace() is needed, but I think that you should give justification for that removal.

It is safe to omit this call. In fact,
gap_reset_workspace() needs some work. It has not really been touched in 5 years,
and it hangs on me now and then.
I do not want to do it on this ticket - it has been iffy for a while already.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

990b5dbadded a pointer to upstream change
35c8feaworkspace will be updated automatically anyway.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2017

Changed commit from ce16e91 to 35c8fea

@tscrim
Copy link
Collaborator

tscrim commented Feb 4, 2017

comment:35

Replying to @dimpase:

Replying to @jhpalmieri:

With 7.6.beta2, this works:

sage: W = WeylGroup(["A",3,1])
sage: for w in W: print w
   (... neverending list ...)

I believe this invokes W.__iter__, right?
And the latter is in sage/groups/libgap_mixin.py (cf. W.__iter__??)
So this is merely calling self.gap().Iterator(). And the latter does not actually work in Sage 7.5; one gets

ValueError: libGAP: Error, no method found! Error, no 3rd choice method found for `Enumerator' on 1 arguments

whereas with the branch here it does "work" - it runs out of memory...

I would suspect this is a GAP problem by trying to put the entire (matrix) group into memory as a list under an assumption that it is a finite group. Well, our RecursiveEnumeratedSet iterator runs into the same problem, but it will at least output things along the way...

That is, I believe that the category framework (or something like this) does try to call that W.__iter__, and upon failing (with the old GAP) actually does something that makes sense, namely sage/groups/matrix_gps/matrix_group.py has the lines

if not self.is_finite():
    # use implementation from category framework
    for g in super(Group, self).__iter__():
          yield g
    return

where the code in sage/categories/coxeter_group.py is called to do the right thing.

It's actually the reverse that happens: code in the categories is the last called in the MRO. In particular, the first call is to the lines copied above, and for non-finite groups (or at least those not known to be finite), then call up to the corresponding __iter__ implemented in the category (if there is one).

See comment:29 for why it used to work for Weyl groups.

Whereas with the new GAP one does not get a ValueError and proceeds with running out of memory (actual running done by GAP).

You deleted the code above that would call up to the category framework, where it was not using GAP to do the iteration.

So, somewhere, something must forbid this execution path, but I don't know where and how. All help is welcome. If the fix is not going to happen in GAP-related
code, I'd be inclined to press ahead with this ticket, declaring this issue a known (Sage) bug.

You probably need to restore part of the __iter__, specifically the code quoted above.

TL;DR - As John said, the problem is removing __iter__ from sage/groups/matrix_groups/matrix_group.py.

@dimpase
Copy link
Member

dimpase commented Feb 4, 2017

comment:36

Oh, I see. Thanks. Sorry for taking so long to get it. I removed too mich in this commit. I will reinstate the part that deals with infinite groups.

However this is still less than ideal. In the finite case for groups that have a fast category framework iterator (e.g. large finite Coxeter groups) one should not call GAP, either. Should this be dealt with on a follow-up ticket, or is there a quick way to add the corresponding filter?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 4, 2017

Changed commit from d861b37 to 971f323

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 4, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

971f323reintroduce `__init__` in MatrixGroup_gap to handle infinite groups

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 4, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

fd68158putting the doctests right

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 4, 2017

Changed commit from 971f323 to fd68158

@tscrim
Copy link
Collaborator

tscrim commented Feb 4, 2017

comment:39

Replying to @dimpase:

However this is still less than ideal. In the finite case for groups that have a fast category framework iterator (e.g. large finite Coxeter groups) one should not call GAP, either. Should this be dealt with on a follow-up ticket, or is there a quick way to add the corresponding filter?

The category iterator is not just for Coxeter groups, but any group with a finite generating set. Have you run timings (and memory usage) comparing the GAP iterator with the one from the category?

At least for Coxeter groups, we can do a check on the rank if there is some cutoff point.

@dimpase
Copy link
Member

dimpase commented Feb 5, 2017

Changed work issues from failing long doctests to none

@vbraun
Copy link
Member

vbraun commented Feb 5, 2017

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Feb 5, 2017

comment:42

Testsuite fails:

########> Diff in /Users/buildslave-sage/slave/sage_git/build/local/gap/latest\
1045/tst/testinstall/grpmat.tst, line 32:
1046# Input is:
1047Size( AutomorphismGroup( G ) );
1048# Expected output:
104924
1050# But found:
1051#I  autpgrp package is not available. Check that the name is correct
1052#I  and it is present in one of the GAP root directories (see '??RootPaths')

@dimpase
Copy link
Member

dimpase commented Feb 5, 2017

comment:43

Replying to @vbraun:

Testsuite fails:

########> Diff in /Users/buildslave-sage/slave/sage_git/build/local/gap/latest\
1045/tst/testinstall/grpmat.tst, line 32:
...
1051#I  autpgrp package is not available. Check that the name is correct
1052#I  and it is present in one of the GAP root directories (see '??RootPaths')

As far as I am concerned, this is not a bug, but a decision we made at some point to ship only the very minimal default GAP configuration.
As you most probably know, GAP assumes quite a few packages to be installed and autoloaded by default; this is patched away by
ba1e2ae "we don't have these packages installed by default"

Sage's GAP does not install autpgrp by default, and does not autoload it if it is available. Suppose it is available (i.e. gap_packages is installed); then
before running GAP_ROOT/tst/testinstall.g one has to load autpgrp manually.
I.e.

gap> LoadPackage("autpgrp");;
gap> Read("testinstall.g");

will make everything pass (on my system at least).

@vbraun
Copy link
Member

vbraun commented Feb 5, 2017

comment:44

Still I'd prefer to have a passing testsuite so that the buildbots can actuall run the tests. Can we just grep out tst/testinstall/grpmat.tst in spkg-check?

@vbraun
Copy link
Member

vbraun commented Feb 5, 2017

comment:45

I guess it is annoying because of the newline; How about deleting grpmat.tst from the install then?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 5, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

8b8bff3fake the output of GAP test needing autpgrp pkg

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 5, 2017

Changed commit from fd68158 to 8b8bff3

@dimpase
Copy link
Member

dimpase commented Feb 5, 2017

comment:47

Replying to @sagetrac-git:

Branch pushed to git repo; I updated commit sha1. New commits:

8b8bff3fake the output of GAP test needing autpgrp pkg

this should do the trick - I just fake the output of the test in question.

@vbraun
Copy link
Member

vbraun commented Feb 6, 2017

Changed branch from u/dimpase/gap4.8.6 to 8b8bff3

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

No branches or pull requests

7 participants