NVIDIA / NVIDIA/cuopt

[BUG] Problem with only a quadratic constraint (no linear rows) returns nan

Open
#1,376 5 comments 0 reactions 1 assignee View on GitHub

@aliceb-nv is already working on this.

Since Jun 3, 2026.

awaiting response bug
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

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.