StarPU Handbook
4. Building and Installing StarPU

Depending on how much you need to tune the library installation, we propose several solutions.

  • You just want to have a try, to see if it can be installed well on your system, what are the performances on simple cases, run the examples, or simply use the last stable version: we recommend using the latest StarPU debian package (see Installing a Binary Package) for those who work on a Linux Debian or Ubuntu distribution, Guix or Spack on other Linux systems (see Installing a Source Package), Brew on macOS (see Installing a Source Package).
  • You want to use it, but you need a change somewhere in the stack like considering another version (git branch), change the default MPI, use your favorite compiler, modify some sources: you may try with Guix or Spack because these package managers allow building from sources and thus many options can be changed dynamically (command line), as described in Installing a Source Package, or directly build from source with the native build system of the library (Makefile, GNU autotools) following the procedures described below in Building from Source.
  • You need a tool for reproducibility of your experiments: Guix is recommended (see Installing a Source Package).

Whatever solution you go for, the tool bin/starpu_config can be used to display all the configuration parameters StarPU was installed with.

4.1 Installing a Binary Package

One of the StarPU developers being a Debian Developer, the packages are well integrated and very up-to-date. To see which packages are available, simply type:

$ apt-cache search starpu

To install what you need, type for example:

$ sudo apt-get install libstarpu-dev

4.2 Installing a Source Package

StarPU is available from different package managers.

Documentation on how to install StarPU with these package managers is directly available from the links specified above. We give below a brief overview of the spack installation.

4.2.1 Installing the Spack Package

Here is a quick guide to install StarPU with spack.

$ git clone git@github.com:spack/spack.git
$ source ./spack/share/spack/setup-env.sh # if you use bash or zsh
$ spack install starpu

By default, the latest release will be installed, one can choose to install a specific release or even the master version.

$ spack install starpu@master
$ spack install starpu@1.3.5

We strongly advise reading the detailed reference manual at https://spack.readthedocs.io/en/latest/getting_started.html

4.3 Building from Source

StarPU can be built and installed by the standard means of the GNU autotools. The following chapter is intended to briefly remind how these tools can be used to install StarPU.

4.3.1 Optional Dependencies

The hwloc (http://www.open-mpi.org/software/hwloc) topology discovery library is not mandatory to use StarPU, but strongly recommended. It allows for topology aware scheduling, which improves performance. hwloc is available in major free operating system distributions, and for most operating systems. Make sure to not only install a hwloc or libhwloc package, but also hwloc-devel or libhwloc-dev to have hwloc headers etc.

If libhwloc is installed in a standard location, no option is required, it will be detected automatically, otherwise --with-hwloc=<directory> should be used to specify its location.

If libhwloc is not available on your system, the option --without-hwloc should be explicitly given when calling the script configure.

4.3.2 Getting Sources

StarPU's sources can be obtained from the download page of the StarPU website (https://starpu.gitlabpages.inria.fr/files/).

All releases and the development tree of StarPU are freely available on StarPU SCM server under the LGPL license. Some releases are available under the BSD license.

The latest release can be downloaded from the StarPU download page (https://starpu.gitlabpages.inria.fr/files/).

The latest nightly snapshot can be downloaded from the StarPU website (https://starpu.gitlabpages.inria.fr/files/testing/).

And finally, the current development version is also accessible via git. It should only be used if you need the very latest changes (i.e. less than a day old!).

$ git clone git@gitlab.inria.fr:starpu/starpu.git

4.3.3 Configuring StarPU

Running autogen.sh is not necessary when using the tarball releases of StarPU. However, when using the source code from the git repository, you first need to generate the script configure and the different Makefiles. This requires the availability of autoconf and automake >= 2.60.

$ ./autogen.sh

You then need to configure StarPU. Details about options that are useful to give to configure are given in Compilation Configuration.

$ ./configure

If configure does not detect some software or produces errors, please make sure to post the contents of the file config.log when reporting the issue.

By default, the files produced during the compilation are placed in the source directory. As the compilation generates a lot of files, it is advised to put them all in a separate directory. It is then easier to clean up, and this allows to compile several configurations out of the same source tree. To do so, simply enter the directory where you want the compilation to produce its files, and invoke the script configure located in the StarPU source directory.

$ mkdir build
$ cd build
$ ../configure

By default, StarPU will be installed in /usr/local/bin, /usr/local/lib, etc. You can specify an installation prefix other than /usr/local using the option –prefix, for instance:

$ ../configure --prefix=$HOME/starpu

4.3.4 Building StarPU

$ make

Once everything is built, you may want to test the result. An extensive set of regression tests is provided with StarPU. Running the tests is done by calling make check. These tests are run every night and the result from the main profile is publicly available (https://starpu.gitlabpages/files/testing/master/).

$ make check

4.3.5 Installing StarPU

In order to install StarPU at the location which was specified during configuration:

$ make install

If you have let StarPU install in /usr/local/, you additionally need to run

$ sudo ldconfig

so the libraries can be found by the system.

Libtool interface versioning information are included in libraries names (libstarpu-1.4.so, libstarpumpi-1.4.so and libstarpufft-1.4.so).