On Feb 11, 10:20 am, Nathan Dunfield <nat...@dunfield.info> wrote:
Hi,
> > > 2. SnapPea
> > > SnapPea is a program for creating and studying hyperbolic 3-manifolds
> > > (http://www.geometrygames.org/SnapPea-old/index.html). It seems to be
> > > widely used by computational topologists. AFAIK it can deal with ideal
> > > triangulations, compute volume, has a census of hyperbolic manifolds,
> > > can also work with hyperbolic knots, etc.
> > > If I understand correctly, it is under GNU GPL and may be used as a
> > > Python module.
>
> > A longtime Sage user -- Nathan Dunfield -- I think wrote the Python
> > interface, and uses SnapPea from Sage for his research.
>
> Actually, most of the current Python interface was written by Jeff
> Weeks, the author of SnapPea itself. The most recent version is
> available here:
>
> http://www.math.uic.edu/~t3m/
>
> However, Marc Culler and I are working on a new interface making use
> of Cython. It works with vanilla Python but includes some Sage-
> specific features, in particular using GAP, Pari, and Magma (when
> available) to do the algebraic heavy-lifting when finding finite
> covers and computing homology (which boils down to finding the smith
> normal form).
> ----
> There is also a modified version of SnapPea called Snap:
>
> http://snap-pari.sourceforge.net/
>
> which uses the Pari C-library to compute arithmetic invariants of
> hyperbolic 3-manifolds. If one were writing it today, one would no
> doubt use Sage instead. Indeed, I implemented the most basic features
> of Snap in just a few pages of Sage code as a proof of concept.
Ok.
> -----
> Some examples of using SnapPea and Sage together can be found at
>
> http://dunfield.info/fibered-faces/
>
> which is a computational supplement to my paper with Dinakar
> Ramakrishnan:
>
> http://arxiv.org/abs/0712.3243
>
> Best,
>
> Nathan
Having glanced at the other projects this one seems to be the most
promising, but it certainly seems rather strange regarding build
system and so on. I.e. I did not see any obvious way to build the
kernel as a library for example. There is no meaningful documentation,
but a longer worded version of RTFS :). So I did poke around in the
makefile and build some project foo I made up. Compilation of the 3.0
release instantly failed because a 4 line comment was in
fundamental_group.c:
gcc -c -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-
declarations -I/Users/michaelabshoff/Desktop/foo/SnapPea/
SnapPeaKernel/headers/ -I/Users/michaelabshoff/Desktop/foo/SnapPea/
SnapPeaKernel/unix_kit/ foo.c
mkdir -p KernelObjects
cd KernelObjects;
\
date > BuildDate;
\
gcc -c -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-
declarations -I/Users/michaelabshoff/Desktop/foo/SnapPea/
SnapPeaKernel/headers/ -I/Users/michaelabshoff/Desktop/foo/SnapPea/
SnapPeaKernel/unix_kit/ \
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/code/
*.c \
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/unix_kit/
unix_UI.c \
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/unix_kit/
unix_cusped_census.c \
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/unix_kit/
unix_file_io.c
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/code/
fundamental_group.c: In function ‘simplify’:
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/code/
fundamental_group.c:1367: error: ‘This’ undeclared (first use in this
function)
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/code/
fundamental_group.c:1367: error: (Each undeclared identifier is
reported only once
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/code/
fundamental_group.c:1367: error: for each function it appears in.)
/Users/michaelabshoff/Desktop/foo/SnapPea/SnapPeaKernel/code/
fundamental_group.c:1367: error: syntax error before ‘call’
After commenting this comment out it actually compiled the unix_kit on
OSX, but never the kernel. I could not find any documentation or
anything resembling a Makefile for the kernel, but the website
eventually lead me to a file called MAKEFILE in the Python directory.
One would obviously build the kernel as a static or dynamic lib from
inside the kernel directory.
After fixing all those various small issues the final link stage blows
up since we do not actually link any libpython2.5.a into the shared
library (and the flags are all wrong, etc):
gcc -shared -o SnapPeaC.so -m64 -g -Wall -Wstrict-prototypes -Wmissing-
prototypes -Wmissing-declarations \
SnapPeaC.o
\
KernelObjects/*.o \
-lm
<BOOM>
In any case: Besides the obvious build system cleanup required for
this to stand a chance to become standard in Sage the licenses has the
be clear. Currently I see
* SnapPea 2.0 was funded by the University of Minnesota's
* Geometry Center and the U.S. National Science Foundation.
* SnapPea 3.0 is funded by the U.S. National Science Foundation
* and the MacArthur Foundation. SnapPea and its source code may
* be used freely for all noncommercial purposes. Please direct
* questions, problems and suggestions to Jeff Weeks
* (www.geometrygames.org/contact.html).
If that is the case and the license still forbids commercial use there
is no chance this code will ever make it into standard Sage. It is
also worrisome that the last dated release (3.0d3) was dates in 2000.
Cheers,
Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---