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

Update scipoptsuite to 8.0.2 (now open source!), rename to scip #31329

Closed
mkoeppe opened this issue Feb 3, 2021 · 61 comments
Closed

Update scipoptsuite to 8.0.2 (now open source!), rename to scip #31329

mkoeppe opened this issue Feb 3, 2021 · 61 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 3, 2021

scipoptsuite 8.0.2 was re-released as open source (Apache 2.0) on 2022-11-04 - https://www.scipopt.org/

https://www.scipopt.org/doc/html/md_INSTALL.php

It includes its own fork of bliss - see discussion in mkoeppe/bliss#3

Previous update in #24662.

Depends on #34726
Depends on #34742
Depends on #34746
Depends on #34665
Depends on #30217

CC: @dimpase @yuan-zhou @kliem @jplab

Component: packages: experimental

Keywords: upgrade, scipoptsuite

Author: Matthias Koeppe

Branch/Commit: 9b40272

Reviewer: Dima Pasechnik

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

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 3, 2021

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 3, 2021

Commit: d8322a6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 3, 2021

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

ca3622cbuild/pkgs/scipoptsuite: Update patches
16d99aebuild/pkgs/scipoptsuite/spkg-install.in: Update
d8322a6build/pkgs/scipoptsuite/SPKG.rst: Update

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 3, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 3, 2021

comment:4

Tested only on macOS Catalina. Can't do automatic tests because the upstream tarball is not distributable.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 3, 2021

comment:6

shared library installation on macOS needs more work - see #21003

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented Feb 5, 2021

Changed keywords from none to upgrade, scipoptsuite

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 24, 2021

comment:8

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 mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 24, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 19, 2021

comment:9

Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Mar 5, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 6, 2022
@mkoeppe

This comment has been minimized.

@mantepse
Copy link
Collaborator

comment:38

./configure --enable-download-from-upstream-url is my friend, sorry for the noise

@mantepse
Copy link
Collaborator

comment:39

I feel stupid, but what is the name of the backend? I have

sage: MixedIntegerLinearProgram(solver="SCIP")
...
ValueError: 'solver' should be set to 'GLPK', 'GLPK/exact', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'InteractiveLP', None (in which case the default one is used), or a callable.

@dimpase
Copy link
Member

dimpase commented Dec 23, 2022

comment:40

Replying to Martin Rubey:

./configure --enable-download-from-upstream-url is my friend, sorry for the noise

this is the default now,no need to supply it explicitly. cf #32390

the problem is elsewhere

@dimpase
Copy link
Member

dimpase commented Dec 23, 2022

comment:41

check out

./configure --help | grep -i scip

@mantepse
Copy link
Collaborator

comment:42

I found another friend, #21003...

@mantepse
Copy link
Collaborator

comment:43

It seems that SCIP forgets the type of variables upon copying:

sage: P = MixedIntegerLinearProgram(solver="GLPK")
sage: x = P.new_variable(binary=True)
sage: P.add_constraint(x[0] + x[1] <= 1)
sage: P
Boolean Program (no objective, 2 variables, 1 constraint)
sage: copy(P)
Boolean Program (no objective, 2 variables, 1 constraint)

versus

sage: P = MixedIntegerLinearProgram(solver="SCIP")
sage: x = P.new_variable(binary=True)
sage: P.add_constraint(x[0] + x[1] <= 1)
sage: P
Boolean Program (no objective, 2 variables, 1 constraint)
sage: copy(P)
Linear Program (no objective, 2 variables, 1 constraint)

sage: copy(P).show()
Maximization:
  

Constraints:
  c1: x1 + x2 <= 1.0
Variables:
  x1 = x_0 is a continuous variable (min=0.0, max=1.0)
  x2 = x_1 is a continuous variable (min=0.0, max=1.0)

@mantepse
Copy link
Collaborator

comment:44

This is actually a real problem:

