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
include TOPCOM as optional spkg #8169
Comments
comment:1
This looks great. I looked into TOPCOM briefly but because of its size and some build issues I gave up thinking about it. I don't have time to review this week, but I will try to take a look at it soon. -Marshall |
comment:2
Thanks to a contribution by Josh Whitney we can now compute volumes and the secondary polytope. Still todo: the TOPCOM spkg crashes when checking for coherency/regularity of a triangulation, investigating... |
updated version |
comment:3
Attachment: triangulation.2.py.gz I fixed the segfaulting regularity check, it works for me now. Updated spkg is here: Also, doctests now all pass in the updated triangulation.py |
updated version |
Attachment: triangulation.3.py.gz Attachment: triangulation.4.py.gz Updated patch for timeout issue |
comment:4
The previous version would raise Whoever is interested in using it can now either apply |
comment:5
I get the following error when trying to install the spkg on a mac (10.5.8):
|
comment:6
The |
comment:7
Great! That fixed it. Patch applies fine too (to sage-4.5.2). I get the following coverage issues, which I would be happy to work on if you don't mind:
|
comment:8
Feel free to make changes! I'm right now working on other tickets. |
comment:9
I'm getting lots of doctest failures; I think most of them are because points2placingtriang doesn't work:
I didn't see any errors relating to this during compilation; not sure what is going on. |
comment:10
A few comments.
|
comment:11
I'll try to add the 64-bit stuff and a spkg-check. The examples are huge (the upstream distribution is 22M gzipped), but we probably should keep some for the check. Since the intention is to eventually move the changes upstream I would prefer to move the deprecated As for the bus error, I don't have a OSX machine to test on. But running points2placingtriangs in gdb and producing a stack trace would probably help. |
comment:12
Replying to @vbraun:
I think we should keep them all for the check myself if they can be used in a check. The problem with the doc tests is that they test so little really in most cases.
I must have missed that.
William will give you access to bsd.math I expect. That runs OS X. |
Author: Volker Braun |
comment:15
I do not plan to review this ticket since it involves a package, but I'll allow myself some critical remarks anyway ;-)
P.S. My previous attempts to install and use TOPCOM didn't succeed, but with Volker's package installation was completely painless. So I hope that it will make its way into Sage in the near future! |
comment:16
Other TODO's:
|
comment:17
|
comment:18
I will post a patch improving the coverage sometime today (US Central time). I am wondering what the point of the function "liststring" is in the _TOPCOM_points method. Seems like overkill to make this function given the very limited way its used. I still haven't fixed the build on OS X; on the TOPCOM page it says "The current version compiles successfully under Darwin gcc-4.0 and gcc-4.2 if you choose the -m32 or -m64 architecture manually for all libraries." - which maybe means that we need to add such flags somewhere. I am not good with build issues though. |
comment:19
I think this is a bug in the secondary polytope code, maybe from the optional argument reduce_dimension not being set correctly in the LatticePolytope call.
...this results in:
A similar command with an octahedron instead of a cube works fine. |
comment:20
Oops, I don't think my initial guess about the above problem was correct, since the octahedron secondary polytope is also in a larger ambient dimension. Would it be OK to switch the secondary polytope to a Polyhedron instead of a lattice polytope? |
comment:31
The warnings are ok except for the "cannot open m4/ltoptions.m4"; This looks like you have the old version where I had not correctly packaged the m4/ directory. The current TOPCOM spkg should be 766185 bytes long. Can you double check that? |
comment:32
OK, sorry about that. I had some older versions lying around and mistakenly installed one of those. The new one seems to build fine, but after installing 9918 it doesn't seem to work. The first doctest failure looks like this:
|
comment:33
I tried installing the patch for this ticket but it seems to conflict with the one at 9918. Are these out of sync now? Sorry for my confusion. |
comment:34
I tried directly running points2facets from $SAGE_LOCAL/bin and got this:
I had renamed my sage folder from "sage-4.6.alpha0" to "sage-4-x" after upgrading to 4.6.alpha1, and apparently that is causing some problems. So I'll try this again with a cleaner 4.6.alpha1 but that will take me a while. |
comment:35
Thanks for testing! The precise version of the sage<->TOPCOM interface in #9918 should not matter. Of course you need some version, or there is no interface. In case anyone else wants to give it a try: Since TOPCOM compiled correctly it should work. |
comment:36
To be more precise in my question: should I ignore the patch https://github.com/sagemath/sage-prod/files/10647958/trac_8169_triangulate_using_TOPCOM.patch.gz if I install the patch from #9918? |
comment:37
Either patch should work should work for testing the TOPCOM spkg. You can't install both of them as they definitely conflict. If you have a choice, I would recommend using the newer one at #9918. |
comment:38
I started with sage-4.6.alpha1 compiled from source on OS X 10.5. After cloning I installed the TOPCOM package and the patch from 9918. Everything seemed to compile OK with TOPCOM. If I try to run one of the TOPCOM programs in $SAGE_ROOT/local/bin, I get a "bus error". If I do "sage -sh" and try again, it seems to work. But if I test geometry/triangulation/base.pyx or triangulation/point_configuration.py, everything fails. So I think there is some sort of linking issue here. |
comment:39
That sounds strange; can you post the output of |
comment:40
OK, here it is:
|
comment:41
Sounds like it should work? Is this on |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:44
This works for me now on OS X 10.5. Works for OS X 10.6 and linux, so I think this is OK for an optional spkg. |
Reviewer: Marshall Hampton |
TOPCOM is a C++ program for triangulating polyhedra. More generally, it can find a single triangulation as well as enumerate all triangulations of a "point configuration", that is, the convex hull of points in euclidean space such that all vertices of simplices of the triangulation are in the given (finite) list of points.
One problem with the upstream distribution is that it statically links many helper programs, yielding almost 200mb of binaries. Therefore, I changed the TOPCOM build system to dynamically link TOPCOM via libtools to reduce size
My libtoolized TOPCOM spkg is here:
http://www.stp.dias.ie/~vbraun/Sage/spkg/TOPCOM-0.16.2.p2.spkg
None of the patches in this ticket should be applied to the Sage library! The TOPCOM binaries are (optionally) used by the patches in #9918: triangulate point configurations.
CC: @sagetrac-mhampton @novoselt
Component: packages: optional
Author: Volker Braun
Reviewer: Marshall Hampton
Issue created by migration from https://trac.sagemath.org/ticket/8169
The text was updated successfully, but these errors were encountered: