[BUG] Problem with only a quadratic constraint (no linear rows) returns nan
@aliceb-nv is already working on this.
Since Jun 3, 2026.
- Dominant language
- Cuda
- Stars
- 1k
- Forks
- 233
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 95
Description
Describe the bug
A problem whose only constraint is a quadratic constraint (no linear
constraint rows) returns nan / NoTermination instead of solving. Adding any
linear row makes it solve correctly.
Steps/Code to reproduce bug
import numpy as np
from cuopt.linear_programming.problem import Problem, MINIMIZE
p = Problem()
x = p.addVariable(lb=-np.inf, name="x")
y = p.addVariable(lb=-np.inf, name="y")
p.addConstraint(2*x*x + 2*x*y + 2*y*y <= 6) # ONLY a quadratic constraint
p.setObjective(x + y, sense=MINIMIZE)
p.solve()
print(p.Status, p.ObjValue, x.Value) # 0 nan nan
Output:
0 nan nan
Adding e.g. p.addConstraint(x + y >= -5) before solving makes it return the
correct optimum (-2.0 at x = y = -1).
Expected behavior
A problem with only quadratic (second-order-cone) constraints and no linear rows
should solve normally, not return nan.
Environment details:
- Environment location: Bare-metal
- Method of cuOpt install: from source (
release/26.06, cuOpt 26.06.00, includes #1361)
Additional context
Surfaced while documenting general-convex-quadratic examples; the barrier / SOC
conversion path appears to require a non-empty linear constraint matrix.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.