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 Singular to version 4-1-0p1 #21865

Closed
jhpalmieri opened this issue Nov 12, 2016 · 64 comments
Closed

Upgrade Singular to version 4-1-0p1 #21865

jhpalmieri opened this issue Nov 12, 2016 · 64 comments

Comments

@jhpalmieri
Copy link
Member

On the last update, the interrupt handling patch was wrongly removed, causing failures on OS X.
It is now included upstream, so let's update to 4-1-0p1.
This new version also allows us to simplify packaging.

New tarball: http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/4-1-0/singular-4.1.0p1.tar.gz

Component: packages: standard

Author: Jean-Pierre Flori

Branch/Commit: efc51ca

Reviewer: François Bissey

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

@jhpalmieri

This comment has been minimized.

@kiwifb
Copy link
Member

kiwifb commented Nov 12, 2016

comment:2

This is the pexpect interface playing up again, isn't it? It was also on OS X last time.

@jdemeyer
Copy link

comment:3

First somebody needs to double-check that all patches which were removed in #21631 were actually upstreamed.

@jhpalmieri
Copy link
Member Author

comment:4

Good call, Jeroen. It looks to me as though several of the patches were not applied or only partially applied. In particular, after applying the old interrupt.patch, that file passes tests. I'm rebuilding from scratch to check this.

By the way, from the other patches: from xalloc-omconfig.patch: the changes to xalloc/configure.ac were not upstreamed. From xalloc.pc.patch, the changes to xalloc/Makefile.am were not upstreamed. (I didn't check that carefully, to be honest, since interrupt.patch seemed like the likely culprit.)

@kiwifb
Copy link
Member

kiwifb commented Nov 12, 2016

comment:5

interrupt.patch is not in current upstream at all. Do we have a PR for it?

@jhpalmieri
Copy link
Member Author

comment:6

Just reinstating interrupt.patch yields one doctest error:

sage -t --long --warn-long 69.2 src/sage/tests/cmdline.py
**********************************************************************
File "src/sage/tests/cmdline.py", line 558, in sage.tests.cmdline.test_executable
Failed example:
    err
Expected:
    ''
Got:
    'fgets() failed'
**********************************************************************
1 item had failures:
   1 of 239 in sage.tests.cmdline.test_executable
    [238 tests, 1 failure, 48.69 s]
----------------------------------------------------------------------
sage -t --long --warn-long 69.2 src/sage/tests/cmdline.py  # 1 doctest failed
----------------------------------------------------------------------

@jpflori
Copy link

jpflori commented Nov 14, 2016

comment:7

Sorry, I was too fast on the update it seemed to me that Hans integrated the interrupt stuff...

As far as xalloc is concerned IIRC what is upstream should be mostly sufficient: the "omconfig" part was realy about bugs and should be fixed.
I'm not sure anymore about the pkgconfig part, nor that I reported it upstream!

@jpflori
Copy link

jpflori commented Nov 14, 2016

comment:8

The pkgconfig part is upstream as well:

@kiwifb
Copy link
Member

kiwifb commented Nov 14, 2016

comment:9

Replying to @jpflori:

The pkgconfig part is upstream as well:

Was going to say that. And definitely in 4.0.3p5 at least.

@jpflori
Copy link

jpflori commented Nov 14, 2016

comment:10

About interrupts there was this upstream tichet:

I cannot check things on this port from where I am :)
IIRC there was also another ticket there.

We should ping Hans about this one.
And also about the remaining stuff I mention here in debug mode:

@jdemeyer
Copy link

comment:11

So, we should just wait for 4.0.3p5?

@jdemeyer
Copy link

comment:12

Interrupts in Singular are indeed still (slightly) broken.

It is possible to do it really robustly, but not in a very portable way. If you're willing to assume POSIX (which is what Sage does), I can fix it but I don't know whether upstream will accept that.

@jdemeyer
Copy link

comment:13

Replying to @jpflori:

About interrupts there was this upstream tichet:

And this one: http://www.singular.uni-kl.de:8002/trac/ticket/727 (it is possible that these two tickets are duplicates)

@kiwifb
Copy link
Member

kiwifb commented Nov 14, 2016

comment:14

Replying to @jdemeyer:

So, we should just wait for 4.0.3p5?

4.0.3p6. 4.0.3p5 is already out (I have been using it in sage-on-gentoo for a few days already).

@jpflori
Copy link

jpflori commented Nov 14, 2016

comment:15

Or 4.1.0 as it seems upstream is preparing for it.

@jpflori
Copy link

jpflori commented Nov 15, 2016

@jpflori
Copy link

jpflori commented Nov 17, 2016

@kiwifb
Copy link
Member

kiwifb commented Nov 17, 2016

comment:18

There isn't a matching "share" tarball, is this expected?

@kiwifb
Copy link
Member

kiwifb commented Nov 17, 2016

comment:19

Must still be coming otherwise we are without singular.hlp unless we can build it without trouble.

@kiwifb
Copy link
Member

kiwifb commented Nov 17, 2016

comment:20

Found it, hiding in the doc folder there is a doc.tbz2 file which seems to have all the useful content of share tarball, including singular.hlp.

@kiwifb
Copy link
Member

kiwifb commented Nov 17, 2016

comment:21

OK we need to stop the madness about singular.hlp anyway. In 4.0+ it is naturally installed in $prefix/share/info as part of the building process (this is a info file with a funny extension). And singular.idx is installed in $prefix/share/singular without it having to be done by spkg-install as well.

So that part of spkg-install should disappear anyway and we should amend the location of singular.hlp in sage/interfaces/singular.py.

@jpflori
Copy link

jpflori commented Nov 17, 2016

comment:22

Great! and no need to repackage the upstream tarball!!!

@kiwifb
Copy link
Member

kiwifb commented Nov 17, 2016

comment:23

I think we will be able to just use vanilla upstream - no more spkg-src yeah! I doing some building and testing on sage-on-gentoo to see if we have any new breakages. I'll probably report in a couple of hours.

@kiwifb
Copy link
Member

kiwifb commented Nov 17, 2016

comment:24

The content of the doc.tbz2 has the wrong permissions, not an issue for sage (unless installed as root) but it is becoming one for me (files are 640 and folders 651 instead of 644 and 655).

@kiwifb
Copy link
Member

kiwifb commented Nov 18, 2016

comment:25

Got a lot of failures going to 4.1.0. Some will be easy, other will need work again.

File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 103, in sage.interfaces.singular
Failed example:
    g = f.sage(); g
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 501, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 864, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.singular[8]>", line 1, in <module>
        g = f.sage(); g
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/interface.py", line 1020, in sage
        return self._sage_(*args, **kwds)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1940, in _sage_
        return self.sage_poly(R)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1707, in sage_poly
        R = self.sage_global_ring()
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1586, in sage_global_ring
        q = ZZ(charstr[0])
      File "sage/structure/parent.pyx", line 953, in sage.structure.parent.Parent.__call__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/structure/parent.c:9841)
        return mor._call_(x)
      File "sage/structure/coerce_maps.pyx", line 110, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/structure/coerce_maps.c:4874)
        raise
      File "sage/structure/coerce_maps.pyx", line 105, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/structure/coerce_maps.c:4735)
        return C._element_constructor(x)
      File "sage/rings/integer.pyx", line 680, in sage.rings.integer.Integer.__init__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/rings/integer.c:5991)
        mpz_set_str_python(self.value, x, base)
      File "sage/rings/integer.pyx", line 6697, in sage.rings.integer.mpz_set_str_python (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/rings/integer.c:42335)
        raise TypeError("unable to convert %r to an integer" % s)
    TypeError: unable to convert 'QQ' to an integer
File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1158, in sage.interfaces.singular.Singular._tab_completion
Failed example:
    singular._tab_completion()
Expected:
    ['exteriorPower',
     ...
     'stdfglm']
Got:
    ['exteriorPower',
     'symmetricPower',
...
...
     'stdfglm',
     'flintZ']
File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1896, in sage.interfaces.singular.SingularElement._sage_
Failed example:
    singular('ringlist(basering)').sage()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 501, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 864, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.singular.SingularElement._sage_[9]>", line 1, in <module>
        singular('ringlist(basering)').sage()
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/interface.py", line 1020, in sage
        return self._sage_(*args, **kwds)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1948, in _sage_
        return [ f._sage_(R) for f in self ]
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1963, in _sage_
        R = R or self.sage_global_ring()
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1586, in sage_global_ring
        q = ZZ(charstr[0])
      File "sage/structure/parent.pyx", line 953, in sage.structure.parent.Parent.__call__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/structure/parent.c:9841)
        return mor._call_(x)
      File "sage/structure/coerce_maps.pyx", line 110, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/structure/coerce_maps.c:4874)
        raise
      File "sage/structure/coerce_maps.pyx", line 105, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/structure/coerce_maps.c:4735)
        return C._element_constructor(x)
      File "sage/rings/integer.pyx", line 680, in sage.rings.integer.Integer.__init__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/rings/integer.c:5991)
        mpz_set_str_python(self.value, x, base)
      File "sage/rings/integer.pyx", line 6697, in sage.rings.integer.mpz_set_str_python (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/rings/integer.c:42335)
        raise TypeError("unable to convert %r to an integer" % s)
    TypeError: unable to convert 'ZZ' to an integer
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/singular.py", line 1910, in sage.interfaces.singular.SingularElement._sage_
Failed example:
    singular('basering')
Expected:
    polynomial ring, over a domain, global ordering
    //   coeff. ring is : integer
    //   number of vars : 3
    //        block   1 : ordering lp
    //                  : names    x y z
    //        block   2 : ordering C
Got:
    polynomial ring, over a domain, global ordering
    //   coeff. ring is : ZZ
    //   number of vars : 3
    //        block   1 : ordering lp
    //                  : names    x y z
    //        block   2 : ordering C
