# Modifying PALP settings

 0 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 "", line 1, in File "_sage_input_25.py", line 10, in 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 File "/tmp/tmpFOwj4h/___code___.py", line 2, in exec compile(u'Cstar.dual() File "", line 1, in 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? asked Jul 10 '11 Cody 15 ● 4 Can you post the Sage code you used to produce the error? benjaminfjones (Jul 10 '11) Edited to include the code. Cody (Jul 10 '11)

 2 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. posted Jul 11 '11 Volker Braun 2666 ● 9 ● 24 ● 59
 1 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. posted Jul 10 '11 benjaminfjones 2545 ● 4 ● 36 ● 67 http://bfj7.com/

[hide preview]