New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base sage.geometry.cone on the Parma Polyhedra Library (PPL) #10140
Comments
comment:1
In the current patch I fixed all doctest errors in |
comment:2
Wonderful speed gain! However, when do you expect PPL to become a standard library? It is my impression that currently it is difficult to add new standard packages and it is more likely to become an optional one for a while. In which case there should be an option to use PPL, but its presence should not affect work of toric geometry. Little picks at the patch:
|
comment:3
4,5,6. Sounds good.
|
comment:4
|
comment:5
This is quite possibly a stupid question, but does it mean we can get rid of cddlib if this gets merged? |
comment:6
No! Currently cddlib is required by Gfan. It may be possible to convince Anders Jensen, the author of Gfan, to switch to PPL as well. |
comment:7
The updated version now cleans up all doctests. |
comment:10
I have trouble applying trac_10140_base_cone_on_ppl.patch. The following section doesn't apply at least:
Is it due to #9972? I can see that particular section in #9972 but slightly shifted in line number. |
comment:11
It is quite likely, since #9972 was invasive and written mostly by me, i.e. it was not coordinated with this one. What exactly do you mean by "have trouble"? I just tried to apply it on top of my queue and it succeeded with two fuzzy hunks. For the record: I am going to review this ticket but I am waiting for PPL package to get approved ;-) |
Work Issues: rebasement |
comment:13
This is on a fresh installation of 4.6.2.alpha2 without any patches applied:
|
Attachment: trac_10140_fix_toric_variety_doctests.patch.gz Rebased patch |
comment:14
I've uploaded my rebased patch. |
comment:15
François, does the new version work for you? (Now I don't get any fuzz for both patches.) |
Changed work issues from rebasement to none |
Changed work issues from remove/review dependencies to none |
comment:47
Attachment: trac_10140_sublattice_intersection.patch.gz OK, the new patches apply cleanly to sage-4.7.alpha4 and pass all long tests, documentation builds without warnings. The first patch now includes some adjustments to lattice treatment, moved here from #10882 (I'll update the patch there shortly.) Volker, if you are fine with my patches, please switch it to positive review! |
This comment has been minimized.
This comment has been minimized.
comment:48
Attachment: trac_10140_switch_point_containment_to_PPL.patch.gz One more patch: I was learning how to use PPL and trying to switch point containment check in cones so that it does not call Regarding original goal, here are the timings before
and after
As we see, even on very simple example we get 10x speedup for "single checks" when most of the time is spent constructing different representations of the cone. When everything is precached and we count only actual containment, we have 3x speed up. A more complicated example before:
and after
(I didn't bother with fresh start timing here.) Conclusion: Volker's PPL wrapper rocks! |
comment:49
I'm happy with the reviewer patch, so positive review alltogether ;-) |
comment:51
@ Andrey Novoseltsev: Can you upload your reviewer patch again using |
comment:52
Attachment: trac_10140_reviewer.patch.gz Done! |
Merged: sage-4.7.1.alpha1 |
comment:54
I'm adding an unformatted "Apply" section in the ticket description to help the patch buildbot figure out the correct patches. |
This comment has been minimized.
This comment has been minimized.
comment:55
Apply trac_10140_sublattice_intersection.patch, trac_10140_base_cone_on_ppl_original.patch, trac_10140_reviewer.patch, trac_10140_switch_point_containment_to_PPL.patch |
comment:56
How hard would it be to set up PPL to do Vrepresentation and Hrepresentation of Polyhedron? |
As a first useful application of the PPL Cython library interface I have changed
sage.geometry.cone.Cone
to use the PPL wrapper instead ofcddlib
. Here is a quick benchmark with a fan that was somewhat challenging:With the old
Polyhedron
/cddlib
interface, I got insteadApply
Apply trac_10140_sublattice_intersection.patch, trac_10140_base_cone_on_ppl_original.patch, trac_10140_reviewer.patch, trac_10140_switch_point_containment_to_PPL.patch
Depends on #10039
CC: @novoselt @nthiery
Component: geometry
Keywords: ppl
Author: Volker Braun, Andrey Novoseltsev
Reviewer: Andrey Novoseltsev, Volker Braun
Merged: sage-4.7.1.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/10140
The text was updated successfully, but these errors were encountered: