[BUG] Fully presolved MILP returns FeasibleFound with an infinite bound since 26.10.0

Aperta
#2,369 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@j3soon ci sta già lavorando.

Dal 23/11/2026.

  • #2370 di @j3soon — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp, python
Ambito
hpc

Direzione di ricerca

Start by running repro_minimal.py on an affected image (26.10.1) and again with mip_hyper_block_bve disabled, which restores Optimal and isolates block bounded-variable elimination (added in #1683). Then repeat with mip_determinism_mode set to 1 to expose the assignment-recovery error, and run repro_decimal.py for the objective-offset case. Done means both modes report Optimal with bound 2.0 (1.5 for the decimal variant) and gap 0.0. The reporter states a fix PR is coming, so coordinate before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Describe the bug

cuOpt returns FeasibleFound after presolve reduces this MILP to zero rows and columns. The default solve returns the optimal objective of 2.0 with an infinite bound and gap.

Deterministic mode also exposes an error in the recovered assignment. On 26.10.0 and main at 5ff4995d, the result is FeasibleFound with objective 0.0. Both failures reproduce through cuOpt's Python API.

Codex generated the minimal reproducer, and I verified it myself.

Steps/Code to reproduce bug

Save the following as repro_minimal.py:

from cuopt.linear_programming.problem import INTEGER, MAXIMIZE, Problem

problem = Problem()
x = [[problem.addVariable(ub=1, vtype=INTEGER) for _ in range(3)] for _ in range(2)]
for row in x:
    problem.addConstraint(sum(row) == 1)
for a, b in zip(*x):
    problem.addConstraint(a + b <= 1)
problem.setObjective(x[0][0] + x[1][1], sense=MAXIMIZE)

problem.solve()
print("Status:", problem.Status.name)
print("Objective:", problem.ObjValue)
print("Bound:", problem.SolutionStats.solution_bound)
print("Gap:", problem.SolutionStats.mip_gap)

Run the commands from the directory containing repro_minimal.py on a host with Docker and the NVIDIA Container Toolkit.

# 26.8.0 returns Optimal with bound 2.0 and gap 0.0.
docker run --rm --gpus all -v "$PWD/repro_minimal.py:/repro_minimal.py:ro" nvidia/cuopt:26.8.0-cuda13.3-py3.14 python /repro_minimal.py
# 26.10.1 returns FeasibleFound with an infinite bound and gap.
docker run --rm --gpus all -v "$PWD/repro_minimal.py:/repro_minimal.py:ro" nvidia/cuopt:26.10.1-cuda13.3-py3.14 python /repro_minimal.py

Actual output on 26.10.1, with the solver log shortened:

Presolved problem: 5 constraints, 6 variables (6 integer), 12 nonzeros
After cuOpt presolve: 0 constraints, 0 variables, objective offset -2.000000.
Problem full reduced in presolve
Best objective 2.000000e+00, best bound inf, gap inf%.
Status: FeasibleFound
Objective: 2.0
Bound: inf
Gap: inf

Expected behavior

Status: Optimal
Objective: 2.0
Bound: 2.0
Gap: 0.0

Each variable is at most 1. Setting x[0][0] = x[1][1] = 1 and the remaining variables to 0 gives a feasible assignment that attains the bound 2.

Environment details

  • Ubuntu 22.04.5 dev container, x86-64, Python 3.14.6. The version comparisons below used pip wheels.
  • NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition, driver 595.99.02.
  • CUDA 13.3 in the stable wheels and CUDA 13.4 in the alpha wheel.
cuOpt wheel Solver commit Status Bound Gap
26.8.0 400863c1 Optimal 2.0 0.0
26.10.0 e93f7dc5 FeasibleFound inf inf
26.10.1 08234d62 FeasibleFound inf inf
26.12.0a112.post261122050454 5ff4995d (main) FeasibleFound inf inf

Additional context

Disabling block bounded-variable elimination with settings.set_parameter("mip_hyper_block_bve", False) returns Optimal with bound 2.0 and gap 0.0 on all three affected builds. With this setting and on 26.8.0, cuOpt presolve leaves all six variables and the solver proves optimality at the root. Block bounded-variable elimination was added in #1683.

Replace problem.solve() with the following to reproduce the assignment error in deterministic mode:

from cuopt.linear_programming import SolverSettings

settings = SolverSettings()
settings.set_parameter("mip_determinism_mode", 1)
problem.solve(settings)

Both modes reduce the model to zero rows and columns. With default settings, early heuristics find the optimal assignment and mask the assignment recovery error. Deterministic mode skips those heuristics and returns the incorrectly recovered assignment.

Actual output in deterministic mode on 26.10.0 and main at 5ff4995d:

Status: FeasibleFound
Objective: 0.0
Bound: inf
Gap: inf

Expected output in deterministic mode:

Status: Optimal
Objective: 2.0
Bound: 2.0
Gap: 0.0
Reproducer with a decimal objective offset

This variant keeps the same assignment constraints, adds a fixed variable, and uses decimal objective coefficients. Save it as repro_decimal.py and run the Docker command below.

from cuopt.linear_programming import SolverSettings
from cuopt.linear_programming.problem import INTEGER, MAXIMIZE, Problem

problem = Problem()
x = [[problem.addVariable(ub=1, vtype=INTEGER) for _ in range(3)] for _ in range(2)]
for row in x:
    problem.addConstraint(sum(row) == 1)
for a, b in zip(*x):
    problem.addConstraint(a + b <= 1)
fixed = problem.addVariable(lb=1, ub=1, vtype=INTEGER)
problem.setObjective(0.3 * x[0][0] + 0.6 * x[1][1] + 0.7 * fixed - 0.1, sense=MAXIMIZE)
settings = SolverSettings()
settings.set_parameter("mip_determinism_mode", 1)
problem.solve(settings)
print("Status:", problem.Status.name)
print("Objective:", problem.ObjValue)
print("Bound:", problem.SolutionStats.solution_bound)
print("Gap:", problem.SolutionStats.mip_gap)
docker run --rm --gpus all -v "$PWD/repro_decimal.py:/repro_decimal.py:ro" nvidia/cuopt:26.10.1-cuda13.3-py3.14 python /repro_decimal.py

Actual output on 26.10.1 after cuOpt presolve removes all remaining variables:

Status: FeasibleFound
Objective: 0.6
Bound: inf
Gap: inf

Expected output:

Status: Optimal
Objective: 1.5
Bound: 1.5
Gap: 0.0

I’ll follow up with a small PR that fixes assignment recovery and bound reporting.

Lingua principale
Cuda
Stelle
1.1k
Fork
266
Merge medio
1g 23h
PR unite (30g)
54

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/cuopt

Tutte le issue di NVIDIA/cuopt

Issue simili

Altre issue su HPC

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.