LPG: Linear Programming on GPUs
Project contains:
- libLPG - library that contains functions to solve linear programmes using a CPU or GPGPU.
- LPG - a command-line based interface to the libLPG solver [not implemented yet!]
- libOsiLPG - an Open Solver Interface library to allow COIN-OR projects to use LPG as their LP solver.
Project file structure
- BuildTools [taken from the COIN-OR BuildTools SVN]
- CoinUtils [taken from the COIN-ORCoinUtils SVN]
- libLPG
- kernel [the OpenCL kernels used by libLPG]
- src [the C++ files and headers used by libLPG]
- MSVisualStudio [the solution/project file for libLPG]
- libOsiLPG
- MSVisualStudio [the solution/project file for libOsiLPG]
- src [the C++ files and headers used by libOsiLPG]
Project status
Done before 24th January
- Solve LPs in single and double precision on CPU (dense A matrix, standard computational form)
- Solve LPs in single precision on GPU (dense A, SCF)
- Solve LPs with CBC
Todo
- Implement all functions required for CBC to solve IPs using LPG - Abandoned for now, may try again on Symphony
- Write code to take any problem and convert to SCF - Done 26th Jan, except it leaves bounds on variables
- Enhance solvers to accept bounds on columns - WORKING ON NOW
- Make solvers that can handle sparsity
- Write the CLI for LPG - Done 27th Jan
- Compress single/dbl cpu solver into one file using preprocessor defines - Done 24th Jan
Firing up CBC with LPG (on Windows, VS2008)
These instructions will help you compile a simple example that uses CBC:
- Download CBC from its SVN repository
- Download LPG from...!
- Open the \Cbc\MSVisualStudio\v9\Cbc.sln solution file
- Add the libLPG and libOsiLPG projects to the solution
- Add a new empty project, call it cbcExampleMin
- Add \Cbc\examples\minimum.cpp to the new project
- Set cbcExampleMin as the Start Up project (right click on the project name, pick from menu)
- Set cbcExampleMin's dependecies to be:
- libCbc
- libCoinUtils
- libLPG
- libOsi
- libOsiCBC
- libOsiLPG
- libClp [needed for CBC, could probably be removed with correct config]
- libOsiClp [needed for CBC, could probably be removed with correct config]
- libCgl [needed for CBC]
- Set project properties -> C/C++ -> Code Generation -> Runtime library to /MTd
- Set the project to look in the following folders for includes:
- \Cbc\src
- \CoinUtils\src
- \BuildTools\headers
- \Osi\src
- LPG (wherever it is)\libOsiLPG\src
- Change the line:
- #include "OsiClpSolverInterface.hpp"
- to
- #include "OsiLpgSolverInterface.hpp"
- Change the line:
- OsiClpSolverInterface solver1;
- to
- OsiLpgSolverInterface solver1;