NVIDIA / NVIDIA/cuopt

[BUG] [python] Python API errors when solving LP with no constraint

Open
#927 2 comments 0 reactions 1 assignee View on GitHub

@chris-maes is already working on this.

Since Mar 4, 2026.

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

Description

Describe the bug

Attempting to solve a linear program with no constraints (other than variable bounds) results in an error.

Steps/Code to reproduce bug

from cuopt.linear_programming.problem import Problem, CONTINUOUS, MINIMIZE
from cuopt.linear_programming.solver_settings import SolverSettings

problem = Problem("no_constraints")
x = problem.addVariable(lb=0.0, vtype=CONTINUOUS, name="x")

problem.setObjective(x, sense=MINIMIZE)

settings = SolverSettings()

# This will error
problem.solve(settings)

on my machine, this produces the following log (note the first line)

Error in solve_lp: {"CUOPT_ERROR_TYPE": "ValidationError", "msg": "A_offsets must be set before calling the solver."}
cuOpt version: 26.2.0, git hash: f73da24d, host arch: aarch64, device archs: 75-real,80-real,86-real,90a-real,100f-real,120a-real,120
CPU: Unknown, threads (physical/logical): 1/20, RAM: 108.74 GiB
CUDA 13.1, device: NVIDIA GB10 (ID 0), VRAM: 119.70 GiB
CUDA device UUID: 43bce240-d7d6-65e5-ca7a-e351bab5de7a

Expected behavior

The problem should be passed to the solver and solved correctly.

Environment details (please complete the following information):

  • Environment location: DGX Spark workstation
  • Method of cuOpt install: via pip in a python virtual environment. I am using cuopt v26.02 release.

Additional context

I tried this with a quadratic term in the objective, and obtained the same error.

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.