NVIDIA / NVIDIA/cuopt

PuLP test_infeasible_2: solver returns Optimal for an infeasible LP

Open
#1,115 6 comments 0 reactions 1 assignee View on GitHub

@Kh4ster is already working on this.

Since Apr 16, 2026.

awaiting response bug
Dominant language
Cuda
Stars
1k
Forks
233
Avg merge
4d 4h
Merged PRs (30d)
95

Description

Summary

pulp/tests/test_pulp.py::CUOPTTest::test_infeasible_2 fails in the nightly CI because cuOpt reports status=1 (Optimal) for an LP that is genuinely infeasible. Expected -1 (Infeasible).

Observed in the nightly run on 2026-04-16 (wheel-python-cuda13.1.1-py3.14-aarch64, cuOpt 26.6.0, git hash f72f57da).

This is distinct from #1114 — it is not a status-mapping issue. The solver is producing a wrong terminal status on the underlying problem.

Reproducer (from the failing test)

from pulp import LpProblem, constants as const
from pulp.apis.cuopt_api import CUOPT

prob = LpProblem("test_infeasible_2", const.LpMinimize)
x = prob.add_variable("x", 0, 4)
y = prob.add_variable("y", -1, 1)
z = prob.add_variable("z", 0, 10)
prob += x + y <= 5.2, "c1"
prob += x + z >= 10.3, "c2"
prob += -y + z == 17.5, "c3"
status = prob.solve(CUOPT())
assert status == const.LpStatusInfeasible  # currently reports Optimal

Why the problem is infeasible

Constraint c3: -y + z = 17.5 with y ∈ [-1, 1], z ∈ [0, 10] gives max(-y + z) = 1 + 10 = 11 < 17.5. The constraint is not satisfiable, so the LP is infeasible.

Failure output

E   pulp.constants.PulpError: Tests failed for solver <pulp.apis.cuopt_api.CUOPT ...>:
E   status == 1 not in [-1]
E   status == Optimal not in ['Infeasible']

Context

  • Several other unbounded/infeasible cases in the same run fail with status-11 mapping issues (tracked in #1114). This one is different: cuOpt is actually returning Optimal, not the new UnboundedOrInfeasible status.
  • Worth confirming whether this reproduces on the LP alone (via cuopt_cli on an MPS export) to localize whether it's a solver regression or a PuLP-adapter model-translation bug.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.