-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
libgap for PermutationGroup #18267
Comments
comment:2
The overhead of using pexpect for GAP is especially serious on Cygwin. I believe it to be one of the worst performance hits there, due to the I/O overhead. It's so slow in fact that I wonder if there isn't a bug/defect in Cygwin related to this. It's normal that there is some additional overhead involved for I/O on Cygwin, but this is especially bad. |
comment:3
I have a prototype for this in progress that is shaping up pretty well so far. I will likely need help with this part:
as I don't know all the math well enough to write interesting tests for this. But I can get most of the skunkworks done and then anyone else who's interested can add on to it. |
comment:4
The I/O overhead on Cygwin adds up to something on the order of 20x in this test (specially, the
On Cygwin (different machine, but with reasonably good specs):
More than 10 minutes on this one test! It's by far one of the slowest tests on Cygwin. With my prototype of getting pexpect out of permutation groups I knocked this result down to (again on Cygwin):
|
comment:5
Unfortunately |
comment:6
Well I found one more pexpect use in permgroup_named; fixing that one knocked it down from ~5 minutes to
Which is still about 5 times slower for some reason than that test is on Linux, but progress! Some of the tests also intentionally use the pexpect interface directly, so nothing to do about that for now. |
Commit: |
comment:7
Here is my current prototype for getting pexpect out of permutation groups, and having them use libgap exclusively. For the large part it is quite effective at this. This fixes (among many other examples):
where previously this was invoking a GAP process through pexpect. Last 10 new commits:
|
Author: Erik Bray |
Dependencies: #27946 |
comment:8
Unfortunately there is still a handful of failing tests with this. |
comment:9
I think most of the problems are coming from my hacky attempt to make some |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:11
Fixed the problems that I knew about, though there are likely still others. Although this is set to "needs_work" it would probably be interesting-enough to start playing around with if anyone wants to review. |
comment:12
With the current version of this branch almost everything works except for a few trivial doctest failures due to new pseudo-random results in some tests. However, I am also getting a bizarre memory error when running the tests for |
comment:13
+1 for doing this. |
comment:14
If anyone would like to help test this that would be great for moving forward on this work. In particular, it would be helpful to know if anyone can reproduce the test failure in |
comment:25
I think I'll just remove the dependency. It's not actually a dependency for this ticket, especially since my solution proposed there still doesn't seem to work. The relation between that issue and this ticket is much more indirect than I previously thought. |
comment:26
This breaks the gap interfaces when building with SAGE_DEBUG=yes:
|
comment:27
I'm not really sure what makes you think that has anything to do with this ticket. That looks like the gap interpreter itself is crashing unexpectedly when running a debug build. But this ticket doesn't change anything about gap itself or the pexpect interface. |
comment:28
I only ran the tests with and without this ticket, I haven't looked at the code. If it is as you say then presumably its some sort of resource exhaustion while running the tests. |
comment:29
I'll still check if I can reproduce. It could be something like #28106 |
comment:30
I can reproduce it, even with |
comment:31
Somehow it seems this has caused a regression of something that was supposed to be fixed by #10296. The problems start here:
Instead of gap crashing normally and restarting, we get this error instead:
after which point the gap interface never recovers. It's only happening in the tests though. I can't reproduce interactively. Running the tests with |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:33
Rebased on current develop, and the latest commit fixes the immediate problem in the test suite. I believe there is still an underlying problem with libgap/gap interaction which is not yet addressed though (and is probably not new as of this ticket, but just more likely to occur with libgap being used more extensively). |
comment:34
This might be related to gap-system/gap#3380 , with libgap |
comment:35
It seems that, at least theoretically, we already do disable GAP's default |
comment:36
Bizarrely, even after backing out that last test update, and rebuilding, I can't reproduce the issue anymore either. I think it might have actually had something to do with sage-cleaner. Please send this to the buildbots again. I really don't think the issue is caused by this ticket, but is something more ephemeral that it happens to provoke somehow. |
comment:37
Yes, this has got to have something to do with |
Changed branch from u/embray/prototype/perm-gps-no-pexpect-gap to |
As remarked in this question on ask.sagemath.org a lot of time is spent with pexpect when playing with permutation groups.
In this ticket:
ClosureGroup
,AllBlocks
, are available from libgapPermutationGroup
inplace of the current gap versionDepends on #27946
Depends on #28354
CC: @nthiery @tscrim
Component: interfaces
Keywords: fpsac2019
Author: Erik Bray
Branch/Commit:
65f8a84
Reviewer: Frédéric Chapoton, Vincent Delecroix, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/18267
The text was updated successfully, but these errors were encountered: