gRPC API (Reference)#
The CuOptRemoteService gRPC API is defined in Protocol Buffers under the cuopt.remote package. Source files in the repository:
cpp/src/grpc/cuopt_remote_service.proto— service and job/chunk/log RPCscpp/src/grpc/cuopt_remote.proto— LP/MIP problem, settings, and result messages
Most users do not call these RPCs directly:
Remote execution — Python, C (
cuOptSolve), andcuopt_cliforward solves whenCUOPT_REMOTE_HOSTandCUOPT_REMOTE_PORTare set (Quick Start, Advanced Configuration).Python async gRPC client —
cuopt.grpc.linear_programming.Client(Python Async gRPC Client).
Custom clients call CuOptRemoteService over gRPC using these definitions.
This page summarizes the service for custom integrators and debugging.
Service: CuOptRemoteService#
Asynchronous Jobs#
RPC |
Purpose |
|---|---|
|
Submit an LP or MIP job in one message (within gRPC message size limits). |
|
Poll job status by |
|
Fetch a completed result (unary, when the payload fits one message). |
|
Cancel the job if it is still queued or running, then remove all server-side state for that |
|
Cancel a queued or running job. |
|
Block until the job finishes (status only; use |
Chunked Upload (Large Problems)#
RPC |
Purpose |
|---|---|
|
Begin a session; send problem metadata and settings (arrays follow as chunks). |
|
Upload one slice of a numeric array field. |
|
Finalize the upload and return |
Chunked Download (Large Results)#
RPC |
Purpose |
|---|---|
|
Begin a download session; returns scalar result fields and array descriptors. |
|
Fetch one chunk of a result array. |
|
End the download session and release server state. |
Streaming and Callbacks#
RPC |
Purpose |
|---|---|
|
Server-streaming solver log lines for a job. |
|
MIP incumbent solutions since a given index (only if the job was
submitted with |
Messages and Constraints#
Problem types — Wire categories are LP/QP or MIP. QP is submitted as
lp_request(SolveLPRequest) with quadratic fields onOptimizationProblem. Routing over this gRPC service is not available yet (planned; use REST for remote routing today).Solver settings — Carried as
PDLPSolverSettingsorMIPSolverSettingsinside the request or chunked header, aligned with the NVIDIA cuOpt solver options documentation.Errors — Transport failures use gRPC status codes. Some outcomes use
Status::OKwith response fields:CheckStatusreports unknown jobs asjob_status=NOT_FOUND;GetResultuses transportNOT_FOUND/UNAVAILABLE(not ready) andstatus=ERROR_SOLVE_FAILEDfor failed solves;DeleteResult/CancelJobreport outcomes in the response. Seecuopt_remote_service.proto.
Further Reading#
Python Async gRPC Client / Python Async gRPC Client API Reference — Python job client (
cuopt.grpc) built on these RPCs.gRPC Server Behavior — Server process model and job lifecycle (overview); Advanced Configuration for
cuopt_grpc_serverflags. Contributor details:cpp/docs/grpc-server-architecture.md.Advanced Configuration — TLS, Docker, client environment variables, and limitations.