sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.3k stars 447 forks source link

Upgrade optional package cbc to 2.10.x, remove sage_numerical_backends_coin #30644

Open seblabbe opened 3 years ago

seblabbe commented 3 years ago

Current version in sage is 2.9.4.p0 from March 30, 2015.

https://github.com/coin-or/Cbc/releases/tag/releases%2F2.10.8 is from 2022-05-05

As sage_numerical_backends_coin is incompatible with CBC 2.10.x (#30635), we remove it. The 'Coin' solver is now provided as an alias of 'CVXPy/CBC' from #34251.

Depends on #34251

CC: @dcoudert @dimpase

Component: packages: optional

Author: Sébastien Labbé, Matthias Koeppe

Reviewer: Dima Pasechnik

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

seblabbe commented 3 years ago

Branch: u/slabbe/30644

seblabbe commented 3 years ago

Commit: 288379c

seblabbe commented 3 years ago
comment:1

I don't upgrade package that often, so maybe I did something wrong.

In particular, the url finishes with .tgz but everywhere in sage it is always .tar.gz?


New commits:

288379c30644: upgrade cbc to 2.10.5
mkoeppe commented 3 years ago
comment:2

The changes look fine. If it builds OK on your machine, the next step could be to push a tag to a GitHub repository to start portability testing

seblabbe commented 3 years ago
comment:3

One question: should 2.9.4 be updated here?

$ cat build/pkgs/cbc/spkg-configure.m4 
SAGE_SPKG_CONFIGURE([cbc], [
    SAGE_SPKG_DEPCHECK([atlas openblas zlib bzip2], [
        dnl  checking with pkg-config
        PKG_CHECK_MODULES([CBC], [cbc >= 2.9.4], [], [sage_spkg_install_cbc=yes])
    ])
])
seblabbe commented 3 years ago
comment:4

I am currently getting the following issue, seems to be an independent bug:

$ sage --package download cbc
Traceback (most recent call last):
  File "/home/slabbe/GitBox/sage/build/bin/sage-package", line 42, in <module>
    run()
  File "/home/slabbe/GitBox/sage/build/bin/../sage_bootstrap/cmdline.py", line 318, in run
    app.download_cls(args.package_name, args.allow_upstream)
TypeError: download_cls() takes exactly 2 arguments (3 given)
mkoeppe commented 3 years ago
comment:5

Replying to @seblabbe:

One question: should 2.9.4 be updated here?

$ cat build/pkgs/cbc/spkg-configure.m4 
SAGE_SPKG_CONFIGURE([cbc], [
    SAGE_SPKG_DEPCHECK([atlas openblas zlib bzip2], [
        dnl  checking with pkg-config
        PKG_CHECK_MODULES([CBC], [cbc >= 2.9.4], [], [sage_spkg_install_cbc=yes])
    ])
])

No, we want to accept the broadest range of supported cbc versions. CBC is very mature software, and we should be fine with pretty much any system-provided version.

seblabbe commented 3 years ago
comment:6

Replying to @seblabbe:

I am currently getting the following issue, seems to be an independent bug:

TypeError: download_cls() takes exactly 2 arguments (3 given)

just created #30648

seblabbe commented 3 years ago
comment:7

Replying to @mkoeppe:

The changes look fine. If it builds OK on your machine,

it is not, I currently get a lot of timeout during make ptestlong:

----------------------------------------------------------------------
sage -t --long --random-seed=0 src/doc/en/reference/sat/index.rst  # Timed out
sage -t --long --random-seed=0 src/doc/en/thematic_tutorials/linear_programming.rst  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/designs/bibd.py  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/designs/database.py  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/designs/incidence_structures.py  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/designs/orthogonal_arrays.py  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/designs/orthogonal_arrays_build_recursive.py  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/integer_vector.py  # Timed out
sage -t --long --random-seed=0 src/sage/cpython/wrapperdescr.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/combinat/matrices/dancing_links.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/game_theory/normal_form_game.py  # Timed out
sage -t --long --random-seed=0 src/sage/geometry/cone.py  # Timed out
sage -t --long --random-seed=0 src/sage/geometry/polyhedron/base.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/bipartite_graph.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/comparability.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/connectivity.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/digraph.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/domination.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/generators/degree_sequence.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/generators/families.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/generators/smallgraphs.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/generic_graph.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/graph.py  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/graph_coloring.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/graph_decompositions/cutwidth.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/graph_decompositions/vertex_separation.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/graphs/hypergraph_generators.py  # Timed out
sage -t --long --random-seed=0 src/sage/homology/simplicial_complex.py  # Timed out
sage -t --long --random-seed=0 src/sage/knots/link.py  # Timed out
sage -t --long --random-seed=0 src/sage/matroids/graphic_matroid.py  # Timed out
sage -t --long --random-seed=0 src/sage/matroids/matroid.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/backends/cvxopt_backend.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/backends/generic_backend.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/knapsack.py  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/linear_functions.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/linear_tensor.py  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/linear_tensor_constraints.py  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/linear_tensor_element.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/numerical/mip.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/schemes/elliptic_curves/ell_rational_field.py  # 2 doctests failed
sage -t --long --random-seed=0 src/sage/coding/linear_code.py  # 1 doctest failed
sage -t --long --random-seed=0 src/sage/numerical/optimize.py  # Timed out
sage -t --long --random-seed=0 src/sage/sat/solvers/sat_lp.py  # Timed out
sage -t --long --random-seed=0 src/sage/sat/solvers/satsolver.pyx  # Timed out
sage -t --long --random-seed=0 src/sage/schemes/toric/points.py  # Timed out
sage -t --long --random-seed=0 src/sage/schemes/toric/toric_subscheme.py  # Timed out
sage -t --long --random-seed=0 src/sage/lfunctions/sympow.py  # 4 doctests failed
----------------------------------------------------------------------

the next step could be to push a tag to a GitHub repository to start portability testing

Ok, I will try to do something like that once the above is fixed.

mkoeppe commented 3 years ago
comment:10

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

mkoeppe commented 3 years ago

Dependencies: #32191

mkoeppe commented 3 years ago

Changed branch from u/slabbe/30644 to u/mkoeppe/30644

mkoeppe commented 3 years ago

Description changed:

--- 
+++ 
@@ -1,6 +1,5 @@
 Current version in sage is `2.9.4.p0` from March 30, 2015.

-Version 2.10.5 is from 2020-03-09.
+Version 2.10.5 is from 2020-03-09 and still current as of 2021-07-19.

-Tarbal is here:
-https://www.coin-or.org/download/source/Cbc/Cbc-2.10.5.tgz
+
mkoeppe commented 3 years ago

New commits:

29afb3830644: upgrade cbc to 2.10.5
mkoeppe commented 3 years ago

Author: Sébastien Labbé

mkoeppe commented 3 years ago

Changed commit from 288379c to 29afb38

dimpase commented 3 years ago

Reviewer: Dima Pasechnik

dimpase commented 3 years ago
comment:15

OK - why is #32191 a dependency?

mkoeppe commented 3 years ago
comment:16

Actually there are unresolved problems - see #30635 (which needs help)

mkoeppe commented 3 years ago

Changed dependencies from #32191 to #32191, #30635

mkoeppe commented 2 years ago

Changed dependencies from #32191, #30635 to #32191, #30635, #31962

mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,5 +1,6 @@
 Current version in sage is `2.9.4.p0` from March 30, 2015.

-Version 2.10.5 is from 2020-03-09 and still current as of 2021-07-19.
+https://github.com/coin-or/Cbc/releases/tag/releases%2F2.10.7 is from 2022-01-25

+
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

5e7d0f130644: upgrade cbc to 2.10.5
7da84bbbuild/pkgs/cbc: Upgrade to 2.10.7, update upstream_url
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 29afb38 to 7da84bb

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 7da84bb to 5457547

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

92af4dasrc/sage/numerical/backends/cvxpy_backend.pyx: Fix up some doctests
979a9a9CVXPYBackend.objective_coefficient: Fix up
6f7eb15build/pkgs/mip: New
b0317babuild/pkgs/mip_cvxpy: New
0804514default_mip_solver: Use Cvxpy/mip/cbc instead of Cvxpy/cbc
3ab590bsage.numerical.backends.generic_backend.get_solver: For Cvxpy/mip/..., set SOLVER_NAME
23518f4build/pkgs/cylp: Add patch from https://github.com/coin-or/CyLP/pull/150
a7416f0default_mip_solver: Back to using Cvxpy/cbc, not Cvxpy/mip/cbc
444d1d0build/pkgs/cvxpy: Use https://github.com/cvxpy/cvxpy/pull/1707
5457547Merge #31962
mkoeppe commented 2 years ago
comment:24

On top of #31962 (new CBC interface via CVXPY), this upgrade works well as tested with ./sage -tp src/sage/graphs/

mkoeppe commented 2 years ago

Changed dependencies from #32191, #30635, #31962 to #31962

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 5457547 to 8bcb5a5

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

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

cbfeef2MIPVariable: Avoid using _backend.set_variable_type
6c1a8f5vertex_separation_MILP: Remove redundant call of set_binary
44e219fGenericGraph.multicommodity_flow: Directly create MIP variables as integers, do not use set_integer
8bcb5a5Merge #33504
mkoeppe commented 2 years ago

Changed author from Sébastien Labbé to Sébastien Labbé, Matthias Koeppe

slel commented 2 years ago
comment:27

Cbc 2.10.8 was released on 2022-05-05.

mkoeppe commented 2 years ago

Changed dependencies from #31962 to #34251

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 8bcb5a5 to afdb42f

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

763985dsrc/sage/numerical/backends/cvxpy_backend.pyx: Make doctests pass
a079e6ebuild/pkgs/cylp/spkg-install.in: Use --no-build-isolation
9f9207asrc/sage/numerical/backends/cvxpy_backend.pyx: Store constraint names
7b1ee3fsrc/sage/numerical/backends/cvxpy_backend.pyx: Use our column names when no name is given
cbbc6absrc/sage/numerical/backends/cvxpy_backend.pyx: Convert lower, upper variable bounds to float
9f9b346src/sage/combinat/matrices/dancing_links.pyx: Make doctest more flexible
00fe72aMerge #34251
ee67bc3src/sage/numerical/backends/generic_backend.pyx: Make solver='Coin' an alias for solver='CVXPy/CBC'
4843f19.github/workflows/ci-cygwin-standard.yml: Replace sage_numerical_backends_coin
afdb42fsrc/doc/en/thematic_tutorials/linear_programming.rst: Update install guide
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -1,6 +1,6 @@
 Current version in sage is `2.9.4.p0` from March 30, 2015.

-https://github.com/coin-or/Cbc/releases/tag/releases%2F2.10.7 is from 2022-01-25
+https://github.com/coin-or/Cbc/releases/tag/releases%2F2.10.8 is from 2022-05-05

+As `sage_numerical_backends_coin` is incompatible with CBC 2.10.x, we remove it. The `'Coin'` solver is now provided as an alias of `'CVXPy/CBC'` from #34251.

-
mkoeppe commented 2 years ago

Description changed:

--- 
+++ 
@@ -2,5 +2,5 @@

 https://github.com/coin-or/Cbc/releases/tag/releases%2F2.10.8 is from 2022-05-05

-As `sage_numerical_backends_coin` is incompatible with CBC 2.10.x, we remove it. The `'Coin'` solver is now provided as an alias of `'CVXPy/CBC'` from #34251.
+As `sage_numerical_backends_coin` is incompatible with CBC 2.10.x (#30635), we remove it. The `'Coin'` solver is now provided as an alias of `'CVXPy/CBC'` from #34251.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

b9bfbf9tox.ini: Add comment
4c0d7f5tox.ini: Use FROM_DOCKER_REPOSITORY
a07874dbuild/bin/write-dockerfile.sh: In incremental build, keep logs
ae269d1tox.ini (docker-incremental): Do not include '-incremental' in the Docker image name
b23439dMerge #34228
2c8373esrc/sage/combinat/matrices/dancing_links.pyx: Make doctest more flexible (fixup)
4c00647Merge #34251
9e51ad3src/sage/numerical/backends/generic_backend.pyx: Make solver='Coin' an alias for solver='CVXPy/CBC'
e4bbffe.github/workflows/ci-cygwin-standard.yml: Replace sage_numerical_backends_coin
dd5de09src/doc/en/thematic_tutorials/linear_programming.rst: Update install guide
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from afdb42f to dd5de09

mkoeppe commented 1 year ago

Branch has merge conflicts

mkoeppe commented 1 year ago

Removed branch from issue description; replaced by PR #35368