File "/usr/lib64/python2.7/site-packages/sage/schemes/generic/algebraic_scheme.py", line 2776, in sage.schemes.generic.algebraic_scheme.AlgebraicScheme_subscheme_projective._forward_image
Failed example:
    f(X)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 501, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 864, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.schemes.generic.algebraic_scheme.AlgebraicScheme_subscheme_projective._forward_image[10]>", line 1, in <module>
        f(X)
      File "/usr/lib64/python2.7/site-packages/sage/schemes/projective/projective_morphism.py", line 341, in __call__
        return x._forward_image(self) #call subscheme eval
      File "/usr/lib64/python2.7/site-packages/sage/schemes/generic/algebraic_scheme.py", line 2917, in _forward_image
        G = L.groebner_basis() #eliminate
      File "sage/misc/cachefunc.pyx", line 2038, in sage.misc.cachefunc.CachedMethodCaller.__call__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/misc/cachefunc.c:10783)
        w = self._instance_call(*args, **kwds)
      File "sage/misc/cachefunc.pyx", line 1914, in sage.misc.cachefunc.CachedMethodCaller._instance_call (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/misc/cachefunc.c:10229)
        return self.f(self._instance, *args, **kwds)
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 3729, in groebner_basis
        gb = self._groebner_basis_libsingular("groebner", deg_bound=deg_bound, mult_bound=mult_bound, *args, **kwds)
      File "/usr/lib64/python2.7/site-packages/sage/libs/singular/standard_options.py", line 140, in wrapper
        return func(*args, **kwds)
      File "/usr/lib64/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.py", line 541, in _groebner_basis_libsingular
        S = groebner(self)
      File "sage/libs/singular/function.pyx", line 1323, in sage.libs.singular.function.SingularFunction.__call__ (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/libs/singular/function.cpp:15144)
        return call_function(self, args, ring, interruptible, attributes)
      File "sage/libs/singular/function.pyx", line 1516, in sage.libs.singular.function.call_function (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/libs/singular/function.cpp:17184)
        raise RuntimeError("error in Singular function call %r:\n%s"%
    RuntimeError: error in Singular function call 'groebner':
    not implemented for rings with rings as coeffients
    error occurred in or before standard.lib::stdhilb line 350: `    i = std(i, hi);`
    leaving standard.lib::stdhilb
    leaving standard.lib::groebner

And that last one is timing out.

@jpflori
Copy link

jpflori commented Nov 18, 2016

comment:26

I'm working on an update branch.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 22, 2016

Changed commit from a295b79 to b52c9a6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 22, 2016

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

b52c9a6Upstream patch for GB over rings.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 22, 2016

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

37e926fGracefully handle closing of stdin in Singular.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 22, 2016

Changed commit from b52c9a6 to 37e926f

@jpflori
Copy link

jpflori commented Dec 22, 2016

comment:44

The GB errors were due to my patch for GB computation over rings being incomplete. Now upstream patch is used.

The cmdline error happened because Singular does not like its stdin to be closed. Added a patch for that.

@kiwifb
Copy link
Member

kiwifb commented Dec 23, 2016

comment:45

I pulled the changes in the branch but the groebner patch had zero impact on multi_polynomial_ideal.py and the other doctest in the documentation. Still failing in the same way. Did you forget a bit?

@jpflori
Copy link

jpflori commented Dec 23, 2016

comment:46

Hum yeah, I can now rereproduce it... Not sure of what happened yesterday.

@jpflori
Copy link

jpflori commented Dec 23, 2016

comment:47

I think I got what happened yesterday: if I build Singular in debug mode I get no segfault :)

@jpflori
Copy link

jpflori commented Dec 23, 2016

comment:48

Back to gdb then...

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 23, 2016

Changed commit from 37e926f to efc51ca

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 23, 2016

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

091462cRemove backported patch as it needs further patching...
efc51caRevert "Stronger C typing for Singular ring order."

@jpflori
Copy link

jpflori commented Dec 23, 2016

comment:50

Should be ok now.
I reverted the backported patch for ringorder_t and the corresponding SAge changes as they are not necessary yet.
And we would need Singular/Singular@1ae6773 which does not apply as is to get rid the segfault introduced by the ringorder_t part.

@jpflori
Copy link

jpflori commented Dec 23, 2016

comment:51

I running the whole test suite right now but feel free to do it as well.

@jhpalmieri
Copy link
Member Author

comment:52

Works for me on OS X 10.12.

@kiwifb
Copy link
Member

kiwifb commented Dec 24, 2016

comment:53

The previously failing doctests are now passing. I am just doing a full run to be sure.

@kiwifb
Copy link
Member

kiwifb commented Dec 24, 2016

Reviewer: François Bissey

@kiwifb
Copy link
Member

kiwifb commented Dec 24, 2016

comment:54

Onward to the bots. Putting this as blocker as well.

@vbraun
Copy link
Member

vbraun commented Dec 26, 2016

Changed branch from public/singular410 to efc51ca

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

5 participants