Changes between Version 8 and Version 9 of Ticket #28175


Ignore:
Timestamp:
12/25/19 02:39:23 (22 months ago)
Author:
mkoeppe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28175

    • Property Summary changed from Move optional sage optimization backends to separate Cython packages to remove OptionalExtension problems to Move optional sage optimization backends (COIN, CPLEX, Gurobi) to separate Cython packages to remove OptionalExtension problems
  • Ticket #28175 – Description

    v8 v9  
    1 `sage.numerical.backends` depends on very little from Sage. We propose to split out the optional backends to separate Cython packages. This would make it easier to reconfigure when new solvers are installed, as sagelib does not have to be recompiled. By eliminating the use of the optional extensions mechanisms from sagelib, this  would also simplify packaging binary distributions.
     1`sage.numerical.backends` depends on very little from Sage. We propose to split out the optional backends (COIN, CPLEX, Gurobi) to separate Cython packages. This would make it easier to reconfigure when new solvers are installed, as sagelib does not have to be recompiled. By eliminating the use of the optional extensions mechanisms from sagelib, this will also simplify packaging binary distributions.
    22
    3 From `src/module_list.py`:
     3The new packages are on PyPI:
     4
    45{{{
    5     OptionalExtension("sage.numerical.backends.gurobi_backend",
    6               ["sage/numerical/backends/gurobi_backend.pyx"],
    7               libraries = ["gurobi"],
    8               condition = os.path.isfile(SAGE_INC + "/gurobi_c.h") and
    9                   os.path.isfile(SAGE_LOCAL + "/lib/libgurobi.so")),
     6wget -P upstream https://files.pythonhosted.org/packages/2a/1f/4fc55a0013bc5050ecf253b8bce1c4548380c15d57310a1fae5841405984/sage_numerical_backends_cplex-9.0b9.tar.gz
     7wget -P upstream https://files.pythonhosted.org/packages/72/07/8b52ab9411caec6f4593decebc5660c6ce955f437510d8bd58533866ff31/sage_numerical_backends_gurobi-9.0b9.tar.gz
     8wget -P upstream https://files.pythonhosted.org/packages/40/01/0b9580bc9db5671cc2446ea089ba1f28bacf85ef0e9f05a4a781bf9dcd7d/sage_numerical_backends_coin-9.0b9.tar.gz
     9}}}
    1010
    11     OptionalExtension("sage.numerical.backends.cplex_backend",
    12               ["sage/numerical/backends/cplex_backend.pyx"],
    13               libraries = ["cplex"],
    14               condition = os.path.isfile(SAGE_INC + "/cplex.h") and
    15                   os.path.isfile(SAGE_LOCAL + "/lib/libcplex.a")),
     11Development here:
     12- https://github.com/mkoeppe/sage-numerical-backends-cplex
     13- https://github.com/mkoeppe/sage-numerical-backends-coin
     14- https://github.com/mkoeppe/sage-numerical-backends-gurobi
    1615
    17     OptionalExtension("sage.numerical.backends.coin_backend",
    18               ["sage/numerical/backends/coin_backend.pyx"],
    19               language = 'c++',
    20               libraries = ["Cbc", "CbcSolver", "Cgl", "Clp", "CoinUtils",
    21                            "OsiCbc", "OsiClp", "Osi"] + lapack_libs,
    22               library_dirs = lapack_library_dirs,
    23               include_dirs = lapack_include_dirs,
    24               package = 'cbc'),
    25 }}}
     16-----------
    2617
    27 
    28 Details:
     18(In a follow-up ticket, one could consider moving the entire backend machinery to a separate packages. Some notes regarding this:
    2919 - `get_solver` uses base_ring
    30  - GLPKBackend depends on `sage.libs.glpk`, which should also become a separate Cython package (see https://en.wikibooks.org/wiki/GLPK/Python for a list of other glpk bindings)
    31  - For Gurobi and CPLEX, we could alternatively get rid of these Cython modules entirely by making use of their standard Python API instead.
     20 - GLPKBackend depends on `sage.libs.glpk`, which should also become a separate Cython package (see https://en.wikibooks.org/wiki/GLPK/Python for a list of other glpk bindings).)
     21(In another follow-up ticket, for Gurobi and CPLEX, we could alternatively get rid of these Cython modules entirely by making use of their standard Python API instead.)
    3222
    3323See also: