Skip to content
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

Support interface coercion polymake(X) for Polyhedron #22658

Closed
mkoeppe opened this issue Mar 20, 2017 · 107 comments
Closed

Support interface coercion polymake(X) for Polyhedron #22658

mkoeppe opened this issue Mar 20, 2017 · 107 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Mar 20, 2017

Following up on the Polymake pexpect interface (#22452), we make it easy to make a polymake object corresponding to a given Polyhedron.

We use the standard interface coercion protocol by defining SageObject._polymake_ and a default method SageObject._polymake_init_, which is overridden for Polyhedron_base and for several rings.

Basic example (see Polyhedron_base._polymake_init_ for more):

            sage: P = polytopes.cube()
            sage: PP = polymake(P)         # optional - polymake
            sage: PP.N_VERTICES            # optional - polymake
            8

Example of an algebraic polyhedron:

            sage: P = polytopes.dodecahedron(); P
            A 3-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5)^3 defined as the convex hull of 20 vertices
            sage: print("There may be a recompilation warning"); PP = polymake(P); PP
            There may be a recompilation warning...
            Polytope<QuadraticExtension<Rational>>[...]
            sage: sorted(PP.VERTICES[:])[0]
            1 1-1r5 4-2r5 0

The branch is on top of #22452; and it also contains a quick fix for the polymake interface regarding the way that files are used to send long commands.

Depends on #22452

CC: @simon-king-jena @jplab @videlec @tscrim @yuan-zhou @dimpase

Component: geometry

Keywords: days84

Author: Matthias Koeppe, Simon King

Branch/Commit: d7d4234

Reviewer: Jean-Philippe Labbé, Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/22658

@mkoeppe mkoeppe added this to the sage-8.0 milestone Mar 20, 2017
@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 21, 2017

comment:1

I immediately ran into a problem:

sage: polymake.new_object("Polytope", FACETS=[[12, -2, -3, -5, -8, -13, -21, -34, -55],
....:  [0, 1, 0, 0, 0, 0, 0, 0, 0],
....:  [0, 0, 0, 0, 0, 0, 0, 0, 1],
....:  [0, 0, 0, 0, 0, 0, 0, 1, 0],
....:  [0, 0, 0, 0, 0, 0, 1, 0, 0],
....:  [0, 0, 0, 0, 0, 1, 0, 0, 0],
....:  [0, 0, 0, 0, 1, 0, 0, 0, 0],
....:  [0, 0, 0, 1, 0, 0, 0, 0, 0],
....:  [0, 0, 1, 0, 0, 0, 0, 0, 0]])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-a71d30984154> in <module>()
      7  [Integer(0), Integer(0), Integer(0), Integer(0), Integer(1), Integer(0), Integer(0), Integer(0), Integer(0)],
      8  [Integer(0), Integer(0), Integer(0), Integer(1), Integer(0), Integer(0), Integer(0), Integer(0), Integer(0)],
----> 9  [Integer(0), Integer(0), Integer(1), Integer(0), Integer(0), Integer(0), Integer(0), Integer(0), Integer(0)]])

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in new_object(self, name, *args, **kwds)
   1201         except KeyError:
   1202             f = self.__new[name] = self._function_class()(self, "new %s"%name)
-> 1203         return f(*args, **kwds)
   1204 
   1205 polymake = Polymake()

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, *args, **kwds)
    627 
    628     def __call__(self, *args, **kwds):
