Download & Installation

There are two choices for downloading S4: downloading a binary package from below, or cloning the GitHub respository and building from source. The latter is the preferred method for obtaining the latest features and bug fixes.

Binary packages

The binary packages do not contain the examples and documentation, and are compiled with the bare minimum of features. You need to download that separately.

GitHub repository

The source code is located at this GitHub repository. You can clone it with the command:

git clone https://github.com/victorliu/S4.git

Compiling from source

Dependencies

Before compiling, there are a number of packages that are recommended. None of these is required except for either Lua or Python.

  • Lua 5.2.x - This is required for the Lua frontend. Either this or Python is required. On Ubuntu or Debian, the repository package is called liblua5.2-dev.
  • Python 2.x or 3.x - This is required to build S4 as a Python extension. Either this or Lua is required. On Ubuntu or Debian, the repository package is called python-dev or python3-dev.
  • BLAS and Lapack implementation - Optional, but highly recommended. It is suggested that OpenBLAS be used.
  • FFTW3 - Optional, provides a 2-3x speedup in FFT computations. On Ubuntu or Debian, the repository package is called libfftw3-dev.
  • CHOLMOD - Optional, provides a speedup in certain FMM formulations. On Ubuntu or Debian, install the repository package is called libsuitesparse-dev.
  • POSIX Threads - Optional, typically provided by the compiler. Allows multi-threading support on shared-memory machines.
  • MPI - Optional, provides support for parallel computing on distributed-memory machines.

Compilation

# Edit Makefile.custom and set the library flags for all the dependencies that can be provided. # Run:

make lib

# Next, build either the Lua frontend:

      make S4lua

or the Python extension::

      make S4_pyext

# The resulting Lua binary is just called S4, and the Python shared object is build/lib.*/S4.so.