sage: P = MixedIntegerLinearProgram(solver="SCIP")
sage: x = P.new_variable(binary=True)
sage: P.add_constraint(x[0] + x[1] == 1)
sage: P.add_constraint(x[0] - x[1] == 0)
sage: P.solve()
...
MIPSolverException: SCIP: There is no feasible solution
sage: P2 = deepcopy(P)
sage: P2.solve()
0.0
sage: P2.get_values(x.copy_for_mip(P2))
{0: 0.5, 1: 0.5}

@mantepse
Copy link
Collaborator

comment:45
diff --git a/src/sage/numerical/backends/scip_backend.pyx b/src/sage/numerical/backends/scip_backend.pyx
index d063d012b98..9b080afcbe0 100644
--- a/src/sage/numerical/backends/scip_backend.pyx
+++ b/src/sage/numerical/backends/scip_backend.pyx
@@ -1148,7 +1148,7 @@ cdef class SCIPBackend(GenericBackend):
         cdef SCIPBackend cp = type(self)(maximization=self.is_maximization())
         cp.problem_name(self.problem_name())
         for i, v in enumerate(self.variables):
-            vtype = v.vtype
+            vtype = v.vtype()
             cp.add_variable(self.variable_lower_bound(i),
                             self.variable_upper_bound(i),
                             binary=vtype == 'BINARY',

@dimpase
Copy link
Member

dimpase commented Dec 23, 2022

comment:46

could you update the branch (or I can do this in 6 hours)

@mantepse
Copy link
Collaborator

comment:47

Should this really be done in this ticket, or rather in #21003?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 23, 2022

comment:48

This change should be made in #21003, which adds the mip backend.

@vbraun
Copy link
Member

vbraun commented Jan 2, 2023

comment:49

Pdf docs don't build

[sagemath_doc_pdf-none] l.38570 ​
[sagemath_doc_pdf-none]            https://github.com/scipopt/SCIP\sphinxhyphen{}SDP
[sagemath_doc_pdf-none] ? 
[sagemath_doc_pdf-none] ! Emergency stop.
[sagemath_doc_pdf-none]  ...                                              
[sagemath_doc_pdf-none]                                                   
[sagemath_doc_pdf-none] l.38570 ​
[sagemath_doc_pdf-none]            https://github.com/scipopt/SCIP\sphinxhyphen{}SDP
[sagemath_doc_pdf-none] !  ==> Fatal error occurred, no output PDF file produced!
[sagemath_doc_pdf-none] Transcript written on spkg.log.
[sagemath_doc_pdf-none] [games    ] no targets are out of date.
[sagemath_doc_pdf-none] [games    ] The HTML pages are in ../../local/share/doc/sage/html/en/reference/games.
[sagemath_doc_pdf-none] Build finished. The built documents can be found in /home/release/Sage/local/share/doc/sage/html/en/reference/games
[sagemath_doc_pdf-none] Latexmk: ====List of undefined refs and citations:
[sagemath_doc_pdf-none]   ! Package inputenc Error: Unicode character ​ (U+200B)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 2, 2023

comment:50

I think this is from #34749 (scip_sdp)

@vbraun
Copy link
Member

vbraun commented Jan 12, 2023

Changed branch from u/mkoeppe/update_scipoptsuite_to_7_0_2 to 9b40272

@vbraun vbraun closed this as completed in 64d232b Jan 12, 2023
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
… cmake version to 3.11

scip (sagemath#31329) fails to build with the older cmake provided by ubuntu-
xenial (scipopt/scip#32)

papilo (sagemath#34726) needs at least cmake 3.11.

3.10.x is shipped on ubuntu-bionic, linuxmint-19.

URL: https://trac.sagemath.org/34746
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
This ticket adds a package `pyscipopt` and adds a new MIP backend based
on it.

https://github.com/scipopt/PySCIPOpt

Branch is on top of sagemath#31329.

Steps to get it to work:
 - pull from this branch
 - `sage -f pyscipopt`

URL: https://trac.sagemath.org/21003
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe, Moritz Firsching, Martin Rubey
Reviewer(s): Moritz Firsching, Vincent Delecroix, David Coudert,
Matthias Koeppe
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