[BUG] CUOPT_MIP_PRESOLVE is declared in constants.h but is not a registered parameter

Abierto
#1,728 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp
Área
backend

Línea de trabajo

Comienza con cpp/include/cuopt/mathematical_optimization/constants.h y cpp/src/math_optimization/solver_settings.cu; después, inspecciona los parámetros relacionados con MIP cercanos y reproduce la llamada rechazada a cuOptSetParameter. Determina si CUOPT_MIP_PRESOLVE debía registrarse o eliminarse. Se considera terminado cuando las constantes públicas y los parámetros registrados coinciden, y los bindings generados ya no exponen un parámetro rechazado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

awaiting response

Describe the bug

CUOPT_MIP_PRESOLVE is declared in the public constants header but is not a real parameter:

cpp/include/cuopt/mathematical_optimization/constants.h:66:#define CUOPT_MIP_PRESOLVE  "mip_presolve"

It is registered nowhere in cpp/src/math_optimization/solver_settings.cu and referenced nowhere else in the tree, so cuOptSetParameter(settings, CUOPT_MIP_PRESOLVE, ...) is rejected as an unknown parameter.

Comparing the two directions: all 109 distinct parameter names registered in solver_settings.cu are declared in constants.h, and CUOPT_MIP_PRESOLVE is the single declared name with no registration.

Steps/Code to reproduce bug

cuOptSolverSettings settings = NULL;
cuOptCreateSolverSettings(&settings);
cuOptSetParameter(settings, CUOPT_MIP_PRESOLVE, "1");   /* CUOPT_INVALID_ARGUMENT */

Expected behavior

Either register the parameter, or remove the constant. A public header should not advertise a parameter the solver rejects.

Additional context

This matters more than a stray macro because bindings are generated from this header rather than from a runtime list — the approach @mlubin confirmed in #1705. The Java bindings generate CuOptConstants.java from constants.h at build time, so CuOptConstants.CUOPT_MIP_PRESOLVE exists today and any caller using it gets a runtime error. The same would apply to any future Go, Rust, or C# binding generated the same way.

Note there is a separate, real mip_presolve-adjacent parameter set (CUOPT_MIP_PROBING, the CUOPT_MIP_HYPER_HEURISTIC_PRESOLVE_MAX_ROUNDS family), so the fix is not simply renaming — it needs someone who knows whether a mip_presolve toggle was intended.

Found while verifying #1705.

Lenguaje dominante
Cuda
Estrellas
1.1k
Forks
249
Merge medio
1 d 11 h
PR fusionados (30 d)
123

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NVIDIA/cuopt

Todos los issues de NVIDIA/cuopt

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.