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

Replace most of sage.libs.gap with gappy #31404

Open
embray opened this issue Feb 16, 2021 · 74 comments
Open

Replace most of sage.libs.gap with gappy #31404

embray opened this issue Feb 16, 2021 · 74 comments

Comments

@embray
Copy link
Contributor

embray commented Feb 16, 2021

From the gappy README:

gappy provides a Python interface to the GAP
computer algebra system by linking to its
library interface.

This is a follow-up to #31297, particularly inspired by #31297 comment:17. It is a more disruptive change, in that instead of providing wrappers around gappy that are Sage Parents and Elements, it follows the example of cypari2 and just uses gappy more-or-less directly without any wrappers.

It remains completely agnostic to the coercion system, though I am not completely happy with this state of affairs. In particular you can see I had to add a special case to Polynomial.__call__ for handling evaluating polynomials on GapObjs, a case that used to work fine, but now needs a special case since other Sage types cannot be coerced to GapObjs.

Also had to add special cases for instantiating Integers and Rationals from GapObjs, but on the plus side this is now a bit faster.

Upstream: Reported upstream. No feedback yet.

CC: @videlec @dimpase @mkoeppe @slel

Component: interfaces

Keywords: gap libgap gappy

Work Issues: release gappy 0.1.0 final and update spkg version before merging, test against p_groups_cohomology

Author: Erik Bray

Branch/Commit: u/dimpase/gappy-without-wrappers @ 3f1d051

Reviewer: Dima Pasechnik, ...

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

@embray embray added this to the sage-9.4 milestone Feb 16, 2021
@embray
Copy link
Contributor Author

embray commented Feb 16, 2021

Last 10 new commits:

197290fFix miscellaneous tests that broke due to different group iteration
9f621e9Update gappy to v0.1.0a1 with some fixes for matrices and gap_function.
4839316Miscellaneous updates to not use deprecated interfaces, particularly
baa0f61Update gappy to v0.1.0a2 which adds MacOS and Cygwin fixes.
a07f20eFixes needed for gappy v0.1.0a2 which did away with the libgap_soname
c9160c1Further rework of 45b175e43621795f890204a9cdfb30b524f961fa which
0ae791eUpdate gappy to v0.1.3a3 with the requisite changes needed to adapt to
82e7e56A few minor test fixes:
b305f39Don't assume that anything with a 'parent' attribute is fully
943b009Deprecate sage.libs.gap.element and convert Sage to use

@embray
Copy link
Contributor Author

embray commented Feb 16, 2021

Branch: u/embray/gappy-without-wrappers

@embray
Copy link
Contributor Author

embray commented Feb 16, 2021

Commit: 943b009

@embray
Copy link
Contributor Author

embray commented Feb 16, 2021

comment:2

If eventually approved, this would supersede #31297.

@embray

This comment has been minimized.

@videlec
Copy link
Contributor

videlec commented Feb 16, 2021

comment:3

Does sphinx link such as :mod:`gappy.gapobj` actually works? The question is merely

  • where is it resolved?
  • in the documentation where does it point to: local or distant documentation?

For pplpy we had to trick a bit, (commit 684e10)

diff --git a/build/pkgs/pplpy/spkg-install b/build/pkgs/pplpy/spkg-install
index deba1bb42b..5a39f43925 100644
--- a/build/pkgs/pplpy/spkg-install
+++ b/build/pkgs/pplpy/spkg-install
@@ -1 +1,14 @@
 cd src && sdh_pip_install .
