Closed mkoeppe closed 3 years ago
Description changed:
---
+++
@@ -5,6 +5,8 @@
- Sage package built from https://github.com/mkoeppe/lrslib
- To test:
`make configure && eval ./configure $(./config.status --config) --enable-download-from-upstream-url && make lrslib`
+
+polymake 4.4 tarball: https://polymake.org/lib/exe/fetch.php/download/polymake-4.4-minimal.tar.bz2
Polymake 4.4 was released 2021-05-18, we are several releases behind:
- https://polymake.org/doku.php/news/release_4_4
The lrslib
issue with openmpi
is fixed (self-tests pass).
If i do export MAKE='make -j4'
before running sage -i -f polymake
, the compilation still eats all my CPU, though spkg-install.in
relies on sdh_make
.
Also, i have 6G free on my machine, and the compilation ends up with a No space left on device
. How much disk space is required to build and install polymake
?
Matthias linked it to SAGE_NUM_THREADS
, but it is might indeed be better to link it to what MAKE
sets. I am letting mine compile with 2 threads right now since 4 still ate through 10+Gb RAM.
use make -j4 polymake
, do not export MAKE. Time is high to drop sage -i
, it is an extra hassle.
Replying to @dimpase:
use
make -j4 polymake
, do not export MAKE. Time is high to dropsage -i
, it is an extra hassle.
But then, how to i run self tests ?
Polymake is huge, it's about as big as Sage, I think. Go figure.
Replying to @sagetrac-tmonteil:
Replying to @dimpase:
use
make -j4 polymake
, do not export MAKE. Time is high to dropsage -i
, it is an extra hassle.But then, how to i run self tests ?
SAGE_CHECK=yes make -j4 polymake
How do I link perl after having installed it with
cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp Term::ReadLine::Gnu JSON SVG MongoDB
?
I'm on a debian buster and don't know how to install polymake into sage.
Replying to @tscrim:
Matthias linked it to
SAGE_NUM_THREADS
, but it is might indeed be better to link it to whatMAKE
sets.
During build, SAGE_NUM_THREADS
is actually initialized from the MAKE setting.
See build/bin/sage-build-num-threads
and build/make/install
.
Replying to @kliem:
How do I link perl after having installed it with
cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp Term::ReadLine::Gnu JSON SVG MongoDB
?I'm on a debian buster and don't know how to install polymake into sage.
On Debian, you can just install the prerequisite packages listed in build/pkgs/perl_cpan_polymake_prereq/distros/debian.txt
Replying to @dimpase:
use
make -j4 polymake
, do not export MAKE. Time is high to dropsage -i
, it is an extra hassle.
The correct way to install an optional package is, of course,
eval ./configure $(./config.status --config) --enable-jupymake && make build
Replying to @mkoeppe:
Replying to @kliem:
How do I link perl after having installed it with
cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp Term::ReadLine::Gnu JSON SVG MongoDB
?I'm on a debian buster and don't know how to install polymake into sage.
On Debian, you can just install the prerequisite packages listed in
build/pkgs/perl_cpan_polymake_prereq/distros/debian.txt
Thanks. Well that requires root access, but I guess we have a nice IT so they'll do it.
That sage itself can be just installed without root access is a wonderful thing... (But they also have installed the generated list of recommended packages for me, which makes things a lot faster.)
I was able to build both packages (thank you Matthias for your help with this). However, there are issues with interfaces/polymake.py
(make sure you run sage -tp --optional=sage,polymake
). The biggest issue is that it doesn't even finish evaluating the first doctest:
polymake.eval('print foo;')
It timed out after running for 5 minutes.
I tried running this directly in my Sage shell, which it is still taking seemingly forever. I also tried C = polymake('cube(3)')
, which after I hit ctrl-c, any additional attempt to run the interface results in multiple errors of the form:
TypeError: argument should be integer or bytes-like object, not 'str'
Is this an issue with the interface? Is this something with polymake trying to do something for the first time? Something else?
The branch just has one commit that cleans up the interface file a bit.
New commits:
77bce1f | Cleaning up the interface file. |
Changed branch from u/mkoeppe/upgrade__lrslib_071a to u/tscrim/lrslib071a_polymake44_upgrade-27745
Sounds like you are testing the old pexpect version of the interface.
If you install package jupymake
, it will test the current version
No, I did not. Once I installed that, then it worked. Since that is a requirement to using the interface, I think we should have jupymake
as a dependency.
Now it is stuck on line 128:
p = polymake_expect.rand_sphere(4, 20, seed=5)
I guess we have to rewrite the interface file to remove all tests involving the old interface?
Actually, do we want to just scrap the pexpect interface altogether?
Replying to @tscrim:
No, I did not. Once I installed that, then it worked. Since that is a requirement to using the interface, I think we should have
jupymake
as a dependency.
jupymake can't be a dependency of polymake because it depends on polymake
Replying to @tscrim:
Now it is stuck on line 128:
p = polymake_expect.rand_sphere(4, 20, seed=5)
Here's how to debug this:
sage: from sage.interfaces.polymake import PolymakeExpect
sage: polymake = PolymakeExpect(logfile="POLYMAKE.log")
sage: polymake.rand_sphere(4, 20, seed=5)
Then, in a separate terminal, use tail -f POLYMAKE.log
There is indeed something going on with bytes vs strings.
Changed branch from u/tscrim/lrslib071a_polymake44_upgrade-27745 to u/mkoeppe/lrslib071a_polymake44_upgrade-27745
Branch pushed to git repo; I updated commit sha1. New commits:
332b72f | src/sage/interfaces/polymake.py: Disable minkowski_sum_fukuda test, which seems to take forever with polymake 4.4 |
More fixes are needed
Thank you. That has gotten it down to one failure for me:
**********************************************************************
File "src/sage/interfaces/polymake.py", line 2098, in sage.interfaces.polymake.PolymakeExpect._eval_line
Failed example:
c.N_VERTICES # optional - polymake
Expected:
32768
Got:
Can't locate object method "description" via package "32768" (perhaps you forgot to load "32768"?) at input line 1.
However, I cannot reproduce this in an interactive session, so it is probably something with the doctester setup. I propose marking it as # known bug
with an explanation that it works interactively if it is failing for someone else.
Yes, there's something wrong with error recovery still.
For me, also src/sage/geometry/polyhedron/backend_polymake.py
reveals additional errors. So there's more work
Thanks for the help above. So I have polymake installed now and it works in sage -sh
.
However, I'm getting an EOF error whenever I want to do something in sage, e.g. `polytopes.cube(backend='polymake').
TypeError: unable to start polymake: End Of File (EOF). Exception style platform.
Polymake with PID 27045 running /usr/bin/env TERM=dumb polymake
command: /usr/bin/env
args: ['/usr/bin/env', 'TERM=dumb', 'polymake']
buffer (last 100 chars): b''
before (last 100 chars): b'dLine::Gnu" at /srv/public/kliem/sage/local/share/polymake/perllib/Polymake/Core/Shell.pm line 30.\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 27045
child_fd: 16
closed: False
timeout: None
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 4194304
ignorecase: False
searchwindowsize: None
delaybeforesend: None
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile(b'polytope > ')
Replying to @kliem:
However, I'm getting an EOF error whenever I want to do something in sage, e.g. `polytopes.cube(backend='polymake').
in sage.interfaces.polymake
we have both polymake_expect
and polymake_jupymake
so which one is used in polytopes.cube(backend='polymake')
?
How to tell sage
I always want polymake_jupymake
for every something(backend='polymake')
?
oh I see
if PythonModule("JuPyMake").is_present():
polymake = polymake_jupymake
else:
polymake = polymake_expect
For me it is PolymakeExpect
apparently.
Branch pushed to git repo; I updated commit sha1. New commits:
426385d | Polyhedra: Raise an error if backend 'polymake' is used with an unsupported field |
Branch pushed to git repo; I updated commit sha1. New commits:
29c267b | Polyhedron_polymake: Implement pickling |
With jupymake
installed, ./sage -t --optional=sage,polymake,jupymake,perl_mongodb src/sage/geometry/polyhedron/backend_polymake.py
now is down to 1 failure:
sage -t --random-seed=0 src/sage/geometry/polyhedron/backend_polymake.py
**********************************************************************
File "src/sage/geometry/polyhedron/backend_polymake.py", line 220, in sage.geometry.polyhedron.backend_polymake.Polyhedron_polymake.__init__
Failed example:
TestSuite(p).run() # optional - polymake
Expected nothing
Got:
Failure in _test_lawrence:
Traceback (most recent call last):
File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/src/sage/misc/sage_unittest.py", line 297, in run
test_method(tester=tester)
File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/src/sage/geometry/polyhedron/base.py", line 6312, in _test_lawrence
tester.assertTrue(Q.is_combinatorially_isomorphic(R))
File "/usr/local/Cellar/python@3.9/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/case.py", line 682, in assertTrue
raise self.failureException(msg)
AssertionError: False is not true
------------------------------------------------------------
The following tests failed: _test_lawrence
**********************************************************************
1 item had failures:
1 of 7 in sage.geometry.polyhedron.backend_polymake.Polyhedron_polymake.__init__
[91 tests, 1 failure, 27.73 s]
----------------------------------------------------------------------
sage -t --random-seed=0 src/sage/geometry/polyhedron/backend_polymake.py # 1 doctest failed
----------------------------------------------------------------------
Same without jupymake
.
Help with the lawrence testcase would be welcome...
Branch pushed to git repo; I updated commit sha1. New commits:
b4366f1 | PolymakeElement._sage_, Polyhedron_polymake._from_polymake_polytope: Determine the base ring |
lrslib is now at 071b.
make configure && eval ./configure $(./config.status --config) --enable-download-from-upstream-url && make lrslib
polymake 4.4 tarball: https://polymake.org/lib/exe/fetch.php/download/polymake-4.4-minimal.tar.bz2
Polymake 4.4 was released 2021-05-18, we are several releases behind:
For updated instructions regarding the Perl prerequisites, see #31830. Let's keep that a separate ticket.
CC: @slel @yuan-zhou @kliem @videlec @kiwifb @dimpase @simon-king-jena
Component: packages: optional
Keywords: upgrade, lrslib
Author: Matthias Koeppe, Jonathan Kliem, Travis Scrimshaw
Branch/Commit:
ff69f28
Reviewer: Thierry Monteil, Matthias Koeppe, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/27745