[BUG] MIP with default presolve returns OPTIMAL with x = 0 for `-1e6 * x <= -7`, x binary (row violated by 7)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reproducing the single binary-variable MPS case in the Python script, comparing default presolve with presolve disabled and a tighter integrality tolerance. The report points to PaPILO's hard-coded feasibility tolerance (#1502) as a possible lead, but says the cause has not been traced. Done means presolve no longer returns an infeasible point as OPTIMAL or as an incumbent; verify the reported case and the MIPLIB cdma rows against an independent feasibility check.
索引モデルが issue の本文から書いたものです。
説明
Drafted by Claude Code (an AI agent) for Berk Orbay, who reviewed it before posting.
Describe the bug
A binary x with the single row -1e6 * x <= -7 must be 1. With presolve on (the default, 1 or 2), cuOpt 26.10.0
returns OPTIMAL with x = 0, which violates the row by 7. That is far above any feasibility tolerance (default
mip_absolute_tolerance is 1e-6). Lowering mip_integrality_tolerance to 1e-9 does not change it. With
presolve = 0 and mip_integrality_tolerance = 1e-9, the result is correct (x = 1).
The result flips where the implied bound 7/a crosses 1e-5: wrong at a = 7e5 (bound 1.0e-5), right at a = 5e5
(bound 1.4e-5). That value matches PaPILO's hard-coded feastol = 1e-5 (#1502), so the cause may be the same line.
The consequence is different, though: not a 1e-5-level violation, but a row violated by its whole right-hand side,
on the default MIP path, and reported as OPTIMAL. We have not traced it in the source.
Minimal reproduction (Python; script below)
minimise x x binary
s.t. -a * x <= -7 (x >= 7/a, so x must be 1)
| a | implied bound 7/a | cuOpt 26.10.0, default settings | HiGHS 1.15.1 | SCIP 10.0 |
|---|---|---|---|---|
| 10, 1e3, 1e5, 2e5, 5e5 | 0.7 … 1.4e-5 | OPTIMAL, x = 1 | x = 1 | — |
| 7e5 | 1.0e-5 | OPTIMAL, x = 0 | x = 1 | x = 1 |
| 1e6, 1.2e6, 1e7, 1e9 | 7e-6 … 7e-9 | OPTIMAL, x = 0 | x = 1 | x = 1 (1e6, 1e9) |
For a = 1e6:
| presolve | mip_integrality_tolerance | cuOpt 26.10.0 |
|---|---|---|
| default | default (1e-5) | OPTIMAL, x = 0 (row violated by 7) |
| 1 | default | OPTIMAL, x = 0 |
| 2 | default | OPTIMAL, x = 0 |
| default, 1, 2 | 1e-9 | OPTIMAL, x = 0 |
| 0 | default | OPTIMAL, x = 7e-6 (integral within the default tolerance; expected, not part of this report) |
| 0 | 1e-9 | OPTIMAL, x = 1 (correct) |
Where we met it: MIPLIB 2017 cdma. It has five singleton rows -1.2e6 * x <= rhs on binaries, with rhs −7, −11,
−11, −12 and −13, so implied bounds 5.8e-6, 9.2e-6, 9.2e-6, 1.0e-5 and 1.08e-5.
- Callback incumbents. In three runs of cuOpt alone (5 threads, 120 s and 2 × 300 s), 12 of the 22 incumbents
reported through the MIP callback fail an independent check (HiGHS-read model, 1e-6). Every violated row is one of
the −7, −11 and −12 rows, with x = 0. The −13 row (bound 1.08e-5) is never violated. - Final solution. The final solution returned by
Solve()is infeasible in the same way: default settings,
120 s, objective −1.24e16, 2 rows violated. Withpresolve = 0andmip_integrality_tolerance = 1e-9, every
incumbent and the final solution pass the check, at a weaker objective (−5.56e14). - Objective gap. The infeasible points look up to 3.3× better than cuOpt's own best valid incumbent (−1.70e16 vs
−5.19e15). They are not better than the best known feasible value (−2.48e16).
Expected behavior
A point that violates a model row by more than the feasibility tolerance should not be returned as OPTIMAL (or
as an incumbent). A guess at the fix: when presolve derives a bound for an integer variable, it should round it in
the integer sense, lb = ceil(7e-6 - int_tol) = 1 here, rather than treat it as 0 within a continuous tolerance.
Environment
cuOpt 26.10.0 (cuopt-cu13, Python 3.12), NVIDIA DGX Spark (GB10, aarch64), driver 580.173.02, CUDA 13.0, Ubuntu
24.04. Not tested on 26.10.1, which moved the PaPILO pin.
repro script (Python, cuOpt 26.10.0)
import os, tempfile
import numpy as np
from cuopt.linear_programming import ParseMps, Solve, SolverSettings
def mps(a: float) -> str:
return f"""NAME singleton
ROWS
N obj
L r1
COLUMNS
MARKER 'MARKER' 'INTORG'
x obj 1.0 r1 {-a!r}
MARKER 'MARKER' 'INTEND'
RHS
rhs r1 -7.0
BOUNDS
UP bnd x 1.0
ENDATA
"""
def run(path, presolve=None, int_tol=None):
s = SolverSettings()
s.set_parameter("time_limit", 10.0)
if presolve is not None:
s.set_parameter("presolve", presolve)
if int_tol is not None:
s.set_parameter("mip_integrality_tolerance", int_tol)
sol = Solve(ParseMps(path), s)
return int(sol.get_termination_status()), float(sol.get_primal_objective()), list(np.asarray(sol.get_primal_solution()))
with tempfile.TemporaryDirectory() as d:
for a in [10.0, 1e3, 1e5, 2e5, 5e5, 7e5, 1e6, 1.2e6, 1e7, 1e9]:
p = os.path.join(d, "s.mps"); open(p, "w").write(mps(a))
print(f"a={a:g} x>={7/a:.2e}", run(p))
p = os.path.join(d, "s.mps"); open(p, "w").write(mps(1e6))
for pre, itol in ((None, None), (1, None), (2, None), (0, None), (None, 1e-9), (0, 1e-9)):
print("a=1e6 presolve", pre, "int_tol", itol, run(p, pre, itol))
- 主要言語
- Cuda
- スター
- 1.1k
- フォーク
- 266
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 54
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuopt のほかの issue
-
[BUG] cuDSS 1.0 rejects libcudss_mtlayer_cuopt.so (status = 3): missing cudssThreadingGetPropertyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Python: Problem.addConstraint accepts the same Constraint twice対応中かも @pcbeingused333 が 16 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Fully presolved MILP returns FeasibleFound with an infinite bound since 26.10.0対応中かも @j3soon が 7 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
BCStudentSoftwareDevTeam/cas#491 ·
メンテナーはふだん 8 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OpenSAK-Org/OpenSAK#1418 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
envoyproxy/envoy#49711 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
substrait-io/substrait#1355 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
genfeedai/genfeed.ai#11820 ·
メンテナーはふだん 1 日以内に返信