Skip to content

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

Description

@ramakrishnap-nv

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responseThis expects a response from maintainer or contributor depending on who requested in last comment.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions