Skip to content

[FEA] Add instructions/notebook for using cuOpt from GAMS(Py) and potentially build and deploy the link in CI #188

@0x17

Description

@0x17

At GAMS we are impressed with the significant speed gains from using PDLP on GPUs for solving huge LPs in general and the competitive cuOpt solver implementation from NVIDIA in particular. Hence allowing users of the GAMS modeling language (and the new GAMSPy package for modeling in Python) to solve their extensive collections of LP and MILP optimization models for bigger instances with cuOpt as solver via an efficient link would be something we would love to help enabling.

As a crucial step, we wrote an initial implementation of a GAMS cuOpt solver link that allows GAMS and GAMSPy models to be solved via cuOpt by doing something as simple as setting the LP/MIP solver to cuOpt, e.g., gams trnsport lp=cuopt. The link is written in plain C and uses the cuOpt C-API to communicate with cuOpt, which was refreshingly straightforward to use.

As the link relies on cuOpt and transitively on various shared libraries from the CUDA runtime plus a recent GAMS installation both for building and running, we were wondering if it might be sensible (for us) to create a pull request here that adds building and testing the solver link for cuOpt to the workflows of the cuopt repository and then deploys the resulting binary, so users can download them for insertion into their GAMS installation folder. When including it in a pull request for this repository, we would of course be willing to make the source code of the solver link for cuOpt available under the Apache 2.0 license.

While we could also bundle the link with the GAMS system installer, we are hesitant to do so because it might be easy to get a mismatch of the ABI the link is built against and the version of cuOpt the user has installed and instead bundling all dependencies seems a bit excessive considering there will also be users that cannot take advantage of cuOpt due to not having an appropriate GPU installed on their Linux machine.

When there is an established way to make the link available, it would also be nice to add either an example Python notebook or usage documentation for using cuOpt from GAMS as an additional alternative to the already established interfaces through C, Python, or the REST-API. The instructions will probably mostly be related to setting up the solver link for cuOpt (and having all dependencies for cuOpt itself) as afterwards any GAMS model (of appropriate model type) just needs to set “cuOpt” as choice for the LP, MIP, or RMIP and then the optimization will magically happen with cuOpt.

If the cuOpt team has different ideas for making the GAMS <-> cuOpt integration available for the end user, we are very much open to suggestions. Independent of the specific technical solution, there is a significant portion of GAMS users that would benefit from having cuOpt easily accessible as solver for their large scale linear programs and this would also help stress testing cuOpt with a big pile of models already implemented in the GAMS modeling language.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions