-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Labels
awaiting responseThis expects a response from maintainer or contributor depending on who requested in last comment.This expects a response from maintainer or contributor depending on who requested in last comment.bugSomething isn't workingSomething isn't working
Description
Describe the bug
The simple_qp_example.c example fails to compile.
I obtain the following error message:
docs/cuopt/source/cuopt-c/lp-milp/examples/simple_qp_example.c: In function 'test_simple_qp':
docs/cuopt/source/cuopt-c/lp-milp/examples/simple_qp_example.c:133:40: error: passing argument 16 of 'cuOptCreateQuadraticProblem' from incompatible pointer type [-Wincompatible-pointer-types]
133 | variable_types,
| ^~~~~~~~~~~~~~
| |
| char *
In file included from docs/cuopt/source/cuopt-c/lp-milp/examples/simple_qp_example.c:25:
~/miniconda3/envs/cuopt_dev/include/cuopt/linear_programming/cuopt_c.h:311:29: note: expected 'void **' but argument is of type 'char *'
311 | cuOptOptimizationProblem* problem_ptr);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
docs/cuopt/source/cuopt-c/lp-milp/examples/simple_qp_example.c:118:12: error: too many arguments to function 'cuOptCreateQuadraticProblem'
118 | status = cuOptCreateQuadraticProblem(num_constraints,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
~/miniconda3/envs/cuopt_dev/include/cuopt/linear_programming/cuopt_c.h:295:13: note: declared here
295 | cuopt_int_t cuOptCreateQuadraticProblem(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~Note that the error occurs because the call to cuOptCreateQuadraticProblem should not include variable types (i.e. continuous vs integer vs binary) here:
| variable_types, |
Steps/Code to reproduce bug
- Checkout
mainbranch - Build cuopt from source
- Compile
gcc -I . -L . -o simple_qp docs/cuopt/source/cuopt-c/lp-milp/examples/simple_qp_example.c -lcuopt
Expected behavior
The example should compile without error, and the executable should execute as expected.
Environment details (please complete the following information):
- Environment location: DGX Spark workstation
- Method of cuOpt install: from source using
conda(via miniconda as specified in official instructions)
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
awaiting responseThis expects a response from maintainer or contributor depending on who requested in last comment.This expects a response from maintainer or contributor depending on who requested in last comment.bugSomething isn't workingSomething isn't working