Sage: Ticket #10039: Make Parma Polyhedra Library a standard library
https://trac.sagemath.org/ticket/10039
<p>
The Parma Polyhedra Library (ppl) is for many workloads the fastest library for polyhedral computations. It is also high-quality code, for example GCC uses it (optionally) to optimize loops.
</p>
<ul><li>ppl has already been widely tested on a multitude of platforms.
</li><li>Native C++ with a pure C interface.
</li><li>Contains a huge testsuite _and_ passes its own testsuite (in contrast to some other polydedral library that shall remain unnamed)
</li></ul><p>
Official webpage: <a class="ext-link" href="http://www.cs.unipr.it/ppl/"><span class="icon"></span>http://www.cs.unipr.it/ppl/</a>
</p>
<p>
My plan is to
</p>
<ol><li>Create a PPL spkg.
</li><li>Write a Cython interface.
</li><li>Base <code>sage.geometry.cone.Cone</code> on PPL instead of <code>Polyhedron/cddlib</code>
</li><li>Split <code>sage.geometry.polyhedra.Polyhedron</code> into an abstract base class and derived classes that use different polyhedral computation libraries.
</li></ol><p>
Current status:
</p>
<ol><li>My cython wrapper for PPL is attached. It has full doctest coverage and any invalid input is caught and raises <code>ValueError</code>.
</li><li>Is split off into trac <a class="closed ticket" href="https://trac.sagemath.org/ticket/10140" title="enhancement: Base sage.geometry.cone on the Parma Polyhedra Library (PPL) (closed: fixed)">#10140</a>.
</li></ol><p>
For convenience I mirrored the reference manual page here: <a class="ext-link" href="http://www.stp.dias.ie/~vbraun/Sage/html/en/reference/sage/libs/ppl.html"><span class="icon"></span>http://www.stp.dias.ie/~vbraun/Sage/html/en/reference/sage/libs/ppl.html</a>
</p>
<p>
To apply this ticket:
</p>
<ul><li>download the new spkg <a class="ext-link" href="http://boxen.math.washington.edu/home/jdemeyer/spkg/ppl-0.11.2.spkg"><span class="icon"></span>http://boxen.math.washington.edu/home/jdemeyer/spkg/ppl-0.11.2.spkg</a>
</li><li>copy the spkg to <code>$SAGE_ROOT/spkg/standard</code>
</li><li>apply <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/10039/trac_10039_parma_polyhedra_library.patch" title="Attachment 'trac_10039_parma_polyhedra_library.patch' in Ticket #10039">trac_10039_parma_polyhedra_library.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/10039/trac_10039_parma_polyhedra_library.patch" title="Download"></a> to the Sage library
</li><li>apply <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/10039/trac_10039_ppl_fix_extremize.patch" title="Attachment 'trac_10039_ppl_fix_extremize.patch' in Ticket #10039">trac_10039_ppl_fix_extremize.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/10039/trac_10039_ppl_fix_extremize.patch" title="Download"></a> to the Sage library
</li><li>apply <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/10039/10039_manifest.patch" title="Attachment '10039_manifest.patch' in Ticket #10039">10039_manifest.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/10039/10039_manifest.patch" title="Download"></a> to the Sage library
</li><li>apply <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/10039/trac_10039_root_repo.patch" title="Attachment 'trac_10039_root_repo.patch' in Ticket #10039">trac_10039_root_repo.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/10039/trac_10039_root_repo.patch" title="Download"></a> the sage root repository
</li><li>apply <a class="attachment" href="https://trac.sagemath.org/attachment/ticket/10039/trac_10039_SAGE_LOCAL_bin_repo.patch" title="Attachment 'trac_10039_SAGE_LOCAL_bin_repo.patch' in Ticket #10039">trac_10039_SAGE_LOCAL_bin_repo.patch</a><a class="trac-rawlink" href="https://trac.sagemath.org/raw-attachment/ticket/10039/trac_10039_SAGE_LOCAL_bin_repo.patch" title="Download"></a> to the <code>$SAGE_LOCAL/bin</code> repository
</li></ul><p>
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/10039
Trac 1.1.6mhamptonThu, 30 Sep 2010 16:35:08 GMT
https://trac.sagemath.org/ticket/10039#comment:1
https://trac.sagemath.org/ticket/10039#comment:1
<p>
Rather than retire cddlib, it would be better I think to have cddlib as an optional backend, along with lrs. If ppl is consistently better than those then it could be the default.
</p>
TicketnovoseltFri, 01 Oct 2010 05:28:46 GMT
https://trac.sagemath.org/ticket/10039#comment:2
https://trac.sagemath.org/ticket/10039#comment:2
<p>
If there will be a Cython interface to PPL, it definitely should become the default backend as it must be drastically faster on simple cases then the current situation. And for "complicated" cases users should be willing to spend some time to learn about advantages of different systems and pick the right one, if speed becomes an issue.
</p>
TicketmhamptonFri, 01 Oct 2010 20:08:38 GMT
https://trac.sagemath.org/ticket/10039#comment:3
https://trac.sagemath.org/ticket/10039#comment:3
<p>
This package installed fine on Kubuntu 10.04 and OS X 10.6. It does take a while to compile - 10 minutes on the first machine and 15 on the other.
</p>
TicketvbraunFri, 01 Oct 2010 23:59:31 GMT
https://trac.sagemath.org/ticket/10039#comment:4
https://trac.sagemath.org/ticket/10039#comment:4
<p>
Yes, templated C++ code is really giving the compiler something to do.
</p>
<p>
But if you think thats slow then don't run the testsuite (SAGE_CHECK=yes)...
</p>
TicketmhamptonSat, 02 Oct 2010 00:34:25 GMT
https://trac.sagemath.org/ticket/10039#comment:5
https://trac.sagemath.org/ticket/10039#comment:5
<p>
One reason I gave up any hope of making polymake standard was the compilation time; it was one reason I began writing polyhedra.py instead of improving the polymake interface.
</p>
<p>
Are there many things in PPL that go beyond cddlib? I am having trouble wading through their documentation so its unclear to me.
</p>
TicketvbraunSun, 10 Oct 2010 19:30:16 GMTdescription, summary changed; cc set
https://trac.sagemath.org/ticket/10039#comment:6
https://trac.sagemath.org/ticket/10039#comment:6
<ul>
<li><strong>cc</strong>
<em>novoselt</em> added
</li>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=6">diff</a>)
</li>
<li><strong>summary</strong>
changed from <em>Make Parma Polyhedra Library a standard package</em> to <em>Make Parma Polyhedra Library a standard library</em>
</li>
</ul>
TicketnovoseltSun, 10 Oct 2010 23:17:12 GMT
https://trac.sagemath.org/ticket/10039#comment:7
https://trac.sagemath.org/ticket/10039#comment:7
<p>
I read the module documentation and it looks quite nice, although the PPL interface and their documentation do not seem to be very clear to an unfamiliar user (as Marshall has already noted above). So if eventually Sage front-end is structured more like current geometric classes, it would be better - I guess that's exactly your plan in 4.
</p>
<p>
Can PPL compute integral points inside a bounded polytope?
</p>
TicketvbraunMon, 11 Oct 2010 11:35:20 GMT
https://trac.sagemath.org/ticket/10039#comment:8
https://trac.sagemath.org/ticket/10039#comment:8
<p>
Just to be clear, the PPL wrapper is not going to be exposed to the end user by default. She/he is supposed to use the higher-level <code>Polyhedron</code> and <code>Cone</code> classes.
</p>
<p>
The PPL sports grids (lattices defined through generators or congruences) and a MIP solver but, as far as I know, no function that directly enumerates grid points (i.e. the intersection of a grid with a polyhedron). Though it probably would not be too difficult to write one with these building blocks. In any case, I haven't cython-wrapped grids or MIPs so far.
</p>
TicketvbraunThu, 14 Oct 2010 21:25:48 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:9
https://trac.sagemath.org/ticket/10039#comment:9
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=9">diff</a>)
</li>
</ul>
TicketvbraunSun, 17 Oct 2010 21:03:00 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:10
https://trac.sagemath.org/ticket/10039#comment:10
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=10">diff</a>)
</li>
</ul>
TicketmhansenMon, 18 Oct 2010 07:01:04 GMT
https://trac.sagemath.org/ticket/10039#comment:11
https://trac.sagemath.org/ticket/10039#comment:11
<p>
This does build successfully on Cygwin, but it does take _quite_ awhile:
</p>
<pre class="wiki">real 346m56.531s
user 22m33.908s
sys 26m33.122s
Successfully installed ppl-0.11.p0
</pre>
TicketvbraunMon, 18 Oct 2010 09:46:47 GMT
https://trac.sagemath.org/ticket/10039#comment:12
https://trac.sagemath.org/ticket/10039#comment:12
<p>
I take it you are not running the test suite? That one is quite extensive...
</p>
<p>
The 22 minutes in user space could be realistic for a slow machine. The 26min is sys is a bit suspicious, are you running on swap? But the real question is, why did your computer spend 6h walltime for 40 minutes of work?
</p>
<p>
I just tried the ppl spkg in an opensolaris virtual machine (single core) and it takes about 7 minutes walltime, 5m user, 1m sys.
</p>
TicketvbraunMon, 18 Oct 2010 13:09:11 GMT
https://trac.sagemath.org/ticket/10039#comment:13
https://trac.sagemath.org/ticket/10039#comment:13
<p>
I've removed all language interfaces (except the native C++), this shaves off a few minutes. Now on my Fedora 13 box normal compilation takes 1 minute and the testsuite 20 minutes:
</p>
<pre class="wiki">[vbraun@volker-desktop spkg]$ /usr/bin/time sage -f ppl-0.11.p0.spkg
...
35.84user 17.68system 1:02.23elapsed 86%CPU (0avgtext+0avgdata 229008maxresident)k
4240inputs+1152096outputs (37major+5069087minor)pagefaults 0swaps
</pre><p>
Testing:
</p>
<pre class="wiki">[vbraun@volker-desktop ~]$ SAGE_CHECK=yes time sage -f ppl-0.11.p0.spkg
...
771.04user 281.70system 20:37.31elapsed 85%CPU (0avgtext+0avgdata 453712maxresident)k
13710920inputs+46999048outputs (91major+76885818minor)pagefaults 0swaps
</pre>
TicketdrkirkbyTue, 19 Oct 2010 21:57:54 GMT
https://trac.sagemath.org/ticket/10039#comment:14
https://trac.sagemath.org/ticket/10039#comment:14
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/10039#comment:11" title="Comment 11">mhansen</a>:
</p>
<blockquote class="citation">
<p>
This does build successfully on Cygwin, but it does take _quite_ awhile:
</p>
<pre class="wiki">real 346m56.531s
user 22m33.908s
sys 26m33.122s
Successfully installed ppl-0.11.p0
</pre></blockquote>
<p>
That sure is a long time. I think it's because autoconf scripts takes ages on Cygwin, because Windows has no fork.
</p>
<p>
On my Sun Ultra 27, it takes less than 82 seconds to install.
</p>
<pre class="wiki">real 1m21.460s
user 4m6.543s
sys 0m27.474s
Successfully installed ppl-0.11.p0
Now cleaning up tmp files.
Making Sage/Python scripts relocatable...
Making script relocatable
Finished installing ppl-0.11.p0.spkg
</pre><p>
However, it fails the test suite. To be more precise, the tests it runs pass, but it fails to build some of the code needed for the tests.
</p>
<p>
I'm not sure what the gcc option <code>-W</code> is supposed to do. According to the gcc manual <code>-w</code> (lower case) is to suppress all warnings. If <code>-W</code> does the same as <code>-w</code>, then it seems the code tries to supporess the warnings, then enable them, which seems a bit illogical. But I can't find out exactly what <code>-W</code> is supposed to do.
</p>
<p>
BTW, this should be called ppl-0.11 and not ppl-0.11.p0. Only once a version has appeared in Sage, and patches have been applied, should it be called .p0.
</p>
<p>
A couple more points.
</p>
<ul><li>There is no code to handle 64-bit builds on platforms where SAGE64=yes. It needs something like this:
<pre class="wiki"> if [ "x$CFLAG64" = x ]; then
CFLAG64=-m64
fi
# If the environment variable SAGE64=yes, force building a 64-bit version:
if [ "x$SAGE64" = xyes ]; then
echo "Building a 64-bit version of ppl"
CC="$CC $CFLAG64"
export CC
fi
</pre></li></ul><p>
That needs to be in both spkg-install and spkg-check.
</p>
<ul><li>I don't think <em>Unpack distribution into src/ directory</em> needs to be in the <code>Special Update/Build Instructions</code> section, as that is the same with every single package.
</li></ul><p>
</p>
<ul><li>I would start <code>spkg-check</code> with <code>#!/usr/bin/env bash</code> to be consistent. That said, there's nothing there which should not work with any half-reasonable shell.
</li></ul><ul><li>It would be better to use <code>$MAKE</code> in <code>spkg-check</code> so the tests can be run in parallel too, which should speed things up a lot.
</li></ul>
TicketdrkirkbyTue, 19 Oct 2010 22:00:43 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>ppl-0.11.p0.log</em>
</li>
</ul>
<p>
Log showing how some of the test code failed to build when SPKG_CHECK=yes. Without that, it builds OK in < 82 seconds. This is on a Sun Ultra 27 running <a class="missing wiki">OpenSolaris?</a> 06/2009
</p>
TicketvbraunWed, 20 Oct 2010 14:46:18 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:15
https://trac.sagemath.org/ticket/10039#comment:15
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=15">diff</a>)
</li>
</ul>
<p>
The testsuite fails on Solaris gcc 4.5.0, most likely due to a gcc bug. For reference, the real error is
</p>
<pre class="wiki">interval1.cc:76:3: error: no matching function for call to 'Parma_Polyhedra_Library::Interval<float, Parma_Polyhedra_Library::Interval_Restriction_None<Parma_Polyhedra_Library::Interval_Info_Bitset<unsigned int, <unnamed>::My_Interval<float>::Floating_Point_Real_Interval_Info_Policy> > >::join_assign(double)'
interval1.cc:194:3: instantiated from here
</pre><p>
Everything should work fine with gcc 4.5.1. In particular, I could compile and run the testsuite on <a class="missing wiki">OpenSolaris?</a>/i386 with gcc 4.5.1. Also note that the offending floating point code is currently not used in the Cython wrapper. A similar bug report is here: <a class="ext-link" href="https://www.cs.unipr.it/mantis/view.php?id=110"><span class="icon"></span>https://www.cs.unipr.it/mantis/view.php?id=110</a>
</p>
<p>
About the <code>-W</code>, the gcc manual says:
</p>
<blockquote class="citation">
<p>
-Wextra: This enables some extra warning flags that are not enabled by -Wall. (This option used to be called -W. The older name is still supported, but the newer name is more descriptive.)
</p>
</blockquote>
<p>
I have addressed the other issues that you raised. The updated spgk is here:
</p>
<p>
<a class="ext-link" href="http://www.stp.dias.ie/~vbraun/Sage/spkg/ppl-0.11.spkg"><span class="icon"></span>http://www.stp.dias.ie/~vbraun/Sage/spkg/ppl-0.11.spkg</a>
</p>
TicketvbraunWed, 20 Oct 2010 17:24:13 GMT
https://trac.sagemath.org/ticket/10039#comment:16
https://trac.sagemath.org/ticket/10039#comment:16
<p>
Sorry, I was too quick. The testsuite does not like "MAKE=make -j8", there is a missing shell escape. So I'll leave it at "make check" in the <code>spkg-check</code> for now. I've reported this upstream at <a class="ext-link" href="https://www.cs.unipr.it/mantis/view.php?id=118"><span class="icon"></span>https://www.cs.unipr.it/mantis/view.php?id=118</a>
</p>
<p>
I'm also getting the testsuite "no matching function call" from Opensolaris/gcc 4.5.1.
</p>
TicketvbraunWed, 20 Oct 2010 20:58:44 GMT
https://trac.sagemath.org/ticket/10039#comment:17
https://trac.sagemath.org/ticket/10039#comment:17
<p>
I have patched out the PPL testsuite for Box<>, BD_Shape<>, and Octagonal_Shape<>. I think these templated classes are newer and not as well-tested. Note that the polyhedron code does not use templates. In any case, they are not currently exposed by the Cython wrapper and they don't provide any functionality that we need in the near future.
</p>
<p>
The updated spgk now compiles a) in parallel and b) under Solaris/gcc 4.5.1 without errors, including the testsuite.
</p>
<p>
As usual, get it here: <a class="ext-link" href="http://www.stp.dias.ie/~vbraun/Sage/spkg/ppl-0.11.spkg"><span class="icon"></span>http://www.stp.dias.ie/~vbraun/Sage/spkg/ppl-0.11.spkg</a>
</p>
TicketnovoseltThu, 21 Oct 2010 01:14:37 GMT
https://trac.sagemath.org/ticket/10039#comment:18
https://trac.sagemath.org/ticket/10039#comment:18
<p>
Some notes based on the posted documentation:
</p>
<ol><li>"Note that, by convention, every polyhedron must contain a point" can be clarified a little that only generator systems containing a point may define a polyhedron, since there is no point issue in defining a polyhedron by a constraint system. (I would also add that it is natural to think about "just rays" as starting at the origin, but since your goal is to wrap PPL as closely as possible, it is not your design decision.)
</li><li>In the documentation of <code>Generator</code> I see "frac"s instead of fractions.
</li><li><code>add_space_dimensions_and_embed</code> and <code>add_space_dimensions_and_project</code> - I think you want <code>(x,y)\in P</code>, not <code>R^2</code>. Also the top of the documentation for "project" still says "embed". (I also find names confusing, but I guess that's how PPL calls them.)
</li><li>Why <code>affine_dimension</code> of the empty polyhedron is 0? Shouldn't it be -1 to distinguish it from points?
</li><li>Am I right that "concatenating" polyhedra means taking their Cartesian product? Perhaps, it is a simpler explanation than in <code>concatenate_assign</code>?
</li><li><code>contains_integer_point</code> has wrong documentation description about being bounded.
</li><li>I don't understand what exactly is done by <code>drop_some_non_integer_points</code>.
</li><li><code>frequency</code> does not have documentation.
</li><li>Is it necessary to have <code>hash_code</code>, especially if it only returns the dimension? My concern is that it can be confusing how it is related to standard <code>hash</code> in Python, also it seems strange to use it for mutable objects (again, because that's not how things work in Python). If this function is not used anywhere, I would suggest removing it.
</li><li>I got upset when I read in the documentation of <code>max_space_dimension</code> that it is bounded, but the doctest immediately made me happy ;-)
</li><li><code>clear_mpz_globals</code>, <code>gmp_randrange</code>, <code>init_mpz_globals</code> have no documentation.
</li></ol>
TicketvbraunThu, 21 Oct 2010 19:37:40 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:19
https://trac.sagemath.org/ticket/10039#comment:19
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
</ul>
<p>
I fixed the documentation according to your suggestions.
</p>
<blockquote class="citation">
<ol start="4"><li>Why <code>affine_dimension</code> of the empty polyhedron is 0? Shouldn't it be -1 to distinguish it from points?
</li></ol></blockquote>
<p>
The internal representation of dimensions is an unsigned int. So PPL returns 0 instead of something negative. Using signed integer would half the <code>max_space_dimension()</code> ;-)
</p>
<blockquote class="citation">
<ol start="5"><li>Am I right that "concatenating" polyhedra means taking their Cartesian product? Perhaps, it is a simpler explanation than in <code>concatenate_assign</code>?
</li></ol></blockquote>
<p>
Yes. I just copy/pasted the C++ documentation. I've added a line that this is the Cartesian product.
</p>
<blockquote class="citation">
<ol start="7"><li>I don't understand what exactly is done by <code>drop_some_non_integer_points</code>.
</li></ol></blockquote>
<p>
All that is guaranteed is that the result is non-strictly contained in the original polyhedron and that integral vertices survive. Its not the most useful function, but it is there and was easy to wrap ;-)
</p>
<blockquote class="citation">
<ol start="8"><li><code>frequency</code> does not have documentation.
</li></ol></blockquote>
<p>
I removed this one, it is only useful for grids (spanned lattices / congruences).
</p>
<blockquote class="citation">
<ol start="9"><li>Is it necessary to have <code>hash_code</code>, especially if it only returns the dimension? My concern is that it can be confusing how it is related to standard <code>hash</code> in Python, also it seems strange to use it for mutable objects (again, because that's not how things work in Python). If this function is not used anywhere, I would suggest removing it.
</li></ol></blockquote>
<p>
Removed.
</p>
<blockquote class="citation">
<ol start="10"><li>I got upset when I read in the documentation of <code>max_space_dimension</code> that it is bounded, but the doctest immediately made me happy ;-)
</li></ol></blockquote>
<p>
Yes, should be enough for most applications ;)
</p>
<blockquote class="citation">
<ol start="11"><li><code>clear_mpz_globals</code>, <code>gmp_randrange</code>, <code>init_mpz_globals</code> have no documentation.
</li></ol></blockquote>
<p>
I didn't define these, they were imported from <code>gmp.pxi</code> and sphinx adds them to the documentation for some reason. Anyways, importing <code>gmp.pxi</code> is not necessary so I removed it.
</p>
TicketjdemeyerSun, 07 Nov 2010 12:18:24 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:20
https://trac.sagemath.org/ticket/10039#comment:20
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
I have tried building with the new spkg and sagelib patch, but I get the following error:
</p>
<pre class="wiki">Building modified file sage/libs/pari/gen.pyx.
Traceback (most recent call last):
File "setup.py", line 855, in <module>
queue = compile_command_list(ext_modules, deps)
File "setup.py", line 815, in compile_command_list
dep_file, dep_time = deps.newest_dep(f)
File "setup.py", line 722, in newest_dep
for f in self.all_deps(filename):
File "setup.py", line 703, in all_deps
for f in self.immediate_deps(filename):
File "setup.py", line 685, in immediate_deps
self._deps[filename] = self.parse_deps(filename)
File "setup.py", line 675, in parse_deps
raise IOError, "could not find dependency %s included in %s."%(path, filename)
IOError: could not find dependency ../../local/include/ppl.hh included in sage/libs/ppl.pyx.
sage: There was an error installing modified sage library code.
ERROR installing SAGE
</pre>
TicketvbraunMon, 08 Nov 2010 02:51:20 GMTstatus, cc, description changed
https://trac.sagemath.org/ticket/10039#comment:21
https://trac.sagemath.org/ticket/10039#comment:21
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
<li><strong>cc</strong>
<em>jdemeyer</em> added
</li>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=21">diff</a>)
</li>
</ul>
<p>
Is <code>SAGE_LOCAL!=SAGE_ROOT/local</code> in your install? It should work in either case, of course. I looked into how cython discovers the dependencies and the problem is that the <code>setup.py</code> expects the extension "<code>.h</code>" for C/C++ headers. But PPL uses <code>ppl.hh</code>. I fixed the dependency discovery for cython in <a class="closed ticket" href="https://trac.sagemath.org/ticket/10233" title="defect: Incomplete cython search path in setup.py (closed: fixed)">#10233</a>, which is a new prerequisite for this patch.
</p>
<p>
I also changed the ppl wrapper (this ticket) to rely on the search path instead of <code>cdef extern from "../../local/include/ppl.hh"</code>, which I probably should have done from the beginning.
</p>
TicketjdemeyerMon, 08 Nov 2010 10:35:49 GMT
https://trac.sagemath.org/ticket/10039#comment:22
https://trac.sagemath.org/ticket/10039#comment:22
<p>
If you want to make your package a <strong>standard</strong> package, you also need to patch <code>spkg/install</code> and <code>spkg/standard/deps</code> (most likely, that explains my error, your package simply wasn't installed).
</p>
TicketjdemeyerMon, 08 Nov 2010 10:37:27 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:23
https://trac.sagemath.org/ticket/10039#comment:23
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
TicketdrkirkbyMon, 08 Nov 2010 22:09:31 GMT
https://trac.sagemath.org/ticket/10039#comment:24
https://trac.sagemath.org/ticket/10039#comment:24
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/10039#comment:22" title="Comment 22">jdemeyer</a>:
</p>
<blockquote class="citation">
<p>
If you want to make your package a <strong>standard</strong> package, you also need to patch <code>spkg/install</code> and <code>spkg/standard/deps</code> (most likely, that explains my error, your package simply wasn't installed).
</p>
</blockquote>
<p>
Any attempt to make a package standard would need discussion on sage-devel - which basically means William would have to agree to it. And I know William is not keen on adding too many standard packages. That's not to say he would not make it standard, but whereas a year or two ago virtually anything could become standard, that is no longer so.
</p>
<p>
Dave
</p>
TicketvbraunTue, 09 Nov 2010 01:07:08 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:25
https://trac.sagemath.org/ticket/10039#comment:25
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
<p>
I'll attach updated <code>spkg/install</code> and <code>spkg/standard/deps</code> files. The only dependency is mpir, so its pretty simple.
</p>
<p>
I did start a discussion thread on sage-devel about making it a standard spkg here:
<a class="ext-link" href="http://groups.google.com/group/sage-devel/browse_frm/thread/46e4363245607218"><span class="icon"></span>http://groups.google.com/group/sage-devel/browse_frm/thread/46e4363245607218</a>
Nobody objected and Andrey, Dima, Marshall, and I were in favor.
</p>
TicketvbraunTue, 09 Nov 2010 01:10:09 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>spkg-install.patch</em>
</li>
</ul>
<p>
diff for spkg/install
</p>
TicketvbraunSun, 14 Nov 2010 20:37:15 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>install</em>
</li>
</ul>
<p>
Updated spkg-install for sage-4.6.alpha1
</p>
TicketfbisseyMon, 15 Nov 2010 11:07:28 GMT
https://trac.sagemath.org/ticket/10039#comment:26
https://trac.sagemath.org/ticket/10039#comment:26
<p>
I think there are a few more things to do for it to be standard sage material.
In module_list.py you may want to do a bit more:
</p>
<pre class="wiki">Extension('sage.libs.ppl',
sources = ['sage/libs/ppl.pyx', 'sage/libs/ppl_shim.cc'],
libraries = ['ppl', 'gmpxx', 'gmp', 'm'],
language="c++",
depends = [SAGE_LOCAL + "/include/ppl.hh"]),
</pre><p>
In your wrapper sage/libs/ppl.pyx, ../../local/include/ppl.hh should be simplified
to ppl.hh, same for everything else that has ../../local/include, setup.py knows to
include this folder. You only needs to add things if it is in a sub-folder and then
you do that by adding an include line in module_list.py.
</p>
TicketdrkirkbyMon, 15 Nov 2010 11:24:36 GMT
https://trac.sagemath.org/ticket/10039#comment:27
https://trac.sagemath.org/ticket/10039#comment:27
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/10039#comment:25" title="Comment 25">vbraun</a>:
</p>
<blockquote class="citation">
<p>
I did start a discussion thread on sage-devel about making it a standard spkg here:
<a class="ext-link" href="http://groups.google.com/group/sage-devel/browse_frm/thread/46e4363245607218"><span class="icon"></span>http://groups.google.com/group/sage-devel/browse_frm/thread/46e4363245607218</a>
Nobody objected and Andrey, Dima, Marshall, and I were in favor.
</p>
</blockquote>
<p>
I think you should get William's approval too. I very much doubt it should be standard without being optional first. There's a ticket open to clarify that, but I can't be bothered to look for it now.
</p>
<p>
Basically, getting a few people to agree to make it standard is not enough.
</p>
<p>
Dave
</p>
TicketmhamptonMon, 15 Nov 2010 12:26:53 GMT
https://trac.sagemath.org/ticket/10039#comment:28
https://trac.sagemath.org/ticket/10039#comment:28
<p>
The bar should be high for standard packages, but not unreasonably so. Don't make it difficult just so its difficult.
</p>
<p>
Most packages should be optional before being standard. But if a lot of functionality is tied to them being present, as is the case here, then that doesn't always make sense.
</p>
<p>
Cddlib would never make it as a standard package now. This is a big step towards being able to remove cddlib.
</p>
<p>
While William certainly has veto power, he did read that thread and did not object. At this point I think that after someone gives this a positive review, its up to the release manager at the time to make the call.
</p>
TicketvbraunMon, 15 Nov 2010 15:00:50 GMT
https://trac.sagemath.org/ticket/10039#comment:29
https://trac.sagemath.org/ticket/10039#comment:29
<p>
I renamed the include <code>../../local/include/ppl.hh</code> to <code>ppl.hh</code>. Note that the <code>ppl.pyx</code> now really depends on <a class="closed ticket" href="https://trac.sagemath.org/ticket/10233" title="defect: Incomplete cython search path in setup.py (closed: fixed)">#10233</a>, because the current <code>setup.py</code> does <strong>not</strong> know how to include <code>*.hh</code> headers.
</p>
<p>
I also added the explicit dependency on <code>SAGE_LOCAL+/include/ppl.hh</code>.
</p>
<p>
Last, I just want to point out that now is the time to add PPL. I've fixed all outstanding bugs in <code>Polyhedron</code> that can be fixed within the current framework, and to continue improving it we need PPL.
</p>
TicketvbraunMon, 15 Nov 2010 15:03:44 GMTcc changed
https://trac.sagemath.org/ticket/10039#comment:30
https://trac.sagemath.org/ticket/10039#comment:30
<ul>
<li><strong>cc</strong>
<em>fbissey</em> added
</li>
</ul>
TicketfbisseyMon, 15 Nov 2010 22:14:26 GMT
https://trac.sagemath.org/ticket/10039#comment:31
https://trac.sagemath.org/ticket/10039#comment:31
<p>
There was no need to cc me, I have been added automatically because I commented.
I didn't react immediately because I was sleeping (time zone GMT+12).
Anyway the patch looks good to me now, the dep file looks right as well.
I will probably include this in sage-on-gentoo in 4.6.1.alpha1 forward to give
it some coverage. I may have to request a revision bump of the version of ppl
shipped in gentoo first (currently shipping 0.10.2).
</p>
TicketfbisseySun, 21 Nov 2010 09:04:43 GMT
https://trac.sagemath.org/ticket/10039#comment:32
https://trac.sagemath.org/ticket/10039#comment:32
<p>
It has been noted in Gentoo (see <a class="ext-link" href="http://bugs.gentoo.org/show_bug.cgi?id=346173"><span class="icon"></span>http://bugs.gentoo.org/show_bug.cgi?id=346173</a>) that
ppl has an automagic dependency on glpk. that is ppl_lpsol will be built if glpk is found. It also looks like from the report that the test for ppl_lpsol succeeds or fails depending on the version of glpk used.
</p>
<p>
glpk is not a dependency you gave to ppl so some sage install may end up with ppl_lpsol while others won't, depending on build order. I suggest that either glpk is added to the dependencies of ppl or that --disable-ppl_lpsol is passed to configure.
</p>
TicketvbraunMon, 22 Nov 2010 12:19:14 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>deps</em>
</li>
</ul>
<p>
Updated spkg/standard/deps file with PPL added.
</p>
TicketvbraunMon, 22 Nov 2010 12:22:00 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>spkg-standard-deps.patch</em>
</li>
</ul>
<p>
diff for spkg/standard/deps
</p>
TicketvbraunMon, 22 Nov 2010 12:37:09 GMT
https://trac.sagemath.org/ticket/10039#comment:33
https://trac.sagemath.org/ticket/10039#comment:33
<p>
Thanks for pointing out the soft glpk dependency! I checked and the Fedora rpm requires <code>glpk-devel</code>, too. I've updated the <code>deps</code> file to include this dependency.
</p>
TicketvbraunFri, 31 Dec 2010 20:50:17 GMT
https://trac.sagemath.org/ticket/10039#comment:34
https://trac.sagemath.org/ticket/10039#comment:34
<p>
For the patch bot:
</p>
<p>
Apply trac_10039_parma_polyhedra_library.patch
</p>
TicketvbraunWed, 12 Jan 2011 06:28:51 GMT
https://trac.sagemath.org/ticket/10039#comment:35
https://trac.sagemath.org/ticket/10039#comment:35
<p>
I've now added sig_on/sig_off blocks around expensive library calls. Interrupting works, too:
</p>
<pre class="wiki">sage: Cone(random_matrix(QQ,100,10).rows())
^CERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (2152, 0))
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
/home/vbraun/opt/sage-4.6.1.rc1/devel/sage-main/<ipython console> in <module>()
/home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/geometry/cone.pyc in Cone(rays, lattice, check, normalize)
390 pass
391 cone = C_Polyhedron(gs)
--> 392 return _Cone_from_PPL(cone, lattice)
393
394 def _Cone_from_PPL(cone, lattice):
/home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/geometry/cone.pyc in _Cone_from_PPL(cone, lattice)
420 rays = []
421 lines = []
--> 422 for g in cone.minimized_generators():
423 ray = lattice(g.coefficients())
424 ray.set_immutable()
KeyboardInterrupt:
</pre><p>
Note: in this example I have <a class="closed ticket" href="https://trac.sagemath.org/ticket/10140" title="enhancement: Base sage.geometry.cone on the Parma Polyhedra Library (PPL) (closed: fixed)">#10140</a>: "Base sage.geometry.cone on the Parma Polyhedra Library (PPL)" applied.
</p>
TicketmhamptonThu, 13 Jan 2011 00:33:17 GMT
https://trac.sagemath.org/ticket/10039#comment:36
https://trac.sagemath.org/ticket/10039#comment:36
<p>
This looks very good.
</p>
<p>
One doctest problem is that on 32-bit machines we get:
</p>
<pre class="wiki">File "/Users/mh/sagestuff/sage-4.6.1.rc1/devel/sage-t1/sage/libs/ppl.pyx", line 2299:
sage: C_Polyhedron(1, 'empty').max_space_dimension()
Expected:
1152921504606846973
Got:
357913939
</pre><p>
so maybe that should be something like
</p>
<pre class="wiki">sage: max_dim = C_Polyhedron(1, 'empty').max_space_dimension()
sage: max_dim in [357913939,1152921504606846973]
sage: True
</pre><p>
or just
</p>
<pre class="wiki">sage: max_dim = C_Polyhedron(1, 'empty').max_space_dimension()
sage: max_dim > 1
sage: True
</pre>
TicketmhamptonThu, 13 Jan 2011 02:21:44 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:37
https://trac.sagemath.org/ticket/10039#comment:37
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
TicketvbraunThu, 13 Jan 2011 03:59:54 GMTstatus changed; reviewer set
https://trac.sagemath.org/ticket/10039#comment:38
https://trac.sagemath.org/ticket/10039#comment:38
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
<li><strong>reviewer</strong>
set to <em>Marshall Hampton</em>
</li>
</ul>
<p>
I fixed the <code>max_space_dimension</code> along the lines of Marshall's suggestion. I also improved the doctesting of the <code>ascii_dump()</code> methods using Jeroen's <code>test_executable()</code> function.
</p>
TicketmhamptonThu, 13 Jan 2011 05:37:37 GMT
https://trac.sagemath.org/ticket/10039#comment:39
https://trac.sagemath.org/ticket/10039#comment:39
<p>
OK, looks good, all doctests pass now. I will try to test on t2, then give a positive review.
</p>
TicketmhamptonThu, 13 Jan 2011 17:42:46 GMT
https://trac.sagemath.org/ticket/10039#comment:40
https://trac.sagemath.org/ticket/10039#comment:40
<p>
I can't build this on t2, but I don't really know what I'm doing on Solaris. I do have this in my .profile:
</p>
<pre class="wiki">if [ `uname -n` = t2 ] ; then
. /usr/local/bin/t2-setup
fi
</pre><p>
as suggested by the login message.
</p>
<p>
I get this error:
</p>
<pre class="wiki">CC Version
gcc -v
/home/mhampton/solaris/sage-4.6.1.rc1/local/bin/sage-spkg: line 319: gcc: command not found
Unable to determine C compiler version.
****************************************************
Failed to find mpir. Please install the mpir spkg
</pre>
TicketvbraunThu, 20 Jan 2011 23:15:42 GMT
https://trac.sagemath.org/ticket/10039#comment:41
https://trac.sagemath.org/ticket/10039#comment:41
<p>
On t2 (only), the <code>newest_version</code> script returns nothing unless it is run from <code>$SAGE_ROOT/spkg</code>, which is why you got the "Failed to find mpir" message. I updated the ppl spkg (same location), and it works now on t2 as well.
</p>
<p>
I followed the following steps to build on t2:
</p>
<ul><li><code>. /usr/local/bin/t2-setup</code>
</li><li><code>tar xzf sage-4.6.1-sunos-32bit-5.10-sun4v-SunOS.tar.gz</code>
</li><li><code>sage -f ppl-0.11.spkg</code>
</li></ul>
TicketvbraunFri, 21 Jan 2011 20:02:52 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>trac_10039_scripts_hgignore.patch</em>
</li>
</ul>
<p>
Add two ppl binaries to $SAGE_LOCAL/bin/.hgignore
</p>
TicketfbisseySat, 29 Jan 2011 19:42:26 GMT
https://trac.sagemath.org/ticket/10039#comment:42
https://trac.sagemath.org/ticket/10039#comment:42
<p>
I got a weird test failure if you have an idea:
</p>
<pre class="wiki">sage -t -force_lib "devel/sage/sage/libs/ppl.pyx"
size 3 1 3 2 f -RPI_V -RPI -NNC_V -NNC
topology NECESSARILY_CLOSED
1 x 3 (sorted)
index_first_pending 1
1 3 2 P
size 4 1 3 2 -1 f -RPI_V +RPI -NNC_V +NNC
topology NOT_NECESSARILY_CLOSED
1 x 4 (sorted)
index_first_pending 1
-1 3 -2 -1 >
NOTHINGNOTHING**********************************************************************
File "/usr/share/sage/devel/sage/sage/libs/ppl.pyx", line 1271:
sage: p.maximize( +x )
Expected:
{'sup_d': 0, 'sup_n': 0, 'bounded': False, 'maximum': False, 'generator': None}
Got:
{'sup_d': 0, 'sup_n': 0, 'bounded': False, 'maximum': True, 'generator': None}
**********************************************************************
File "/usr/share/sage/devel/sage/sage/libs/ppl.pyx", line 1340:
sage: p.minimize( -x )
Expected:
{'minimum': False, 'bounded': False, 'inf_d': 0, 'generator': None, 'inf_n': 0}
Got:
{'minimum': True, 'bounded': False, 'inf_d': 0, 'generator': None, 'inf_n': 0}
space_dim 2
-ZE -EM +CM +GM +CS +GS -CP -GP -SC +SG
con_sys (up-to-date)
topology NECESSARILY_CLOSED
2 x 3 (sorted)
index_first_pending 2
-1 3 2 =
1 0 0 >=
gen_sys (up-to-date)
topology NECESSARILY_CLOSED
2 x 3 (not_sorted)
index_first_pending 2
0 2 -3 L
2 0 1 P
sat_c
0 x 0
sat_g
2 x 2
0 0
0 1
**********************************************************************
File "/usr/share/sage/devel/sage/sage/libs/ppl.pyx", line 2204:
sage: C_Polyhedron(1, 'empty').max_space_dimension()
Expected:
1152921504606846973
Got:
357913939
size 3 1 3 2 f -RPI_V -RPI -NNC_V -NNC
**********************************************************************
3 items had failures:
1 of 15 in __main__.example_29
1 of 15 in __main__.example_30
1 of 4 in __main__.example_48
***Test Failed*** 3 failures.
For whitespace errors, see the file /home/francois/.sage/tmp/.doctest_ppl.py
[15.8 s]
----------------------------------------------------------------------
The following tests failed:
sage -t -force_lib "devel/sage/sage/libs/ppl.pyx"
Total time for all tests: 15.8 seconds
</pre>
TicketvbraunSat, 29 Jan 2011 19:58:26 GMT
https://trac.sagemath.org/ticket/10039#comment:43
https://trac.sagemath.org/ticket/10039#comment:43
<p>
Francois, I fixed the 32 bit issue in <code>max_space_dimension()</code> a while ago, so you have an old version of the patch.
</p>
<p>
About the other errors, is this on Gentoo with your own PPL library? I suggest you use the Sage spkg since there are certain configuration options that I rely on.
</p>
TicketfbisseySat, 29 Jan 2011 20:05:52 GMT
https://trac.sagemath.org/ticket/10039#comment:44
https://trac.sagemath.org/ticket/10039#comment:44
<p>
OK I will check the patch, it is possible that I have add it sitting there for a while before using it.
</p>
<p>
I'll have to check your configuration options but from my porting point of view it has to be conservative with what we have in Gentoo since ppl is part of the toolchain (you need it to build gcc with graphite support). I can work out something if it isn't but that will be a downright pain. I'll keep you posted on that.
</p>
TicketvbraunSat, 29 Jan 2011 20:12:33 GMT
https://trac.sagemath.org/ticket/10039#comment:45
https://trac.sagemath.org/ticket/10039#comment:45
<p>
Here is the PPL configuration:
</p>
<pre class="wiki">./configure --prefix="$SAGE_LOCAL" --with-gmp-prefix="$SAGE_LOCAL" --enable-fpmath=no --enable-coefficients=mpz --enable-interfaces=c++
</pre><p>
I need the GMP/MPIR based coefficients and C++ interface. PPL supports some tricks to work with floating point numbers as coefficients, but I'm not using that as it obviously comes with restrictions on the allowed coefficients. Also, the PPL Cython wrapper turns off the FPU rounding mode that PPL's floating point arithmetic relies on.
</p>
TicketfbisseyMon, 31 Jan 2011 01:47:20 GMT
https://trac.sagemath.org/ticket/10039#comment:46
https://trac.sagemath.org/ticket/10039#comment:46
<p>
I still get
</p>
<pre class="wiki">**********************************************************************
File "/usr/share/sage/devel/sage/sage/libs/ppl.pyx", line 1271:
sage: p.maximize( +x )
Expected:
{'sup_d': 0, 'sup_n': 0, 'bounded': False, 'maximum': False, 'generator': None}
Got:
{'sup_d': 0, 'sup_n': 0, 'bounded': False, 'maximum': True, 'generator': None}
**********************************************************************
File "/usr/share/sage/devel/sage/sage/libs/ppl.pyx", line 1340:
sage: p.minimize( -x )
Expected:
{'minimum': False, 'bounded': False, 'inf_d': 0, 'generator': None, 'inf_n': 0}
Got:
{'minimum': True, 'bounded': False, 'inf_d': 0, 'generator': None, 'inf_n': 0}
</pre><p>
On x86 but not on amd64. I am guessing from the configuration log on my amd64
machine and the configure.ac file that --enable-fpmath=no is the same as the
default and enable use of 387 and sse instructions. --enable-coefficients also currently default to mpz, and we enable c++ by default. So it seems all good configuration wise.
</p>
TicketfbisseyMon, 31 Jan 2011 02:16:11 GMT
https://trac.sagemath.org/ticket/10039#comment:47
https://trac.sagemath.org/ticket/10039#comment:47
<p>
more upsetting. The test pass on my x86-macos set up. I'll will have to check that's not limited to my own old home computer.
</p>
TicketvbraunMon, 31 Jan 2011 02:41:02 GMT
https://trac.sagemath.org/ticket/10039#comment:48
https://trac.sagemath.org/ticket/10039#comment:48
<p>
387 and SSE instructions are floating point math. Which versions of PPL are you using? Am I right in the assumption that this is only with Gentoo's ppl library and not with my ppl spkg? If yes, can you open a separate ticket for Gentoo overlay bugs?
</p>
TicketfbisseyMon, 31 Jan 2011 03:13:51 GMT
https://trac.sagemath.org/ticket/10039#comment:49
https://trac.sagemath.org/ticket/10039#comment:49
<p>
ppl is 0.11, same as yours unless you patched it. We don't.
For all intent and purpose I am the co-maintainer of sage-on-gentoo by the way.
You just asked me to open a bug with myself :)
Yes this is not with your ppl spkg, I will have to create a set up to compare
results with vanilla sage and see what's different on x86. But just to make my point,
we leave enable-fpmath and enable-coefficients to their defaults which happens to be
what you choose (unless you can point to something subbtle somewhere else), from
configure.ac:
</p>
<pre class="wiki">enableval=default
fpmath_may_use_387=yes
fpmath_may_use_sse=yes
AC_MSG_CHECKING([whether to select specific floating point arithmetics])
AC_ARG_ENABLE(fpmath,
AS_HELP_STRING([--enable-fpmath=INSTRUCTION_SET],
[select floating point arithmetics]))
case "${enableval}" in
sse)
AC_MSG_RESULT(sse)
OPT_FLAGS="$OPT_FLAGS -msse -mfpmath=sse"
# The SSE instruction set only supports single precision arithmetics:
# double and extended precision arithmetics is still done using 387.
;;
sse2)
AC_MSG_RESULT(sse2)
OPT_FLAGS="$OPT_FLAGS -msse2 -mfpmath=sse"
# SSE2 still does not support extended precision arithmetics.
;;
387)
AC_MSG_RESULT(387)
OPT_FLAGS="$OPT_FLAGS -mno-sse -mno-sse2 -mfpmath=387"
# Note that the -mno-sse* and -mfpmath options are only guaranteed
# to work with GCC.
if test x"$GCC" = xyes
then
fpmath_may_use_sse=no
fi
;;
sse+387)
AC_MSG_RESULT(sse+387)
OPT_FLAGS="$OPT_FLAGS -msse -mfpmath=sse,387"
;;
sse2+387)
AC_MSG_RESULT(sse2+387)
OPT_FLAGS="$OPT_FLAGS -msse2 -mfpmath=sse,387"
;;
default)
AC_MSG_RESULT(default)
;;
no)
AC_MSG_RESULT(default)
;;
*)
AC_MSG_ERROR([bad value ${enableval} for --enable-fpmath, needs sse, sse2, 387, sse+387, sse2+387, default or no])
;;
esac
</pre><p>
As you can see just saying "no" leaves you with the same thing as "default" and that is 387 and sse. Same thing for coefficient:
</p>
<pre class="wiki">enableval=mpz
AC_MSG_CHECKING([the type of integral values to use as coefficients])
AC_ARG_ENABLE(coefficients,
AS_HELP_STRING([--enable-coefficients=TYPE],
[select the type of the coefficients]))
case "${enableval}" in
native-int8)
AC_MSG_RESULT([native 8 bits integers])
coefficient_kind=native
coefficient_bits=8
coefficient_mnemonic=nint8
;;
native-int16)
AC_MSG_RESULT([native 16 bits integers])
coefficient_kind=native
coefficient_bits=16
coefficient_mnemonic=nint16
;;
native-int32)
AC_MSG_RESULT([native 32 bits integers])
coefficient_kind=native
coefficient_bits=32
coefficient_mnemonic=nint32
;;
native-int64)
AC_MSG_RESULT([native 64 bits integers])
coefficient_kind=native
coefficient_bits=64
coefficient_mnemonic=nint64
;;
checked-int8)
AC_MSG_RESULT([checked 8 bits integers])
coefficient_kind=checked
coefficient_bits=8
coefficient_mnemonic=int8
;;
checked-int16)
AC_MSG_RESULT([checked 16 bits integers])
coefficient_kind=checked
coefficient_bits=16
coefficient_mnemonic=int16
;;
checked-int32)
AC_MSG_RESULT([checked 32 bits integers])
coefficient_kind=checked
coefficient_bits=32
coefficient_mnemonic=int32
;;
checked-int64)
AC_MSG_RESULT([checked 64 bits integers])
coefficient_kind=checked
coefficient_bits=64
coefficient_mnemonic=int64
;;
mpz)
AC_MSG_RESULT([GMP mpz])
coefficient_kind=unbounded
coefficient_bits=0
coefficient_mnemonic=mpz
;;
*)
AC_MSG_ERROR([bad value ${enableval} for --enable-coefficients, checked-int32, checked-int64, checked-int16, checked-int8, mpz, native-int32, native-int64, native-int16 or native-int8])
;;
esac
</pre><p>
Again mpz is the default if you don't pass anything.
</p>
<p>
So unless you have patched these behaviors - and you didn't, we have very similar configurations, we pass
</p>
<pre class="wiki">--disable-debugging --disable-optimization --enable-ppl_lpsol --disable-pch --disable-watchdog
</pre><p>
Since I have a different result for two different x86 setup I am wondering
if the great age of my home machine (close to 8 years) is a factor.
</p>
TicketvbraunMon, 31 Jan 2011 03:31:08 GMT
https://trac.sagemath.org/ticket/10039#comment:50
https://trac.sagemath.org/ticket/10039#comment:50
<p>
I know that you are doing the sage-on-gentoo, I'm asking you to open a different ticket on the Sage track for the gentoo ebuild issues and stop hijacking this ticket :-P
</p>
<p>
As far as I know, I'm not using any floating point code in ppl. So your configuration seems to be fine. But clearly your ppl returns a wrong result. Is your compiler/toolchain up to date on your antique computer?
</p>
TicketfbisseyMon, 31 Jan 2011 03:37:13 GMT
https://trac.sagemath.org/ticket/10039#comment:51
https://trac.sagemath.org/ticket/10039#comment:51
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/10039#comment:50" title="Comment 50">vbraun</a>:
</p>
<blockquote class="citation">
<p>
I know that you are doing the sage-on-gentoo, I'm asking you to open a different ticket on the Sage track for the gentoo ebuild issues and stop hijacking this ticket :-P
</p>
<p>
As far as I know, I'm not using any floating point code in ppl. So your configuration seems to be fine. But clearly your ppl returns a wrong result. Is your compiler/toolchain up to date on your antique computer?
</p>
</blockquote>
<p>
Yes it is (gcc-4.5.2/binutils-2.20.1/glibc-2.11.2). But I will abide to your requests
and stop spamming this ticket. I will only abuse it again to post positive reviews (I hope).
</p>
TicketvbraunMon, 31 Jan 2011 04:37:30 GMT
https://trac.sagemath.org/ticket/10039#comment:52
https://trac.sagemath.org/ticket/10039#comment:52
<p>
I had some <code>sig_on</code> without corresponding <code>sig_off</code>'s when exceptions were raised, the updated patch fixes that. Now everything plays nicely with Jeroen' sigon/off debugging patch at <a class="closed ticket" href="https://trac.sagemath.org/ticket/10030" title="enhancement: Interrupt testing (closed: fixed)">#10030</a>.
</p>
<p>
Marshall, considering that it now builds on t2, how about a positive review? ;-)
</p>
TicketfbisseySat, 05 Feb 2011 10:08:47 GMT
https://trac.sagemath.org/ticket/10039#comment:53
https://trac.sagemath.org/ticket/10039#comment:53
<p>
I unfortunately not give a positive review. I tested this again on a vanilla
sage-4.6.2.alpha4 (as in _NOT_ sage-on-gentoo) with the latest version of the
patch, spkg, install and deps and I still get the same doctest failures.
sage -testall didn't report any broken tests before applying the patch.
My opinion is that if this gets merged in an alpha release we will see
this failure more on 32bit linux.
</p>
TicketvbraunSat, 05 Feb 2011 12:01:25 GMT
https://trac.sagemath.org/ticket/10039#comment:54
https://trac.sagemath.org/ticket/10039#comment:54
<p>
Can you give more details? Which hardware is it failing on, what is the result of the PPL testsuite (build with SAGE_CHECK=yes), is your gcc configured to use ppl (how is that working out for you), can you reproduce the issue with a supported linux distribution, ...
</p>
TicketvbraunSun, 20 Feb 2011 19:10:44 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:55
https://trac.sagemath.org/ticket/10039#comment:55
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=55">diff</a>)
</li>
</ul>
<p>
I've updated the PPL spkg to the new upstream version 0.11.1 and tested it on Fedora 14 i386. It passes all tests on my system, so I'm pretty confident that it works fine on 32bit.
</p>
TicketmhamptonMon, 21 Feb 2011 14:29:17 GMT
https://trac.sagemath.org/ticket/10039#comment:56
https://trac.sagemath.org/ticket/10039#comment:56
<p>
Volker - I still can't get this to work on t2, but I think that's because of my Solaris ignorance. How did you build and test on Solaris - in particular, did you ever change your environment variables somehow?
</p>
TicketvbraunMon, 21 Feb 2011 14:49:55 GMT
https://trac.sagemath.org/ticket/10039#comment:57
https://trac.sagemath.org/ticket/10039#comment:57
<p>
Oops, I accidentally dropped the fix for the <code>newest_version</code> check that is required on t2, see <a class="ticket" href="https://trac.sagemath.org/ticket/10039#comment:41" title="Comment 41">comment:41</a>. Sorry about that.
</p>
<p>
Updated spkg fixes it and builds on t2.
</p>
<p>
Marshall: Are you asking about building all of Sage on t2? I don't remember any specific problem there, just source the t2-setup:
</p>
<pre class="wiki">. /usr/local/bin/t2-setup
make
</pre><p>
If you put stuff into your .profile and it is not picked up you are using a different shell with different initalization files. You can also use a binary distribution, <code>sage-4.6.1-sunos-32bit-5.10-sun4v-SunOS.tar.gz</code> works.
</p>
TicketfbisseyMon, 07 Mar 2011 22:38:34 GMT
https://trac.sagemath.org/ticket/10039#comment:58
https://trac.sagemath.org/ticket/10039#comment:58
<p>
I noticed that 0.11.2 is out and from the release notes it sounds like you had some wish granted:
</p>
<pre class="wiki">Bugfixes
========
o Fixed the semantics of the `--disable-fpmath' configure option
(which is equivalent to `--enable-fpmath=no'). It now disables all
floating point computations and, consequently, all numerical
abstractions based on floating point numbers.
o The PPL no longer overwrites the SIGILL signal handler.
o Minor documentation fixes.
o Portability improved.
</pre>
TicketvbraunTue, 08 Mar 2011 11:11:48 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:59
https://trac.sagemath.org/ticket/10039#comment:59
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=59">diff</a>)
</li>
</ul>
<p>
I updated my ppl spkg to 0.11.2, see the link in the ticket description. Builds and tests correctly on F14 x86_64, i384, and on t2.math.
</p>
TicketmhamptonMon, 14 Mar 2011 11:52:07 GMT
https://trac.sagemath.org/ticket/10039#comment:60
https://trac.sagemath.org/ticket/10039#comment:60
<p>
I'm going to look at this again this week, hopefully can give a positive review soon. I'm going to try to install on some of the skynet machines and do a little more testing. It would be great to get this into sage-4.7.
</p>
<p>
I just tested on a mac, with your latest package, and I think an error message might have changed. I get the following doctest "failure" (test is expected to fail, just not with this message):
</p>
<pre class="wiki">File "/Users/mh/sagestuff/sage-4.7.alpha2/devel/sage-t1/sage/libs/ppl.pyx", line 4124:
sage: line.divisor()
Expected:
Traceback (most recent call last):
...
ValueError: Only points and closure points have a divisor.
Got:
Traceback (most recent call last):
File "/Users/mh/sagestuff/sage-4.7.alpha2/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/mh/sagestuff/sage-4.7.alpha2/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/mh/sagestuff/sage-4.7.alpha2/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_108[8]>", line 1, in <module>
line.divisor()###line 4124:
sage: line.divisor()
File "ppl.pyx", line 4131, in sage.libs.ppl.Generator.divisor (sage/libs/ppl.cpp:13949)
mpz_set(c.value, self.thisptr.divisor().get_mpz_t())
ValueError: PPL::Generator::divisor():
*this is neither a point nor a closure point.
</pre>
TicketmhamptonMon, 14 Mar 2011 11:52:16 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:61
https://trac.sagemath.org/ticket/10039#comment:61
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_info</em>
</li>
</ul>
TicketvbraunMon, 14 Mar 2011 20:12:51 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:62
https://trac.sagemath.org/ticket/10039#comment:62
<ul>
<li><strong>status</strong>
changed from <em>needs_info</em> to <em>needs_review</em>
</li>
</ul>
<p>
Hi Marshall,
</p>
<p>
Sage-4.7.alpha2 hasn't been released yet, you are cheating :-P
</p>
<p>
It seems like Cython-0.14.1 got smarter and now translates the C++ <code>std::invalid_argument</code> exception into a Python <code>ValueError</code>, while the older Cython only threw a nondescript <code>RuntimeError</code>. So I don't have to catch the exception any more, perfect. Attached patch fixes the doctest, I only removed the try/except block in <code>divisor()</code>.
</p>
<p>
For anybody who is still using Sage-4.6.x: You will encounter one doctest failure but that is harmless.
</p>
TicketvbraunMon, 14 Mar 2011 20:13:20 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>trac_10039_parma_polyhedra_library.patch</em>
</li>
</ul>
<p>
Updated patch
</p>
TicketmhamptonTue, 15 Mar 2011 16:22:43 GMT
https://trac.sagemath.org/ticket/10039#comment:63
https://trac.sagemath.org/ticket/10039#comment:63
<p>
OK, this looks good on OS X, linux, and solaris. I built and tested on the skynet machine "mark", and everything seemed fine except for some doctest errors which all seem related to timeout issues - not surprising perhaps since mark is quite slow and has a load of other processes on it right now. So I'm not sure I would consider those failures blockers for this ticket.
The failures for mark are at:
<a class="ext-link" href="http://sage.math.washington.edu/home/mhampton/ppltest2.txt"><span class="icon"></span>http://sage.math.washington.edu/home/mhampton/ppltest2.txt</a>
</p>
TicketmhamptonTue, 15 Mar 2011 19:08:46 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:64
https://trac.sagemath.org/ticket/10039#comment:64
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
<p>
Sorry, I needed to read the test_executable docs. Clearly these are just timeout issues, and running those doctests with longer values works fine on mark.
</p>
<p>
I've tested this on a variety of OS X 10.6, linux, and solaris machines now. Hopefully this can be included in an alpha or rc0 of sage-4.7 for wider testing.
</p>
TicketnovoseltTue, 15 Mar 2011 19:59:27 GMT
https://trac.sagemath.org/ticket/10039#comment:65
https://trac.sagemath.org/ticket/10039#comment:65
<p>
Can someone please post step-by-step instructions how to apply it? I tried to install the package (it went fine) and apply the last patch, but when I build I get the error
</p>
<pre class="wiki">----------------------------------------------------------
sage: Building and installing modified Sage library files.
Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Traceback (most recent call last):
File "setup.py", line 859, in <module>
queue = compile_command_list(ext_modules, deps)
File "setup.py", line 819, in compile_command_list
dep_file, dep_time = deps.newest_dep(f)
File "setup.py", line 726, in newest_dep
for f in self.all_deps(filename):
File "setup.py", line 707, in all_deps
for f in self.immediate_deps(filename):
File "setup.py", line 689, in immediate_deps
self._deps[filename] = self.parse_deps(filename)
File "setup.py", line 679, in parse_deps
raise IOError, "could not find dependency %s included in %s."%(path, filename)
IOError: could not find dependency ppl.hh included in sage/libs/ppl.pyx.
sage: There was an error installing modified sage library code.
</pre>
TicketmhamptonTue, 15 Mar 2011 20:14:04 GMT
https://trac.sagemath.org/ticket/10039#comment:66
https://trac.sagemath.org/ticket/10039#comment:66
<p>
Andrey - that should have worked. Installing the package should put ppl.hh in $SAGE_ROOT/local/include/ - is it there? If the spkg installed OK, I don't know what would be wrong except the error that I sometimes make of working on two different copies of sage.
</p>
TicketnovoseltTue, 15 Mar 2011 20:33:39 GMT
https://trac.sagemath.org/ticket/10039#comment:67
https://trac.sagemath.org/ticket/10039#comment:67
<p>
It is, but I have realized that I didn't install dependencies. I guess I'll install 4.7.alpha1 and try again.
</p>
TicketnovoseltWed, 16 Mar 2011 05:11:04 GMTmilestone changed
https://trac.sagemath.org/ticket/10039#comment:68
https://trac.sagemath.org/ticket/10039#comment:68
<ul>
<li><strong>milestone</strong>
changed from <em>sage-feature</em> to <em>sage-4.7</em>
</li>
</ul>
<p>
Everything applies smooth now, sorry for the false alarm!
</p>
TicketjdemeyerWed, 16 Mar 2011 11:14:18 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:69
https://trac.sagemath.org/ticket/10039#comment:69
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=69">diff</a>)
</li>
</ul>
<p>
Some administrative issues:
</p>
<ol><li>Now that <a class="closed ticket" href="https://trac.sagemath.org/ticket/9433" title="enhancement: Put more files under revision control. (closed: fixed)">#9433</a> is merged, changes to <code>spkg/install</code> and <code>spkg/standard/deps</code> should be made using <code>hg export tip</code> (producing an actual HG changeset for the <code>sage_root</code> repository).
</li><li>Please state clearly which patches have to be applied where.
</li></ol>
TicketjdemeyerThu, 17 Mar 2011 11:36:50 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:70
https://trac.sagemath.org/ticket/10039#comment:70
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>needs_work</em>
</li>
</ul>
TicketvbraunMon, 21 Mar 2011 16:12:30 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>trac_10039_root_repo.patch</em>
</li>
</ul>
<p>
Patch to SAGE_ROOT repo
</p>
TicketvbraunMon, 21 Mar 2011 16:12:45 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>trac_10039_SAGE_LOCAL_bin_repo.patch</em>
</li>
</ul>
<p>
patch to SAGE_LOCAL/bin repo
</p>
TicketvbraunMon, 21 Mar 2011 16:16:45 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:71
https://trac.sagemath.org/ticket/10039#comment:71
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=71">diff</a>)
</li>
</ul>
<p>
The patches are explained in the ticket description.
</p>
TicketvbraunMon, 21 Mar 2011 16:17:35 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:72
https://trac.sagemath.org/ticket/10039#comment:72
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>positive_review</em>
</li>
</ul>
<p>
back to positive review since I only repackaged existing changes.
</p>
TicketjdemeyerSat, 26 Mar 2011 15:38:09 GMT
https://trac.sagemath.org/ticket/10039#comment:73
https://trac.sagemath.org/ticket/10039#comment:73
<p>
This ticket will also be an interesting test for <a class="closed ticket" href="https://trac.sagemath.org/ticket/9433" title="enhancement: Put more files under revision control. (closed: fixed)">#9433</a>: adding a new spkg has not been tested before.
</p>
TicketjdemeyerMon, 28 Mar 2011 07:18:14 GMTstatus changed; resolution, merged set
https://trac.sagemath.org/ticket/10039#comment:74
https://trac.sagemath.org/ticket/10039#comment:74
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.7.alpha3</em>
</li>
</ul>
TicketjdemeyerWed, 30 Mar 2011 07:49:41 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>10039_manifest.patch</em>
</li>
</ul>
<p>
Patch to MANIFEST.in
</p>
TicketjdemeyerWed, 30 Mar 2011 07:51:00 GMTstatus, description changed
https://trac.sagemath.org/ticket/10039#comment:75
https://trac.sagemath.org/ticket/10039#comment:75
<ul>
<li><strong>status</strong>
changed from <em>closed</em> to <em>needs_work</em>
</li>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=75">diff</a>)
</li>
</ul>
TicketjdemeyerWed, 30 Mar 2011 07:51:55 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:76
https://trac.sagemath.org/ticket/10039#comment:76
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
</ul>
TicketjdemeyerThu, 31 Mar 2011 11:49:23 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:77
https://trac.sagemath.org/ticket/10039#comment:77
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
On OS X 10.6 (both 32-bit and 64-bit):
</p>
<pre class="wiki">sage -t -long -force_lib devel/sage/sage/libs/ppl.pyx
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 4178:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_110[8]>", line 1, in <module>
(out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest###line 4178:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/lib/python/site-packages/sage/tests/cmdline.py", line 366, in test_executable
raise RuntimeError("timeout in test_executable()")
RuntimeError: timeout in test_executable()
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 4179:
sage: print err
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_110[9]>", line 1, in <module>
print err###line 4179:
sage: print err
NameError: name 'err' is not defined
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 4444:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_124[8]>", line 1, in <module>
(out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest###line 4444:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/lib/python/site-packages/sage/tests/cmdline.py", line 366, in test_executable
raise RuntimeError("timeout in test_executable()")
RuntimeError: timeout in test_executable()
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 4445:
sage: print err
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_124[9]>", line 1, in <module>
print err###line 4445:
sage: print err
NameError: name 'err' is not defined
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5056:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_149[8]>", line 1, in <module>
(out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest###line 5056:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/lib/python/site-packages/sage/tests/cmdline.py", line 366, in test_executable
raise RuntimeError("timeout in test_executable()")
RuntimeError: timeout in test_executable()
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5057:
sage: print err
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_149[9]>", line 1, in <module>
print err###line 5057:
sage: print err
NameError: name 'err' is not defined
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5293:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_161[8]>", line 1, in <module>
(out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest###line 5293:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/lib/python/site-packages/sage/tests/cmdline.py", line 366, in test_executable
raise RuntimeError("timeout in test_executable()")
RuntimeError: timeout in test_executable()
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5294:
sage: print err
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_161[9]>", line 1, in <module>
print err###line 5294:
sage: print err
NameError: name 'err' is not defined
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5572:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_176[5]>", line 1, in <module>
(out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest###line 5572:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/lib/python/site-packages/sage/tests/cmdline.py", line 366, in test_executable
raise RuntimeError("timeout in test_executable()")
RuntimeError: timeout in test_executable()
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5573:
sage: print err
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_176[6]>", line 1, in <module>
print err###line 5573:
sage: print err
NameError: name 'err' is not defined
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5822:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_189[5]>", line 1, in <module>
(out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest###line 5822:
sage: (out, err, ret) = test_executable(['sage', '-c', sage_cmd]); # indirect doctest
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/lib/python/site-packages/sage/tests/cmdline.py", line 366, in test_executable
raise RuntimeError("timeout in test_executable()")
RuntimeError: timeout in test_executable()
**********************************************************************
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 5823:
sage: print err
Exception raised:
Traceback (most recent call last):
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/Users/buildbot/build/sage/bsd-1/bsd_full/build/sage-4.7.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_189[6]>", line 1, in <module>
print err###line 5823:
sage: print err
NameError: name 'err' is not defined
**********************************************************************
</pre><p>
Note the default timeout of <code>test_executable()</code> is 10 seconds, which might simply be too short.
</p>
TicketjdemeyerThu, 31 Mar 2011 11:51:50 GMTmerged deleted
https://trac.sagemath.org/ticket/10039#comment:78
https://trac.sagemath.org/ticket/10039#comment:78
<ul>
<li><strong>merged</strong>
<em>sage-4.7.alpha3</em> deleted
</li>
</ul>
<p>
On RHEL 5.3-64 (cleo), SUSE ES10-64 (iras), <a class="missing wiki">OpenSolaris?</a> 06.2009-32 (hawk), SunOS 5.10-32 (t2):
</p>
<pre class="wiki">File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 1413:
sage: p.minimize( -x )
Expected:
{'minimum': False, 'bounded': False, 'inf_d': 0, 'generator': None, 'inf_n': 0}
Got:
{'minimum': True, 'bounded': False, 'inf_d': 0, 'generator': None, 'inf_n': 0}
</pre>
TicketjdemeyerThu, 31 Mar 2011 11:52:32 GMT
https://trac.sagemath.org/ticket/10039#comment:79
https://trac.sagemath.org/ticket/10039#comment:79
<p>
On SunOS 5.10-32 (t2), <a class="missing wiki">OpenSolaris?</a> 06.2009-32 (hawk):
</p>
<pre class="wiki">File "/scratch/buildbot/sage/t2-1/t2_full/build/sage-4.7.alpha3/devel/sage-main/sage/libs/ppl.pyx", line 1342:
sage: p.maximize( +x )
Expected:
{'sup_d': 0, 'sup_n': 0, 'bounded': False, 'maximum': False, 'generator': None}
Got:
{'sup_d': 0, 'sup_n': 0, 'bounded': False, 'maximum': True, 'generator': None}
</pre>
TicketjdemeyerThu, 31 Mar 2011 12:06:08 GMT
https://trac.sagemath.org/ticket/10039#comment:80
https://trac.sagemath.org/ticket/10039#comment:80
<p>
See <a class="closed ticket" href="https://trac.sagemath.org/ticket/11100" title="enhancement: Increase default timeout of test_executable() to 50 seconds (closed: fixed)">#11100</a> for the timeout problem.
</p>
TicketvbraunSat, 02 Apr 2011 03:09:05 GMTstatus, description changed
https://trac.sagemath.org/ticket/10039#comment:81
https://trac.sagemath.org/ticket/10039#comment:81
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>needs_review</em>
</li>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=81">diff</a>)
</li>
</ul>
<p>
I finally <strong>got</strong> the problem with the maximize/minimize doctest failure. If the linear function is not bounded on the polyhedron then it doesn't make sense to ask for whether its a maximum or minimum. And PPL then does not return a consistent value for the corresponding field.
</p>
<p>
In the attached patch I changed return value of the maximize/minimize methods to only return <code>{'bounded':False}</code> if the linear program is unbounded, since all other dictionary entries are not well-defined in that case. If the linear program is bounded then the returned dictionary is the same as before and contains information about the sup/inf value, whether it is a maximum, and where it is attained.
</p>
<p>
The new patch <code>trac_10039_ppl_fix_extremize.patch</code> needs to be applied on top of <code>trac_10039_parma_polyhedra_library.patch</code>, see also the ticket description. The new patch needs review.
</p>
TicketfbisseySat, 02 Apr 2011 03:15:16 GMT
https://trac.sagemath.org/ticket/10039#comment:82
https://trac.sagemath.org/ticket/10039#comment:82
<p>
That's good news and that wasn't just me then! I have my hands full at the moment so I won't be able to review it quickly but I am sure you have another reviewer around :)
</p>
TicketjdemeyerMon, 04 Apr 2011 08:41:30 GMTstatus, reviewer changed
https://trac.sagemath.org/ticket/10039#comment:83
https://trac.sagemath.org/ticket/10039#comment:83
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
<li><strong>reviewer</strong>
changed from <em>Marshall Hampton</em> to <em>Marshall Hampton, Jeroen Demeyer</em>
</li>
</ul>
<p>
New patch looks good to me. Still needs to be tested on the buildbots, but positive review in the hope that everything works fine.
</p>
TicketjdemeyerMon, 04 Apr 2011 09:47:06 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:84
https://trac.sagemath.org/ticket/10039#comment:84
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
Volker, you just need to put a proper commit message on your patch...
</p>
TicketvbraunMon, 04 Apr 2011 13:04:12 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>trac_10039_ppl_fix_extremize.2.patch</em>
</li>
</ul>
<p>
Updated patch
</p>
TicketvbraunMon, 04 Apr 2011 13:04:29 GMTattachment set
https://trac.sagemath.org/ticket/10039
https://trac.sagemath.org/ticket/10039
<ul>
<li><strong>attachment</strong>
set to <em>trac_10039_ppl_fix_extremize.patch</em>
</li>
</ul>
<p>
Updated patch
</p>
TicketvbraunMon, 04 Apr 2011 13:05:56 GMTstatus changed
https://trac.sagemath.org/ticket/10039#comment:85
https://trac.sagemath.org/ticket/10039#comment:85
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>positive_review</em>
</li>
</ul>
<p>
Oops, sorry. New <code>trac_10039_ppl_fix_extremize.patch</code> now has a commit message, no other changes. Setting this back to positive review as only metadata changed.
</p>
TicketjdemeyerTue, 05 Apr 2011 12:00:02 GMTstatus changed; merged set
https://trac.sagemath.org/ticket/10039#comment:86
https://trac.sagemath.org/ticket/10039#comment:86
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.7.alpha4</em>
</li>
</ul>
TicketjdemeyerTue, 12 Apr 2011 08:39:26 GMTdescription changed
https://trac.sagemath.org/ticket/10039#comment:87
https://trac.sagemath.org/ticket/10039#comment:87
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10039?action=diff&version=87">diff</a>)
</li>
</ul>
<p>
<code>www.stp.dias.ie</code> seems to be down, so I'm mirroring the spkg myself.
</p>
Ticket