--> 629         return self._parent.function_call(self._name, list(args), kwds)
    630 
    631     def _sage_doc_(self):

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in function_call(self, function, args, kwds)
    269 
    270         """
--> 271         args, kwds = self._convert_args_kwds(args, kwds)
    272         self._check_valid_function_name(function)
    273         s = self._function_call_string(function,

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/interface.pyc in _convert_args_kwds(self, args, kwds)
    512         for key, value in iteritems(kwds):
    513             if not isinstance(value, InterfaceElement) or value.parent() is not self:
--> 514                 kwds[key] = self(value)
    515 
    516         return args, kwds

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, x, name)
    270                 return cls(self, str(x), name=name)
    271             except TypeError:
--> 272                 raise TypeError(msg)
    273 
    274     def _coerce_from_special_method(self, x):

TypeError: Polymake terminated unexpectedly while reading in a large line:
reference to an undeclared variable @SAGE21 at /Users/mkoeppe/.sage/temp/campus-005-030.ucdavis.edu/69025/interface/tmp69091 line 1.

When I enter the same a second time, I get this interesting "recompilation failure"...

sage: polymake.new_object("Polytope", FACETS=[[12, -2, -3, -5, -8, -13, -21, -34, -55],
....:  [0, 1, 0, 0, 0, 0, 0, 0, 0],
....:  [0, 0, 0, 0, 0, 0, 0, 0, 1],
....:  [0, 0, 0, 0, 0, 0, 0, 1, 0],
....:  [0, 0, 0, 0, 0, 0, 1, 0, 0],
....:  [0, 0, 0, 0, 0, 1, 0, 0, 0],
....:  [0, 0, 0, 0, 1, 0, 0, 0, 0],
....:  [0, 0, 0, 1, 0, 0, 0, 0, 0],
....:  [0, 0, 1, 0, 0, 0, 0, 0, 0]])
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.py:1019: RuntimeWarning: Recompiling application common in extension /Users/mkoeppe/.polymake/wrappers.0, please be patient...
  warnings.warn(w, RuntimeWarning)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-a71d30984154> in <module>()
      7  [Integer(0), Integer(0), Integer(0), Integer(0), Integer(1), Integer(0), Integer(0), Integer(0), Integer(0)],
      8  [Integer(0), Integer(0), Integer(0), Integer(1), Integer(0), Integer(0), Integer(0), Integer(0), Integer(0)],
----> 9  [Integer(0), Integer(0), Integer(1), Integer(0), Integer(0), Integer(0), Integer(0), Integer(0), Integer(0)]])

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in new_object(self, name, *args, **kwds)
   1201         except KeyError:
   1202             f = self.__new[name] = self._function_class()(self, "new %s"%name)
-> 1203         return f(*args, **kwds)
   1204 
   1205 polymake = Polymake()

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, *args, **kwds)
    627 
    628     def __call__(self, *args, **kwds):
--> 629         return self._parent.function_call(self._name, list(args), kwds)
    630 
    631     def _sage_doc_(self):

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in function_call(self, function, args, kwds)
    274                                        [s.name() for s in args],
    275                                        ['%s=>%s'%(key,value.name()) for key, value in kwds.items()])
--> 276         return self(s)
    277 
    278     def _function_call_string(self, function, args, kwds):

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, x, name)
    257 
    258         if isinstance(x, six.string_types):
--> 259             return cls(self, x, name=name)
    260         try:
    261             return self._coerce_from_special_method(x)

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
   1386             except (RuntimeError, ValueError) as x:
   1387                 self._session_number = -1
-> 1388                 raise_(TypeError, x, sys.exc_info()[2])
   1389             except BaseException:
   1390                 self._session_number = -1

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
   1381         else:
   1382             try:
-> 1383                 self._name = parent._create(value, name=name)
   1384             # Convert ValueError and RuntimeError to TypeError for
   1385             # coercion to work properly.

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in _create(self, value, name)
    603         """
    604         name = self._next_var_name() if name is None else name
--> 605         self.set(name, value)
    606         # If value is a list, then @name is now equal to that list.
    607         # Otherwise, value is obtained by $name[0]. So, we modify

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in set(self, var, value)
    668             value = value.strip().rstrip(';').strip()
    669         cmd = '@%s%s(%s);'%(var,self._assign_symbol(), value)
--> 670         self.eval(cmd)
    671 
    672     def get(self, cmd):

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1298                 elif split_lines:
   1299                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1300                                         for L in code.split('\n') if L != ''])
   1301                 else:
   1302                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed, **kwds)
   1019             warnings.warn(w, RuntimeWarning)
   1020         for e in p_errors:
-> 1021             raise PolymakeError(e)
   1022         return out
   1023 

TypeError: Shared module compilation failed; see the error log below

/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc: In instantiation of 'static sv* polymake::common::{anonymous}::Wrapper4perl_new_X<T0, T1>::call(sv**, char*) [with T0 = pm::Matrix<pm::Rational>; T1 = int]':
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/perl/wrappers.h:253:21:   required from 'static void pm::perl::WrapperBase<Wrapper>::register_it(const char (&)[namelen], const char (&)[filelen], int, _app_list) [with long unsigned int namelen = 6ul; long unsigned int filelen = 72ul; _app_list = int; Wrapper = polymake::common::{anonymous}::Wrapper4perl_new_X<pm::Matrix<pm::Rational>, int>]'
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:10:182:   required from 'polymake::common::{anonymous}::Wrapper4perl_new_X<T0, T1>::Wrapper4perl_new_X(const char (&)[fl], int, first_arg_type) [with long unsigned int fl = 72ul; first_arg_type = int; T0 = pm::Matrix<pm::Rational>; T1 = int]'
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:15:90:   required from here
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: error: no matching function for call to 'pm::Matrix<pm::Rational>::Matrix(pm::perl::access<int, int>::return_type)'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:166:4: note: candidate: template<class Container> pm::Matrix<E>::Matrix(void*, int, int, const Container&, typename pm::construct_cascaded_iterator<typename Container::const_iterator, E, pm::dense>::enabled, typename pm::enable_if<void**, (pm::construct_cascaded_iterator<typename Container::const_iterator, E, pm::dense>::depth == 2)>::type)
    Matrix(void *place, int r, int c, const Container& src,
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:166:4: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   cannot convert 'arg0.pm::perl::Value::get<int>()' (type 'pm::perl::access<int, int>::return_type {aka int}') to type 'void*'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:161:4: note: candidate: template<class Iterator> pm::Matrix<E>::Matrix(void*, int, int, Iterator, typename pm::construct_cascaded_iterator<Iterator, E, pm::dense>::enabled)
    Matrix(void *place, int r, int c, Iterator src,
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:161:4: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   cannot convert 'arg0.pm::perl::Value::get<int>()' (type 'pm::perl::access<int, int>::return_type {aka int}') to type 'void*'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:158:4: note: candidate: pm::Matrix<E>::Matrix(void*, int, int) [with E = pm::Rational]
    Matrix(void *place, int r, int c) : base(place,r,c) {}
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:158:4: note:   candidate expects 3 arguments, 1 provided
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:151:13: note: candidate: template<class Container> pm::Matrix<E>::Matrix(const Container&, typename pm::construct_cascaded_iterator<typename Container::const_iterator, E, pm::dense>::enabled, typename pm::enable_if<void**, (pm::construct_cascaded_iterator<typename Container::const_iterator, E, pm::dense>::depth == 2)>::type)
    explicit Matrix(const Container& src,
             ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:151:13: note:   template argument deduction/substitution failed:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h: In substitution of 'template<class Container> pm::Matrix<E>::Matrix(const Container&, typename pm::construct_cascaded_iterator<typename Container::const_iterator, E, pm::dense>::enabled, typename pm::enable_if<void**, (pm::construct_cascaded_iterator<typename Container::const_iterator, E, pm::dense>::depth == 2)>::type) [with Container = int]':
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67:   required from 'static sv* polymake::common::{anonymous}::Wrapper4perl_new_X<T0, T1>::call(sv**, char*) [with T0 = pm::Matrix<pm::Rational>; T1 = int]'
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/perl/wrappers.h:253:21:   required from 'static void pm::perl::WrapperBase<Wrapper>::register_it(const char (&)[namelen], const char (&)[filelen], int, _app_list) [with long unsigned int namelen = 6ul; long unsigned int filelen = 72ul; _app_list = int; Wrapper = polymake::common::{anonymous}::Wrapper4perl_new_X<pm::Matrix<pm::Rational>, int>]'
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:10:182:   required from 'polymake::common::{anonymous}::Wrapper4perl_new_X<T0, T1>::Wrapper4perl_new_X(const char (&)[fl], int, first_arg_type) [with long unsigned int fl = 72ul; first_arg_type = int; T0 = pm::Matrix<pm::Rational>; T1 = int]'
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:15:90:   required from here
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:153:127: error: 'int' is not a class, struct, or union type
                    typename enable_if<void**, construct_cascaded_iterator<typename Container::const_iterator, E, dense>::depth==2>::type=0)
                                                                                                                               ^
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc: In instantiation of 'static sv* polymake::common::{anonymous}::Wrapper4perl_new_X<T0, T1>::call(sv**, char*) [with T0 = pm::Matrix<pm::Rational>; T1 = int]':
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/perl/wrappers.h:253:21:   required from 'static void pm::perl::WrapperBase<Wrapper>::register_it(const char (&)[namelen], const char (&)[filelen], int, _app_list) [with long unsigned int namelen = 6ul; long unsigned int filelen = 72ul; _app_list = int; Wrapper = polymake::common::{anonymous}::Wrapper4perl_new_X<pm::Matrix<pm::Rational>, int>]'
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:10:182:   required from 'polymake::common::{anonymous}::Wrapper4perl_new_X<T0, T1>::Wrapper4perl_new_X(const char (&)[fl], int, first_arg_type) [with long unsigned int fl = 72ul; first_arg_type = int; T0 = pm::Matrix<pm::Rational>; T1 = int]'
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:15:90:   required from here
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:146:13: note: candidate: template<class Matrix2, class E2> pm::Matrix<E>::Matrix(const pm::GenericMatrix<Matrix2, E2>&, typename pm::enable_if<void**, pm::explicitly_convertible_to<E2, E>::value>::type)
    explicit Matrix(const GenericMatrix<Matrix2, E2>& m,
             ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:146:13: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   mismatched types 'const pm::GenericMatrix<Matrix, E>' and 'pm::perl::access<int, int>::return_type {aka int}'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:141:13: note: candidate: template<class Matrix2, class E2> pm::Matrix<E>::Matrix(const pm::GenericMatrix<Matrix2, E2>&, typename pm::enable_if<void**, pm::convertible_to<E2, E>::value>::type)
    explicit Matrix(const GenericMatrix<Matrix2, E2>& m,
             ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:141:13: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   mismatched types 'const pm::GenericMatrix<Matrix, E>' and 'pm::perl::access<int, int>::return_type {aka int}'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:136:4: note: candidate: template<class Matrix2> pm::Matrix<E>::Matrix(const pm::GenericMatrix<Matrix2, E>&)
    Matrix(const GenericMatrix<Matrix2, E>& m)
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:136:4: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   mismatched types 'const pm::GenericMatrix<Matrix2, pm::Rational>' and 'pm::perl::access<int, int>::return_type {aka int}'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:132:4: note: candidate: pm::Matrix<E>::Matrix(const pm::GenericMatrix<pm::Matrix<E> >&) [with E = pm::Rational; typename pm::Matrix<E>::element_type = pm::Rational]
    Matrix(const GenericMatrix<Matrix>& m) : base(m.top()) {}
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:132:4: note:   no known conversion for argument 1 from 'pm::perl::access<int, int>::return_type {aka int}' to 'const pm::GenericMatrix<pm::Matrix<pm::Rational>, pm::Rational>&'
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:123:4: note: candidate: template<class Iterator> pm::Matrix<E>::Matrix(int, int, Iterator, typename pm::construct_cascaded_iterator<Iterator, E, pm::dense>::enabled)
    Matrix(int r, int c, Iterator src,
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:123:4: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   candidate expects 4 arguments, 1 provided
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:115:13: note: candidate: template<class E2, long unsigned int r, long unsigned int c> pm::Matrix<E>::Matrix(const E2 (&)[r][c], typename pm::enable_if<void**, pm::explicitly_convertible_to<E2, E>::value>::type)
    explicit Matrix(const E2 (&a)[r][c],
             ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:115:13: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   mismatched types 'const E2 [r][c]' and 'pm::perl::access<int, int>::return_type {aka int}'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:110:13: note: candidate: template<class E2, long unsigned int r, long unsigned int c> pm::Matrix<E>::Matrix(const E2 (&)[r][c], typename pm::enable_if<void**, pm::convertible_to<E2, E>::value>::type)
    explicit Matrix(const E2 (&a)[r][c],
             ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:110:13: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   mismatched types 'const E2 [r][c]' and 'pm::perl::access<int, int>::return_type {aka int}'
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:105:4: note: candidate: template<class E2> pm::Matrix<E>::Matrix(int, int, const E2&, typename pm::enable_if<void**, pm::explicitly_convertible_to<E2, E>::value>::type)
    Matrix(int r, int c, const E2& init,
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:105:4: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   candidate expects 4 arguments, 1 provided
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:100:4: note: candidate: template<class E2> pm::Matrix<E>::Matrix(int, int, const E2&, typename pm::enable_if<void**, pm::convertible_to<E2, E>::value>::type)
    Matrix(int r, int c, const E2& init,
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:100:4: note:   template argument deduction/substitution failed:
/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:12:67: note:   candidate expects 4 arguments, 1 provided
In file included from /Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/Matrix.h:20:0,
                 from /var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.cc:5:
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:97:4: note: candidate: pm::Matrix<E>::Matrix(int, int) [with E = pm::Rational]
    Matrix(int r, int c) : base(r,c) {}
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:97:4: note:   candidate expects 2 arguments, 1 provided
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:94:4: note: candidate: pm::Matrix<E>::Matrix() [with E = pm::Rational]
    Matrix() {}
    ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:94:4: note:   candidate expects 0 arguments, 1 provided
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:77:7: note: candidate: pm::Matrix<pm::Rational>::Matrix(const pm::Matrix<pm::Rational>&)
 class Matrix :
       ^
/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/include/polymake/next/Matrix.h:77:7: note:   no known conversion for argument 1 from 'pm::perl::access<int, int>::return_type {aka int}' to 'const pm::Matrix<pm::Rational>&'
make: *** [/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gn/T//poly69091Taaaa0001.o] Error 1

@simon-king-jena
Copy link
Member

comment:3

The problem arises when converting the list of lists of integers:

sage: polymake([[12, -2, -3, -5, -8, -13, -21, -34, -55],
....:  [0, 1, 0, 0, 0, 0, 0, 0, 0],
....:  [0, 0, 0, 0, 0, 0, 0, 0, 1],
....:  [0, 0, 0, 0, 0, 0, 0, 1, 0],
....:  [0, 0, 0, 0, 0, 0, 1, 0, 0],
....:  [0, 0, 0, 0, 0, 1, 0, 0, 0],
....:  [0, 0, 0, 0, 1, 0, 0, 0, 0],
....:  [0, 0, 0, 1, 0, 0, 0, 0, 0],
....:  [0, 0, 1, 0, 0, 0, 0, 0, 0]])
Traceback (most recent call last):
...
TypeError: Polymake terminated unexpectedly while reading in a large line:
reference to an undeclared variable @SAGE9 at /home/king/.sage/temp/king-ThinkPad-T430/4038/interface/tmp4212 line 1.

@simon-king-jena
Copy link
Member

comment:4

The interesting thing is that in the file there is no reference to a variable. Instead, a variable (with a different name) is defined in the file.

@simon-king-jena
Copy link
Member

comment:5

Is that a bug in polymake, perhaps? The content of the file is

@SAGE47=([[12, -2, -3, -5, -8, -13, -21, -34, -55], [0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0]]);

When I feed this directly into polymake, all is fine. But when I read it as a script, I get

polytope > script "/home/king/.sage/temp/king-ThinkPad-T430/4038/interface/tmp4212";

polymake:  ERROR: reference to an undeclared variable @SAGE47 at /home/king/.sage/temp/king-ThinkPad-T430/4038/interface/tmp4212 line 1.

Question to polymake experts: Is polymake interpreting a script differently from a user interaction?

@simon-king-jena
Copy link
Member

comment:6

I posted the question in the polymake forum

@simon-king-jena
Copy link
Member

comment:7

Apparently it is safer to use declare @SAGE47=...;. I wonder why so far it has worked without "declare", but I was told that when reading a script, variables need to be declared explicitly, either by my or by declare, depending on whether they are only declared in the script or shall still be available later.

That said, after changing the set() method, I get a different error:

polymake.new_object("Polytope", FACETS=[[12, -2, -3, -5, -8, -13, -21, -34, -55],
....:  [0, 1, 0, 0, 0, 0, 0, 0, 0],
....:  [0, 0, 0, 0, 0, 0, 0, 0, 1],
....:  [0, 0, 0, 0, 0, 0, 0, 1, 0],
....:  [0, 0, 0, 0, 0, 0, 1, 0, 0],
....:  [0, 0, 0, 0, 0, 1, 0, 0, 0],
....:  [0, 0, 0, 0, 1, 0, 0, 0, 0],
....:  [0, 0, 0, 1, 0, 0, 0, 0, 0],
....:  [0, 0, 1, 0, 0, 0, 0, 0, 0]])
Traceback (most recent call last):
...
TypeError: multiple declaration of a variable at input line 1.

Also, the following is not what I was hoping for:

sage: polymake([[12, -2, -3, -5, -8, -13, -21, -34, -55],
....:  [0, 1, 0, 0, 0, 0, 0, 0, 0],
....:  [0, 0, 0, 0, 0, 0, 0, 0, 1],
....:  [0, 0, 0, 0, 0, 0, 0, 1, 0],
....:  [0, 0, 0, 0, 0, 0, 1, 0, 0],
....:  [0, 0, 0, 0, 0, 1, 0, 0, 0],
....:  [0, 0, 0, 0, 1, 0, 0, 0, 0],
....:  [0, 0, 0, 1, 0, 0, 0, 0, 0],
....:  [0, 0, 1, 0, 0, 0, 0, 0, 0]])
0

@simon-king-jena
Copy link
Member

comment:8

Probably the reason for the new error is that on the command line, a variable can be declared only once. But certainly Perl/polymake allows to explicitly un-declare a variable. So, as soon I have found out how to un-declare, I can fix that.

@simon-king-jena
Copy link
Member

comment:9

It REALLY SUCKS that trac keeps logging me out automatically after short time!

What I wanted to say: At polymake forum I was told that scripts somehow are cached - which basically means that the use of scripts in order to send commands to polymake is leaking memory.

So, perhaps better disallow using files. When I do it, the definition of the polytope initially seems to work:

sage: P = polymake.new_object("Polytope", FACETS=[[12, -2, -3, -5, -8, -13, -21, -34, -55],
....:  [0, 1, 0, 0, 0, 0, 0, 0, 0],
....:  [0, 0, 0, 0, 0, 0, 0, 0, 1],
....:  [0, 0, 0, 0, 0, 0, 0, 1, 0],
....:  [0, 0, 0, 0, 0, 0, 1, 0, 0],
....:  [0, 0, 0, 0, 0, 1, 0, 0, 0],
....:  [0, 0, 0, 0, 1, 0, 0, 0, 0],
....:  [0, 0, 0, 1, 0, 0, 0, 0, 0],
....:  [0, 0, 1, 0, 0, 0, 0, 0, 0]])
sage: P
Polytope<Rational>[SAGE185]
sage: P.N_FACETS
9

but alas, something goes foobar:

sage: P.VERTICES
Traceback (most recent call last):
...
AttributeError:

whereas in a polymake session I get

polytope > $P = new Polytope(FACETS=>[[12, -2, -3, -5, -8, -13, -21, -34, -55], [0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0]]);

polytope > print $P->VERTICES;
polymake: used package ppl
  The Parma Polyhedra Library (PPL): A C++ library for convex polyhedra
  and other numerical abstractions.
  http://www.cs.unipr.it/ppl/

1 6 0 0 0 0 0 0 0
1 0 4 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 12/5 0 0 0 0 0
1 0 0 0 0 0 0 0 12/55
1 0 0 0 0 0 0 6/17 0
1 0 0 0 0 0 4/7 0 0
1 0 0 0 0 12/13 0 0 0
1 0 0 0 3/2 0 0 0 0

@simon-king-jena
Copy link
Member

comment:10

The interface seems to be out of sync in the example above:

sage: P = polymake.new_object("Polytope", FACETS=[[12, -2, -3, -5, -8, -13, -21, -34, -55],
....:  [0, 1, 0, 0, 0, 0, 0, 0, 0],
....:  [0, 0, 0, 0, 0, 0, 0, 0, 1],
....:  [0, 0, 0, 0, 0, 0, 0, 1, 0],
....:  [0, 0, 0, 0, 0, 0, 1, 0, 0],
....:  [0, 0, 0, 0, 0, 1, 0, 0, 0],
....:  [0, 0, 0, 0, 1, 0, 0, 0, 0],
....:  [0, 0, 0, 1, 0, 0, 0, 0, 0],
....:  [0, 0, 1, 0, 0, 0, 0, 0, 0]])
sage: P._name
'$SAGE91[0]'
sage: polymake.eval("print $SAGE91[0]->VERTICES;")
''
sage: polymake.eval("print $SAGE91[0]->VERTICES;")
'1 6 0 0 0 0 0 0 0\n1 0 4 0 0 0 0 0 0\n1 0 0 0 0 0 0 0 0\n1 0 0 12/5 0 0 0 0 0\n1 0 0 0 0 0 0 0 12/55\n1 0 0 0 0 0 0 6/17 0\n1 0 0 0 0 0 4/7 0 0\n1 0 0 0 0 12/13 0 0 0\n1 0 0 0 3/2 0 0 0 0\n'
sage: P.VERTICES

1 6 0 0 0 0 0 0 0
1 0 4 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 12/5 0 0 0 0 0
1 0 0 0 0 0 0 0 12/55
1 0 0 0 0 0 0 6/17 0
1 0 0 0 0 0 4/7 0 0
1 0 0 0 0 12/13 0 0 0
1 0 0 0 3/2 0 0 0 0

Or perhaps there is a different reason:

sage: polymake.eval("print $SAGE91[0]->F_VECTOR;")
'9 36 84 126 126 84 36 9'
sage: P.F_VECTOR
Traceback (most recent call last):
...
AttributeError: 

So, sometimes the attribute error is stable, sometimes it vanishes.

@jplab
Copy link

jplab commented Mar 23, 2017

comment:11

Replying to @simon-king-jena:

It REALLY SUCKS that trac keeps logging me out automatically after short time!

Maybe because your IP address changes automatically?

@simon-king-jena
Copy link
Member

comment:12

Replying to @jplab:

Replying to @simon-king-jena:

It REALLY SUCKS that trac keeps logging me out automatically after short time!

Maybe because your IP address changes automatically?

You mean my IP address could change while being connected to eduroam, or also while being connected to ethernet?

@simon-king-jena
Copy link
Member

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 23, 2017

comment:14

By the way, would it make it easier for you to stay synced if there was no terminal echo?
Then consider adding stty -echo; just before the "env". We did this in #20173 to work around a problem in the Mathematica pexpect interface.


Last 10 new commits:

f90647dReplace some tests by more realistic use cases of Polymake, and mark some others as 'random'
bcbabe5Change Input to INPUT
1238261Fix a doc link. Fix dealing with timeouts. Demonstrate how to set timeouts
94460aeAdd further tests, fix doc formatting
643d6b4Make it clearer that 'set()' is an internal function. Make reaction on interrupt more stable
a8157a4Mark three tests as optional and create a proper WARNING block.
52226e2Do not _check_valid in `_repr_`, since it is done in __repr__
726d3fdMerge branch 't/22501/make_it_easier_to_customize_pexpect_interfaces_new' into t/22452/create_a_polymake_pexpect_interface
185430fUse print function, not print statement, in doctests
2c63f8dDo not use file to send commands to polymake

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 23, 2017

Commit: 2c63f8d

@simon-king-jena
Copy link
Member

@simon-king-jena
Copy link
Member

Changed commit from 2c63f8d to none

@simon-king-jena
Copy link
Member

comment:15

Replying to @simon-king-jena:

The interface seems to be out of sync in the example above:

But it does work if I simply disallow the use of files and do not change the declaration of variables. So, I provided a quick fix plus doctest.

@simon-king-jena
Copy link
Member

Author: Simon King

@simon-king-jena
Copy link
Member

Dependencies: #22452

@jplab
Copy link

jplab commented Mar 23, 2017

comment:17

You mean my IP address could change while being connected to eduroam, or also while being connected to ethernet?

Yes, actually, the same just happened to me now to come and write this comment and I'm using eduroam (without a lan connection at the same time) ...and this never happened to me in Olot for example.

It is explains anything at all...

@jplab
Copy link

jplab commented Mar 23, 2017

Changed author from Simon King to none

@jplab
Copy link

jplab commented Mar 23, 2017

Changed dependencies from #22452 to none

@jplab
Copy link

jplab commented Mar 23, 2017

@jplab
Copy link

jplab commented Mar 23, 2017

Commit: 2c63f8d

@jplab
Copy link

jplab commented Mar 23, 2017

Author: Simon King

@jplab
Copy link

jplab commented Mar 23, 2017

Dependencies: #22452

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

07a1757Polyhedron_base._polymake_init_: Fix comment

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

Changed commit from 3b49a54 to 07a1757

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 30, 2017

comment:73

Travis, I'm not aware of anyone else reviewing this ticket.
If you'd like to take a closer look at how I use _polymake_ and _polymake_init_ in this ticket, that could be helpful. I've in part followed Simon's advice regarding these methods and in part copied what other methods of the same classes did, but it's first time I've written interface coercion methods.

@tscrim
Copy link
Collaborator

tscrim commented Mar 30, 2017

comment:74

LGTM as far as I can tell. However, there are 2 minor issues from the patchbot:

  • you didn't mark some tests as # optional in src/sage/geometry/polyhedron/base.py,
  • you have trivial doctest failures in src/doc/en/thematic_tutorials/coercion_and_categories.rst.

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

Changed commit from 07a1757 to 19d05f1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

09942e7coercion tutorial: Update introspection results
19d05f1Add more 'optional - polymake

@tscrim
Copy link
Collaborator

tscrim commented Mar 30, 2017

Reviewer: Jean-Philippe Labbé, Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Mar 30, 2017

comment:77

I think this one is unnecessary:

sage: P = polytopes.dodecahedron(exact=False); P # optional - polymake

Once that is reverted, then you can set a positive review on my behalf.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

cd583e2Remove one unneccessary 'optional - polymake

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

Changed commit from 19d05f1 to cd583e2

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 30, 2017

comment:79

Thank you!

@vbraun
Copy link
Member

vbraun commented Apr 1, 2017

comment:80
sage -t --long src/sage/interfaces/polymake.py
**********************************************************************
File "src/sage/interfaces/polymake.py", line 397, in sage.interfaces.polymake.Polymake._read_in_file_command
Failed example:
    L = polymake([42] * 400)
Exception raised:
    Traceback (most recent call last):
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake._read_in_file_command[1]>", line 1, in <module>
        L = polymake([Integer(42)] * Integer(400))
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 273, in __call__
        raise TypeError(msg)
    TypeError: unable to start polymake
**********************************************************************
File "src/sage/interfaces/polymake.py", line 398, in sage.interfaces.polymake.Polymake._read_in_file_command
Failed example:
    len(L)
Exception raised:
    Traceback (most recent call last):
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake._read_in_file_command[2]>", line 1, in <module>
        len(L)
    NameError: name 'L' is not defined
**********************************************************************
File "src/sage/interfaces/polymake.py", line 403, in sage.interfaces.polymake.Polymake._read_in_file_command
Failed example:
    L = polymake([42] * 84)
Exception raised:
    Traceback (most recent call last):
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake._read_in_file_command[3]>", line 1, in <module>
        L = polymake([Integer(42)] * Integer(84))
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 273, in __call__
        raise TypeError(msg)
    TypeError: unable to start polymake
**********************************************************************
File "src/sage/interfaces/polymake.py", line 404, in sage.interfaces.polymake.Polymake._read_in_file_command
Failed example:
    len(L)
Exception raised:
    Traceback (most recent call last):
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake._read_in_file_command[4]>", line 1, in <module>
        len(L)
    NameError: name 'L' is not defined
**********************************************************************
1 item had failures:
   4 of   6 in sage.interfaces.polymake.Polymake._read_in_file_command
    [25 tests, 4 failures, 0.24 s]

@tscrim
Copy link
Collaborator

tscrim commented Apr 1, 2017

comment:81

Looks like they just need # optional - polymake.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 1, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

7bcc04cMerge tag '8.0.beta0' into t/22658/polyhedron_methods_using_the_polymake_pexpect_interface
d7d4234Add '# optional - polymake'

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 1, 2017

Changed commit from cd583e2 to d7d4234

@vbraun
Copy link
Member

vbraun commented Apr 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants