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

5 cplex doctests failed in cplex_backend.pyx #28708

Closed
seblabbe opened this issue Nov 8, 2019 · 6 comments
Closed

5 cplex doctests failed in cplex_backend.pyx #28708

seblabbe opened this issue Nov 8, 2019 · 6 comments

Comments

@seblabbe
Copy link
Contributor

seblabbe commented Nov 8, 2019

sage -bt --optional=sage,optional,external src/sage/numerical/backends/cplex_backend.pyx

gives

sage -t src/sage/numerical/backends/cplex_backend.pyx
**********************************************************************
File "src/sage/numerical/backends/cplex_backend.pyx", line 595, in sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint
Failed example:
    p.add_linear_constraint(zip(range(5), range(5), 2.0, 2.0)  # optional - CPLEX
Exception raised:
    Traceback (most recent call last):
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1121, in compile_and_execute
        compiled = compiler(example)
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 649, in compiler
        compileflags, 1)
      File "<doctest sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint[3]>", line 1
        p.add_linear_constraint(zip(range(Integer(5)), range(Integer(5)), RealNumber('2.0'), RealNumber('2.0'))  # optional - CPLEX
                                                                                                                                  ^
    SyntaxError: unexpected EOF while parsing
**********************************************************************
File "src/sage/numerical/backends/cplex_backend.pyx", line 596, in sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint
Failed example:
    p.row(0)                                                     # optional - CPLEX
Exception raised:
    Traceback (most recent call last):
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint[4]>", line 1, in <module>
        p.row(Integer(0))                                                     # optional - CPLEX
      File "sage/numerical/backends/cplex_backend.pyx", line 671, in sage.numerical.backends.cplex_backend.CPLEXBackend.row (build/cythonized/sage/numerical/backends/cplex_backend.c:8844)
        cpdef row(self, int index):
      File "sage/numerical/backends/cplex_backend.pyx", line 710, in sage.numerical.backends.cplex_backend.CPLEXBackend.row (build/cythonized/sage/numerical/backends/cplex_backend.c:8711)
        check(status)
      File "sage/numerical/backends/cplex_backend.pyx", line 1678, in sage.numerical.backends.cplex_backend.check (build/cythonized/sage/numerical/backends/cplex_backend.c:15103)
        raise MIPSolverException("CPLEX: "+errors.get(number,default))
    MIPSolverException: CPLEX: CPXERR_INDEX_RANGE
**********************************************************************
File "src/sage/numerical/backends/cplex_backend.pyx", line 598, in sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint
Failed example:
    p.row_bounds(0)                                              # optional - CPLEX
Exception raised:
    Traceback (most recent call last):
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint[5]>", line 1, in <module>
        p.row_bounds(Integer(0))                                              # optional - CPLEX
      File "sage/numerical/backends/cplex_backend.pyx", line 721, in sage.numerical.backends.cplex_backend.CPLEXBackend.row_bounds (build/cythonized/sage/numerical/backends/cplex_backend.c:9200)
        cpdef row_bounds(self, int index):
      File "sage/numerical/backends/cplex_backend.pyx", line 752, in sage.numerical.backends.cplex_backend.CPLEXBackend.row_bounds (build/cythonized/sage/numerical/backends/cplex_backend.c:8951)
        check(status)
      File "sage/numerical/backends/cplex_backend.pyx", line 1678, in sage.numerical.backends.cplex_backend.check (build/cythonized/sage/numerical/backends/cplex_backend.c:15103)
        raise MIPSolverException("CPLEX: "+errors.get(number,default))
    MIPSolverException: CPLEX: CPXERR_INDEX_RANGE
**********************************************************************
File "src/sage/numerical/backends/cplex_backend.pyx", line 600, in sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint
Failed example:
    p.add_linear_constraint(zip(range(5), range(5), 1.0, 1.0, name='foo') # optional - CPLEX
Exception raised:
    Traceback (most recent call last):
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1121, in compile_and_execute
        compiled = compiler(example)
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 649, in compiler
        compileflags, 1)
      File "<doctest sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint[6]>", line 1
        p.add_linear_constraint(zip(range(Integer(5)), range(Integer(5)), RealNumber('1.0'), RealNumber('1.0'), name='foo') # optional - CPLEX
                                                                                                                                             ^
    SyntaxError: unexpected EOF while parsing
**********************************************************************
File "src/sage/numerical/backends/cplex_backend.pyx", line 601, in sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint
Failed example:
    p.row_name(1)                                                           # optional - CPLEX
Exception raised:
    Traceback (most recent call last):
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/slabbe/GitBox/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint[7]>", line 1, in <module>
        p.row_name(Integer(1))                                                           # optional - CPLEX
      File "sage/numerical/backends/cplex_backend.pyx", line 1151, in sage.numerical.backends.cplex_backend.CPLEXBackend.row_name (build/cythonized/sage/numerical/backends/cplex_backend.c:11698)
        cpdef row_name(self, int index):
      File "sage/numerical/backends/cplex_backend.pyx", line 1177, in sage.numerical.backends.cplex_backend.CPLEXBackend.row_name (build/cythonized/sage/numerical/backends/cplex_backend.c:11606)
        check(status)
      File "sage/numerical/backends/cplex_backend.pyx", line 1678, in sage.numerical.backends.cplex_backend.check (build/cythonized/sage/numerical/backends/cplex_backend.c:15103)
        raise MIPSolverException("CPLEX: "+errors.get(number,default))
    MIPSolverException: CPLEX: CPXERR_INDEX_RANGE
**********************************************************************
1 item had failures:
   5 of   9 in sage.numerical.backends.cplex_backend.CPLEXBackend.add_linear_constraint
    [266 tests, 5 failures, 0.10 s]
----------------------------------------------------------------------
sage -t src/sage/numerical/backends/cplex_backend.pyx  # 5 doctests failed
----------------------------------------------------------------------
Total time for all tests: 0.2 seconds
    cpu time: 0.1 seconds
    cumulative wall time: 0.1 seconds
External software detected for doctesting: cplex

Component: linear programming

Author: David Coudert

Branch/Commit: 48845b9

Reviewer: Sébastien Labbé

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

@seblabbe seblabbe added this to the sage-9.0 milestone Nov 8, 2019
@dcoudert
Copy link
Contributor

dcoudert commented Nov 8, 2019

Commit: 48845b9

@dcoudert
Copy link
Contributor

dcoudert commented Nov 8, 2019

@dcoudert
Copy link
Contributor

dcoudert commented Nov 8, 2019

comment:1

I don't how this has not been seen before...


New commits:

48845b9trac #28708: fix doctests

@dcoudert
Copy link
Contributor

dcoudert commented Nov 8, 2019

Author: David Coudert

@seblabbe
Copy link
Contributor Author

seblabbe commented Nov 8, 2019

Reviewer: Sébastien Labbé

@vbraun
Copy link
Member

vbraun commented Nov 14, 2019

Changed branch from public/numerical/28708_fix_doctests_with_cplex to 48845b9

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

3 participants