First time here? Check out the FAQ!

Ask Your Question
0

Modifying PALP settings

asked 13 years ago

Cody gravatar image

updated 13 years ago

I encounter an error from PALP when I try to create a dual cone. I create a cone Cstar as an intersection of several other cones, then try to create its dual:

Cstar.dual();

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_25.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Q3N0YXIuZHVhbCgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmpFOwj4h/___code___.py", line 2, in <module>
    exec compile(u'Cstar.dual()
  File "", line 1, in <module>

  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/cone.py", line 1608, in dual
    rays = list(self.facet_normals())
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/cone.py", line 2123, in facet_normals
    for i in range(P.nfacets()):
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 2196, in nfacets
    if self.is_reflexive():
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 1930, in is_reflexive
    self._read_equations(self.poly_x("e"))
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 2712, in poly_x
    return self._palp("poly.x -f" + keys, reduce_dimension)
  File "/opt/sage47/local/lib/python2.6/site-packages/sage/geometry/lattice_polytope.py", line 1026, in _palp
    self, self.vertices(), result)
ValueError: Error executing "poly.x -fe" for the given polytope!
Polytope: A lattice polytope: 10-dimensional, 47 vertices.
Vertices:
...[a large matrix]
Output:
increase POLY_Dmax!

How do I increase POLY_Dmax?

Preview: (hide)

Comments

Can you post the Sage code you used to produce the error?

benjaminfjones gravatar imagebenjaminfjones ( 13 years ago )

Edited to include the code.

Cody gravatar imageCody ( 13 years ago )

2 Answers

Sort by » oldest newest most voted
2

answered 13 years ago

Volker Braun gravatar image

The latest Sage development version does not use PALP for cones any more, partly because it suffers from compile-time limits. Now it uses PPL and has no limits (besides ram and cpu time) for all practical purposes. And is faster, too :-) You need Sage-4.7.1-alpha1 or higher.

For the record, though, if you really want to use PALP for higher-dimensional problems then you must edit its Global.h header. PALP has no bounds checking, so make sure to increase the maximal number of points to suit your problem, too. Just increasing POLY_Dmax is likely to end up in segfaults.

Preview: (hide)
link
1

answered 13 years ago

benjaminfjones gravatar image

Looking through the source code of sage/geometry/lattice_polytope.py I found the method which is calling PALP, it is poly_x. In the documentation for poly_x there is an example which suggests that PALP has certain limits which are determined at compile time:

IMPORTANT: PALP requires some parameters to be determined during
   compilation time, i.e., the maximum dimension of polytopes, the
   maximum number of points, etc. These limitations may lead to errors
   during calls to different functions of these module.

Thus, it looks like you can't change POLY_Dmax unless you rebuild PALP manually. It might be a good idea to post your question to the sage-support list and mention the authors of the Sage interface to PALP: Andrey Novoseltsev and William Stein.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 13 years ago

Seen: 549 times

Last updated: Jul 11 '11