+
+if [[ "$SAGE_SPKG_INSTALL_DOCS" != no ]] ; then
+    # Compile pplpy's documentation
+    sage-python23 setup.py build_ext --inplace
+    PYTHONPATH=$PYTHONPATH:$(pwd)
+    cd docs
+    $MAKE html
+
+    # install pplpy's documentation
+    PPLPY_DOCS=$SAGE_SHARE/doc/pplpy
+    mkdir -p $PPLPY_DOCS
+    cp -r build/html/*  $PPLPY_DOCS
+fi
diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py
index 91f651a41c..70dd17f271 100644
--- a/src/doc/common/conf.py
+++ b/src/doc/common/conf.py
@@ -177,7 +177,8 @@ python_version = sys.version_info.major
 intersphinx_mapping = {
     'python': ('https://docs.python.org/',
                 os.path.join(SAGE_DOC_SRC, "common",
-                             "python{}.inv".format(python_version)))}
+                             "python{}.inv".format(python_version))),
+    'pplpy': (os.path.join(SAGE_SHARE, "doc", "pplpy"), None)}
 
 def set_intersphinx_mappings(app):
     """

What we did is not robust at all...

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 16, 2021

comment:4

I think the Python package pplpy should advertise the install location of the docs if possible. Assuming that things live in SAGE_SHARE is not a good idea...
See also: #27495 - Use sphinx.ext.extlinks to add Sphinx roles for links to external package docs

@embray
Copy link
Contributor Author

embray commented Feb 16, 2021

comment:5

I am still working on updating the docs.

@videlec
Copy link
Contributor

videlec commented Feb 16, 2021

comment:6

Replying to @mkoeppe:

SNIP

I opened a thread on sage-devel, no need to clutter the ticket with general documentation issue.

@embray
Copy link
Contributor Author

embray commented Feb 26, 2021

comment:7

Another tricky aspect of the doc build: When I try to add a spkg-postinst to install the docs for gappy, gappy's own conf.py has an intersphinx mapping for the Python docs.

Even weirder, when it tries to download the objects.inv from python.org it just hangs. If I manually cd to the build directory for gappy and run cd src/docs; make html the download works no problem. But when running ./sage -i gappy it hangs at:

[gappy-0.1.0a3] loading intersphinx inventory from https://docs.python.org/3/objects.inv...

Are we actually doing something to block the internet connection when installing packages?

@embray
Copy link
Contributor Author

embray commented Feb 26, 2021

comment:8

It eventually fails with

[gappy-0.1.0a3] WARNING: failed to reach any of the inventories with the following issues:
[gappy-0.1.0a3] intersphinx inventory 'https://docs.python.org/3/objects.inv' not fetchable due to <class 'requests.exceptions.ProxyError'>: HTTPSConnectionPool(host='docs.python.org', port=443): Max retries exceeded with url: /3/objects.inv (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8dcb536518>: Failed to establish a new connection: [Errno 110] Connection timed out',)))

@embray
Copy link
Contributor Author

embray commented Feb 26, 2021

comment:9

A simple workaround suggested here is to write a wrapper around the original conf.py to override the intersphinx_mapping setting. I'm trying to get that to work now.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 26, 2021

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

5c9a06aSince this code was moved into a function it should use globals() not
092fa4bInstall the gappy docs if SAGE_SPKG_INSTALL_DOCS=yes

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 26, 2021

Changed commit from 943b009 to 092fa4b

@embray
Copy link
Contributor Author

embray commented Feb 26, 2021

comment:11

Yep, this approach gets the job done.

In case we also have a local copy of the Python docs installed, this can also change the intersphinx mapping to generate links to the local docs instead of the online ones, if desired. Same approach could be used in other packages (pplpy, etc.)

Next step: add the intersphinx mapping to the Sage docs, again generating links to the local gappy docs if available, and otherwise to the online docs.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 26, 2021

Changed commit from 092fa4b to a87cfbe

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 26, 2021

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

86e4b1bDeprecate sage.libs.gap.element and convert Sage to use
2be416aSince this code was moved into a function it should use globals() not
45eeb8fInstall the gappy docs if SAGE_SPKG_INSTALL_DOCS=yes
a87cfbeVarious documentation improvements:

@embray
Copy link
Contributor Author

embray commented Feb 26, 2021

comment:13

This is nearly ready to go from my point of view, except that when I run the full test suite I get a weird segfault from the Singular interface around here:

sage: a = singular(1) ## line 502 ##
sage: _ = singular._expect.sendline('1+')  # unfinished input ## line 503 ##
sage: try:
    alarm(0.5)
    singular._expect_expr('>')  # interrupt this
except KeyboardInterrupt:
    pass ## line 504 ##
Control-C pressed. Interrupting Singular. Please wait a few seconds...
sage: 2*a ## line 513 ##

which seems to be emanating from sage.rings.integer

/home/embray/src/sagemath/sage/local/lib/python3.6/site-packages/cysignals/signals.cpython-36m-x86_64-linux-gnu.so(+0x6a6b)[0x7fc69ffd9a6b]
/home/embray/src/sagemath/sage/local/lib/python3.6/site-packages/cysignals/signals.cpython-36m-x86_64-linux-gnu.so(+0x6c48)[0x7fc69ffd9c48]
/home/embray/src/sagemath/sage/local/lib/python3.6/site-packages/cysignals/signals.cpython-36m-x86_64-linux-gnu.so(+0x9103)[0x7fc69ffdc103]
/lib/x86_64-linux-gnu/libc.so.6(+0x3efd0)[0x7fc6a6542fd0]
/home/embray/src/sagemath/sage/local/lib/python3.6/site-packages/cysignals/signals.cpython-36m-x86_64-linux-gnu.so(+0x9deb)[0x7fc69ffdcdeb]
/home/embray/src/sagemath/sage/local/lib/python3.6/site-packages/sage/rings/integer.cpython-36m-x86_64-linux-gnu.so(+0x16ab6)[0x7fc68bbd0ab6]
...

I'm not sure what this would possibly have to do with the libgap interface, but it's not outside the realm of possibility.

When I re-run the failing test by itself the segfault does not occur :/

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 27, 2021

comment:14

Should #31297 be listed as a dependency?

@embray
Copy link
Contributor Author

embray commented Mar 2, 2021

comment:15

Replying to @mkoeppe:

Should #31297 be listed as a dependency?

I don't think so. This supersedes #31297. Unless anyone has strong feelings that the wrapper approach is better, I think at some point that ticket should be closed in favor of this one.

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 2, 2021

comment:16

Thanks for the clarification. I have set the milestone of #31297 accordingly.

@videlec
Copy link
Contributor

videlec commented Mar 2, 2021

comment:17

I fought to make initialization of PermutationGroupElement much faster. The following bit reverts it completely when initializing from libgap permutations (using .ListPerm() go through the slow Python iteration protocol).

@@ -581,31 +576,11 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement):
             ...
             ValueError: invalid data to initialize a permutation
         """
-        cdef UInt2* p2
-        cdef UInt4* p4
-        cdef int i
-        cdef UInt d
-
-        if TNUM_OBJ(p.value) == T_PERM2:
-            d = DEG_PERM2(p.value)
-            if d > self.n:
-                d = self.n
-            else:
-                for i in range(d, self.n):
-                    self.perm[i] = i
-            p2 = CONST_ADDR_PERM2(p.value)
-            for i in range(d):
-                self.perm[i] = p2[i]
-        elif TNUM_OBJ(p.value) == T_PERM4:
-            d = DEG_PERM4(p.value)
-            if d > self.n:
-                d = self.n
-            else:
-                for i in range(d, self.n):
-                    self.perm[i] = i
-            p4 = CONST_ADDR_PERM4(p.value)
-            for i in range(d):
-                self.perm[i] = p4[i]
+        if isinstance(p, GapPermutation):
+            try:
+                self._set_list_images(p.ListPerm(), False)
+            except AssertionError:
+                raise ValueError("invalid data to initialize a permutation")
         else:
             raise TypeError("not a gap permutation")

Is there any reason why not use the C API of GAP here?

@embray
Copy link
Contributor Author

embray commented Mar 3, 2021

comment:18

Replying to @videlec:

Is there any reason why not use the C API of GAP here?

Yes, the goal is to do away as much as possible with using undocumented/potentially unstable GAP internals. The GAP community has shown an interest of late of developing something more of a "public" API for using GAP as a library, and I and others from the Sage side have been working with them a lot to develop that.

Unfortunately, one of the "gaps" is public APIs for accessing permutation objects efficiently.

I'm glad you brought this up though because I was worried about exactly this change, and was not 100% sure how impactful it was. Is there an example case you can give me that might show whether or not there is a performance deficit?

I've made other performance improvements that might negate the change, but you are right that when using ListPerm it will, in the current code, have to iterate over the GAP List. Perhaps I can add a C method to GapPermutation to do this more efficiently.

@embray
Copy link
Contributor Author

embray commented Mar 3, 2021

comment:19

I'll add, if it makes an enormous difference, I can make an exception for now. It wouldn't be the only exception I've made in the current version of gappy for APIs that are not yet available in the libgap API. I'll propose some additions to libgap for accessing permutations, and then in gappy provide wrappers that provide the currently missing APIs.

@embray
Copy link
Contributor Author

embray commented Mar 4, 2021

comment:20

Some more info on the failing Singular test:

#0  0x00007fa76509e6d0 in __GI___waitpid () at /build/glibc-2ORdQG/glibc-2.27/posix/../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x00007fa75ea8fad0 in print_enhanced_backtrace () at /tmp/pip-req-build-b0moadh3/build/src/cysignals/implementation.c:563
#2  0x00007fa75ea8fc10 in sigdie () at /tmp/pip-req-build-b0moadh3/build/src/cysignals/implementation.c:589
#3  0x00007fa75ea91f31 in sigdie_for_sig () at /tmp/pip-req-build-b0moadh3/build/src/cysignals/implementation.c:164
#4  0x00007fa75ea91f00 in cysigs_signal_handler () at /tmp/pip-req-build-b0moadh3/build/src/cysignals/implementation.c:262
#5  0x00007fa7653c8170 in __restore_rt ()
#6  0x00007fa75ea92ac0 in __pyx_f_9cysignals_7signals_verify_exc_value () at /tmp/pip-req-build-b0moadh3/build/src/cysignals/signals.c:3736
#7  0x00007fa74a6989f9 in sig_occurred () at /home/embray/src/sagemath/sage/build/pkgs/sagelib/src/sage/modular/arithgroup/congroup.pyx:0
     1    """
     2    Cython helper functions for congruence subgroups
     3    
     4    This file contains optimized Cython implementations of a few functions related
#8  0x00007fa74a6989f0 in fast_tp_dealloc () at /home/embray/src/sagemath/sage/build/pkgs/sagelib/src/sage/rings/integer.pyx:7423
  7418        cdef mpz_ptr o_mpz = <mpz_ptr>((<Integer>o).value)
  7419    
  7420        # If we are recovering from an interrupt, throw the mpz_t away
  7421        # without recycling or freeing it because it might be in an
  7422        # inconsistent state (see Trac #24986).
> 7423        if sig_occurred() is NULL:
  7424            if integer_pool_count < integer_pool_size:
  7425                # Here we free any extra memory used by the mpz_t by
  7426                # setting it to a single limb.
  7427                if o_mpz._mp_alloc > 10:

The test in question is testing an alarm interrupt, so it seems maybe the interrupt is occurring before this sig_occurred() check in fast_tp_dealloc, which appears to be trying to do what it's supposed to do (don't recycle an mpz_t which might be in an inconsistent state). The rest of the stack trace above this isn't useful since it's using the system Python and I don't have the debugging symbols installed.

A couple weird things about this:

  • The segfault appears to be happening inside cysignals itself in verify_exc_value().

  • This happens consistently, in the same place, when I run the full test suite on this branch, but I can't seem to reproduce it in any other way, and I can't reproduce it on the current develop branch.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 5, 2021

Changed commit from 6c99fbf to 69feb67

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 5, 2021

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

69feb67restore computing GAP_SO

@dimpase
Copy link
Member

dimpase commented Sep 5, 2021

comment:47

libgap workspace management is still broken, as can be seen by removing ~/.sage/gap/ and
running e.g. sage: libgap(1) at Sage prompt.

sage: libgap(1)
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-1-037524c8c625> in <module>
----> 1 libgap(Integer(1))

/home/scratch2/dimpase/sage/sage/local/lib64/python3.9/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:4052)()
    360             True
    361         """
--> 362         return self.get_object()(*args, **kwds)
    363
    364     def __repr__(self):

/home/scratch2/dimpase/sage/sage/local/lib64/python3.9/site-packages/gappy/core.pyx in gappy.core.Gap.__call__()
    689
    690         """
--> 691         self.initialize()
    692         if isinstance(x, GapObj):
    693             return x

/home/scratch2/dimpase/sage/sage/local/lib64/python3.9/site-packages/sage/libs/gap/libgap.pyx in sage.libs.gap.libgap.SageGap.initialize (build/cythonized/sage/libs/gap/libgap.c:2801)()
    272         """
    273
--> 274         initializing = Gap.initialize(self)
    275
    276         if initializing:

/home/scratch2/dimpase/sage/sage/local/lib64/python3.9/site-packages/gappy/core.pyx in gappy.core.Gap.initialize()
    601             return False
    602
--> 603         self._init_kwargs.update(initialize(
    604             gap_root=self._init_kwargs['gap_root'],
    605             gaprc=self._init_kwargs['gaprc'],

/home/scratch2/dimpase/sage/sage/local/lib64/python3.9/site-packages/gappy/core.pyx in gappy.core.initialize()
    251         workspace = os.path.normpath(workspace)
    252
--> 253         with open(workspace, 'rb'):
    254             pass
    255

FileNotFoundError: [Errno 2] No such file or directory: '/home/scratch/dimpase/.sage/gap/libgap-workspace-c357604137f37c963401793ca1ab74cce6c00efd'

@dimpase
Copy link
Member

dimpase commented Sep 5, 2021

comment:48

I see how the workspace issue can be fixed, but it might need a change in gappy - I opened embray/gappy#16 to discuss.

@dimpase
Copy link
Member

dimpase commented Sep 5, 2021

Upstream: Reported upstream. No feedback yet.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 6, 2021

Changed commit from 69feb67 to 1b5adee

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 6, 2021

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

1b5adeegappy PR#17 patch; uses it to handle workspaces

@dimpase
Copy link
Member

dimpase commented Sep 6, 2021

Changed reviewer from Dima Pasechnik to Dima Pasechnik, ...

@dimpase
Copy link
Member

dimpase commented Sep 6, 2021

comment:50

we still need to carefully check that GAP workspace rotation is not broken, but hopefully not.

@dimpase
Copy link
Member

dimpase commented Sep 10, 2021

comment:51

a couple of test failures I can't quite make sense of. The 1st one has something to do with
cachefunc, categories, etc...

File "src/sage/groups/perm_gps/permgroup_morphism.py", line 119, in sage.groups.perm_gps.permgroup_morphism.PermutationGroupMorphism.image
Failed example:
    h = D4.isomorphism_to(G)
Exception raised:
    Traceback (most recent call last):
      File "sage/misc/cachefunc.pyx", line 1943, in sage.misc.cachefunc.CachedMethodCaller.__call__ (build/cythonized/sage/misc/cachefunc.c:10347)
        return cache[k]
    KeyError: ((<SageGap(gap_root='/mnt/opt/Sage/sage-dev/local/share/gap')>,), ())

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "sage/structure/category_object.pyx", line 839, in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7089)
        return self.__cached_methods[name]
    KeyError: '_pari_nf'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/rings/number_field/number_field.py", line 4348, in pari_nf
        return self._pari_nf
      File "sage/structure/category_object.pyx", line 833, in sage.structure.category_object.CategoryObject.__getattr__ (build/cythonized/sage/structure/category_object.c:7008)
        return self.getattr_from_category(name)
      File "sage/structure/category_object.pyx", line 848, in sage.structure.category_object.CategoryObject.getattr_from_category (build/cythonized/sage/structure/category_object.c:7174)
        attr = getattr_from_other_class(self, cls, name)
      File "sage/cpython/getattr.pyx", line 367, in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2566)
        raise AttributeError(dummy_error_message)
    AttributeError: 'NumberField_absolute_with_category' object has no attribute '_cache___pari_absolute_structure'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 718, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1137, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.groups.perm_gps.permgroup_morphism.PermutationGroupMorphism.image[17]>", line 1, in <module>
        h = D4.isomorphism_to(G)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/groups/perm_gps/permgroup.py", line 4076, in isomorphism_to
        iso = self._libgap_().IsomorphismGroups(right)
      File "gappy/gapobj.pyx", line 2773, in gappy.gapobj.GapMethodProxy.__call__
        return self.func.__call__(self.self, *args)
      File "gappy/gapobj.pyx", line 2489, in gappy.gapobj.GapFunction.__call__
        sig_on()
    SystemError: calling remove_from_pari_stack() inside sig_on()

The 2nd one is even less explicit, with a mysterious
SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
coming from somewhere I don't see

File "src/sage/groups/perm_gps/permgroup.py", line 614, in sage.groups.perm_gps.permgroup.PermutationGroup_generic.gap
Failed example:
    gap(P8) == P8.gap()
Expected:
    True
Got:
    doctest:warning
      File "/mnt/opt/Sage/sage-dev/src/bin/sage-runtests", line 144, in <module>
        err = DC.run()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/control.py", line 1207, in run
        self.run_doctests()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/control.py", line 909, in run_doctests
        self.dispatcher.dispatch()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2044, in dispatch
        self.parallel_dispatch()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1939, in parallel_dispatch
        w.start()  # This might take some time
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2211, in start
        super(DocTestWorker, self).start()
      File "/usr/lib/python3.8/multiprocessing/process.py", line 121, in start
        self._popen = self._Popen(self)
      File "/usr/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
        return _default_context.get_context().Process._Popen(process_obj)
      File "/usr/lib/python3.8/multiprocessing/context.py", line 277, in _Popen
        return Popen(process_obj)
      File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
        self._launch(process_obj)
      File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75, in _launch
        code = process_obj._bootstrap(parent_sentinel=child_r)
      File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
        self.run()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2183, in run
        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2512, in __call__
        doctests, extras = self._run(runner, options, results)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2559, in _run
        result = runner.run(test)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 910, in run
        return self._run(test, compileflags, out)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 718, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1137, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.groups.perm_gps.permgroup.PermutationGroup_generic.gap[2]>", line 1, in <module>
        gap(P8) == P8.gap()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/interfaces/interface.py", line 1082, in _sage_
        return sage.misc.sage_eval.sage_eval(string)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/misc/sage_eval.py", line 201, in sage_eval
        return eval(source, sage.all.__dict__, locals)
      File "/usr/lib/python3.8/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
    doctest:warning
      File "/mnt/opt/Sage/sage-dev/src/bin/sage-runtests", line 144, in <module>
        err = DC.run()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/control.py", line 1207, in run
        self.run_doctests()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/control.py", line 909, in run_doctests
        self.dispatcher.dispatch()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2044, in dispatch
        self.parallel_dispatch()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1939, in parallel_dispatch
        w.start()  # This might take some time
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2211, in start
        super(DocTestWorker, self).start()
      File "/usr/lib/python3.8/multiprocessing/process.py", line 121, in start
        self._popen = self._Popen(self)
      File "/usr/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
        return _default_context.get_context().Process._Popen(process_obj)
      File "/usr/lib/python3.8/multiprocessing/context.py", line 277, in _Popen
        return Popen(process_obj)
      File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
        self._launch(process_obj)
      File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75, in _launch
        code = process_obj._bootstrap(parent_sentinel=child_r)
      File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
        self.run()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2183, in run
        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2512, in __call__
        doctests, extras = self._run(runner, options, results)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 2559, in _run
        result = runner.run(test)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 910, in run
        return self._run(test, compileflags, out)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 718, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1137, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.groups.perm_gps.permgroup.PermutationGroup_generic.gap[2]>", line 1, in <module>
        gap(P8) == P8.gap()
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/interfaces/interface.py", line 1082, in _sage_
        return sage.misc.sage_eval.sage_eval(string)
      File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/misc/sage_eval.py", line 201, in sage_eval
        return eval(source, sage.all.__dict__, locals)
      File "/usr/lib/python3.8/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
    True

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 10, 2021

Changed commit from 1b5adee to 3f1d051

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 10, 2021

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

3f1d051make invocation of _libgap_() explicit

@embray
Copy link
Contributor Author

embray commented Sep 13, 2021

comment:53

I still wouldn't move forward on this too much until I have a first release of gappy out. I haven't had time to work on it in several months, so it's probably fallen a bit behind the last GAP releases (and can probably drop some workarounds for older GAP versions).

Other than that there isn't too much holding up making a gappy release--I think, as you found, some of the workspace management stuff, and some of the global namespace stuff from Sage's libgap needs to be worked into it better.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 18, 2021

comment:54

Stalled in needs_review or needs_info; likely won't make it into Sage 9.5.

@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@orlitzky
Copy link
Contributor

comment:55

See also: #33072.

@slel

This comment has been minimized.

@orlitzky
Copy link
Contributor

orlitzky commented Feb 7, 2022

comment:57

Moving to "needs work," as there's nothing to review at the moment (we're waiting for an upstream gappy release).

@dimpase
Copy link
Member

dimpase commented Feb 7, 2022

comment:58

Upstream changed jobs recently, not sure if an update will be soon...

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

6 participants