SuperSCS  1.3.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Installation

Table of Contents

Installation guide

Linux and MacOSX

Dependencies

Before you proceed, make sure the following dependencies are installed:

if you intend to use SuperSCS via its python interface, you also need to install

In Linux run

sudo apt-get install libblas-dev liblapack-dev
sudo apt-get install python-numpy python-scipy

Installation

First, you need to download SuperSCS from the github repo of SuperSCS, or use the command:

git clone 'https://github.com/kul-forbes/scs.git'
cd scs/

Installation runs as simple as

make

Once make finishes, the library files will be in out/.

If you want to run the tests, do

make run-test

If, additionally, you want to run the tests and perform a memory check using valgrind, do

make run-test-mem

For more advanced options, type in your terminal

make help

Docker image

Docker is the simplest and most reliable way to install SuperSCS.

The engine of SuperSCS, the C library, can be installed using the image kulforbes/superscs.

Install it running:

docker pull kulforbes/superscs

If you haven't installed docker, do so by following this guide.

You may then run the docker image and access it using an interactive terminal by running

docker run -it kulforbes/superscs

All that is necessary to run SuperSCS in C has been installed.

Compiling with SuperSCS is as simple as

gcc superscs_test.c -o superscs_test -lscsindir -lblas -llapack -lm

Interfaces

MATLAB

To install SuperSCS in MATLAB, you need to build a MEX interface.

Do:

cd matlab;
make_scs;

This should work. If not, please report an issue.

CVX MATLAB

Necessary steps:

Here is an example of an LP problem

A(1,1) = 0.3; A(4,1) = -0.5;
A(2,2) = 0.7; A(4,2) = 0.9; A(3,3) = 0.2;
A = sparse(A);
n = size(A,2);
b = [0.2; 0.1; -0.1; 0.1];
c = [1;-2;-3];
cvx_begin
cvx_solver scs
cvx_solver_settings('eps', 1e-8, 'do_super_scs', 1, 'rho_x', 1,...
'direction', 100, 'memory', 50);
variable x(n);
dual variable y;
minimize( x'*x + c' * x );
subject to
y : A * x <= b;
cvx_end

We have chosen the SuperSCS mode with \(\rho_x=1\), the restarted Broyden direction and memory equal to \(50\).

We have set the tolerance to \(10^{-8}\).

In case you encounter any problems, please report an issue.

Note
This a pre-alpha unstable version, so there might be issues.
For example, cvx_precision is not supported (you have to use cvx_solver_settings('eps',...)).

Python

In order to install the SuperSCS module for Python, cd to python/ and run setup.py with the argument install:

cd python/
(sudo) python setup.py install

You will then be able to import superscs into your Python code.

Further documentation for the Python module can be found here.