problems installing TOPCOM for triangulations?

231 views
Skip to first unread message

Ursula

unread,
Jul 1, 2013, 4:19:50 PM7/1/13
to sage-...@googlegroups.com
I'm running sage-5.10.rc0.

When I evaluate the following code:

p = ReflexivePolytope(3,2)
points = p.points().columns()
pointConfig = PointConfiguration(points)
regular = pointConfig.restrict_to_regular_triangulations(True)
regular

I get the error:

You must install TOPCOM to test for regularity.

But I have installed TOPCOM, using the command install_package('TOPCOM') in the notebook!

Any ideas what is going on? The full traceback on my error message is:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_12.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cCA9IFJlZmxleGl2ZVBvbHl0b3BlKDMsMikKcG9pbnRzID0gcC5wb2ludHMoKS5jb2x1bW5zKCkKcG9pbnRDb25maWcgPSBQb2ludENvbmZpZ3VyYXRpb24ocG9pbnRzKQpyZWd1bGFyID0gcG9pbnRDb25maWcucmVzdHJpY3RfdG9fcmVndWxhcl90cmlhbmd1bGF0aW9ucyhUcnVlKQpyZWd1bGFy"),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmpVZpwc_/___code___.py", line 6, in <module> regular = pointConfig.restrict_to_regular_triangulations(True) File "/home/whitchua/sage-5.10.rc0/local/lib/python2.7/site-packages/sage/geometry/triangulation/point_configuration.py", line 790, in restrict_to_regular_triangulations star=self._star) File "classcall_metaclass.pyx", line 330, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1224) File "/home/whitchua/sage-5.10.rc0/local/lib/python2.7/site-packages/sage/geometry/triangulation/point_configuration.py", line 311, in __classcall__ .__classcall__(cls, points, connected, fine, regular, star, defined_affine) File "cachefunc.pyx", line 992, in sage.misc.cachefunc.WeakCachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:5394) File "/home/whitchua/sage-5.10.rc0/local/lib/python2.7/site-packages/sage/structure/unique_representation.py", line 447, in __classcall__ instance = typecall(cls, *args, **options) File "classcall_metaclass.pyx", line 518, in sage.misc.classcall_metaclass.typecall (build/cythonized/sage/misc/classcall_metaclass.c:1586) File "/home/whitchua/sage-5.10.rc0/local/lib/python2.7/site-packages/sage/geometry/triangulation/point_configuration.py", line 342, in __init__ raise ValueError, 'You must install TOPCOM to test for regularity.' ValueError: You must install TOPCOM to test for regularity.

--Ursula Whitcher.

William Stein

unread,
Jul 1, 2013, 5:22:44 PM7/1/13
to sage-...@googlegroups.com
On Mon, Jul 1, 2013 at 1:19 PM, Ursula <whit...@uwec.edu> wrote:
> I'm running sage-5.10.rc0.
>
> When I evaluate the following code:
>
> p = ReflexivePolytope(3,2)
> points = p.points().columns()
> pointConfig = PointConfiguration(points)
> regular = pointConfig.restrict_to_regular_triangulations(True)
> regular
>
> I get the error:
>
> You must install TOPCOM to test for regularity.

For what it is worth, when I run the above on
https://cloud.sagemath.com, where Sage is v 5.10 and the TOPCOM
packaged is installed, I get this output:

Exception pexpect.ExceptionPexpect: ExceptionPexpect() in <generator
object _TOPCOM_exec at 0x9185c30> ignored
A point configuration in QQ^3 consisting of 6 points. The
triangulations of this point configuration are assumed to be
connected, not necessarily fine, regular.
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
Screenshot 2013-07-01 at 2.22.33 PM.png

Volker Braun

unread,
Jul 1, 2013, 9:26:01 PM7/1/13
to sage-...@googlegroups.com
The interface checks whether the utility program "points2placingtriang" from TOPCOM is available, and didn't find it in your install. Do you have Sage's current spkg of TOPCOM installed or some other version?

Just for the record, you almost certainly want 

regular.restrict_to_star_triangulations([0,0,0])

as well.

Ursula Whitcher

unread,
Jul 1, 2013, 9:36:36 PM7/1/13
to sage-...@googlegroups.com
On 7/1/2013 8:26 PM, Volker Braun wrote:
> The interface checks whether the utility program "points2placingtriang"
> from TOPCOM is available, and didn't find it in your install. Do you
> have Sage's current spkg of TOPCOM installed or some other version?

I ran

install_package('TOPCOM')

from the notebook command line, so I have whatever version installed
automatically.

> Just for the record, you almost certainly want
>
> regular.restrict_to_star_triangulations([0,0,0])
>
> as well.

Not actually, I'm not trying to construct a fan for a toric variety :)

UAW

Volker Braun

unread,
Jul 1, 2013, 9:42:57 PM7/1/13
to sage-...@googlegroups.com
You need to restart the notebook since the test output is cached...

Volker Braun

unread,
Jul 1, 2013, 9:43:15 PM7/1/13
to sage-...@googlegroups.com
This sounds even worse, the triangulation module is pure python but you got an exception ignored which must have come from some C/Cython code. 

Ursula Whitcher

unread,
Jul 2, 2013, 2:26:03 PM7/2/13
to sage-...@googlegroups.com
On 7/1/2013 8:42 PM, Volker Braun wrote:
> You need to restart the notebook since the test output is cached...

Yes, that seems to have solved the problem. You might want to add a
note to this effect in the documentation for Triangulations of a point
configuration.

--Ursula.

Volker Braun

unread,
Jul 2, 2013, 2:51:43 PM7/2/13
to sage-...@googlegroups.com
I agree that this is a usability wart... though really I think the whole idea of installing further components while Sage is running is a bad design choice. For example, if you end up modifying shared libraries that are currently mmaped then bad things will happen.

Ursula Whitcher

unread,
Jul 3, 2013, 11:06:02 AM7/3/13
to sage-...@googlegroups.com
On 7/2/2013 1:51 PM, Volker Braun wrote:
> I agree that this is a usability wart... though really I think the whole
> idea of installing further components while Sage is running is a bad
> design choice. For example, if you end up modifying shared libraries
> that are currently mmaped then bad things will happen.

So why doesn't TOPCOM install with Sage by default?

UAW

Volker Braun

unread,
Jul 3, 2013, 11:57:06 AM7/3/13
to sage-...@googlegroups.com
On Wednesday, July 3, 2013 11:06:02 AM UTC-4, Ursula wrote:
So why doesn't TOPCOM install with Sage by default?

Its a relatively large package for relatively small feature (regularity testing of generated triangulations and finding triangulations that are not connected by flips to the regular triangulations). The regularity testing could easily done in Python/PPL, too---the toric Kahler cone stuff basically has all the necessary code. 

TOPCOM is faster at enumerating but incurs a constant slowdown for going through a pexpect interface.
Reply all
Reply to author
Forward
0 new messages