Getting Started

SPBench Dependencies

The folowing packages are required to install and use SPBench:

  • build-essential

  • pkg-config

  • cmake

  • python (tested on python3 and python2.7)

You can run the command below to install theses packages or ask a system admin.

sudo apt-get install -y build-essential pkg-config cmake python3

Command-Line Interface

The SPBench framework works with a command-line interface (CLI).

The CLI offers some commands. You can check them running:

./spbench --help

For each command there is also a “help” guide. You can access it using:

./spbench [command] -h

Check Command-Line Interface for more details.

Installing SPBench

The purpose of the SPBench is to provide self-contained benchmarks, i.e., it provides the specific installation dependencies for each supported application. These dependencies can be either libraries like OpenCV for the image processing applications or parallel programming interfaces like Intel TBB for the parallel benchmarks.

Therefore, SPBench has specific commands to help download and install these dependencies. See installation section for more details or run the command below:

./spbench install -help

To run the benchmarks it is not enough to install the dependencies, you also need to download and install the workloads. SPBench also offers commands to do this. See section SPBench workloads for more details, or run the command below.

./spbench download-inputs -help

If there were no errors during the installation of the dependencies or workloads, then you are ready to compile and run the SPBench benchmarks. See section How to run SPBench for more details.

How to use

In this framework you can simply run the benchmarks that are already provided or implement your own specific benchmark.

To run the benchmarks you first need to have installed the application dependencies and also the workloads. See pages How to install and SPBench workloads for more details.

After installing the workloads and dependencies (make sure you set the environment variables source setup_vars.sh), you can run the ‘list’ command to see all the pre-available benchmarks in SPBench.

./spbench list

Then you can select one of the benchmarks from the list and use the command below to compile it.

./spbench compile -bench <selected_bench_name_from_list>

If the compilation was successful, just run it via the ‘exec’ command.

./spbench exec -bench <selected_bench_name_from_list> -input <input_id> ... [optional_commands] <optional_args>

Note

For GrPPI benchmarks you must select a backend using a custom user argument. Available backends: ‘omp’ (OpenMP), ‘thr’ (C++11 threads), ‘ff’ (FastFlow), and ‘tbb’.

./spbench exec -bench <grppi_bench> -input <input_id> ... -user-arg <backend>

Check Command-Line Interface for other options.

Inputs

In the exec step you must choose a given input for the benchmark.

These inputs can be downloaded and will be stored in the inputs/ directory.

You can run the ./spbench download-inputs to automatically download them.

You can use your own input or choose a given one.

You can check the given inputs through:

./spbench list-inputs

See the SPBench workloads page for more details about workloads.

Tip

  • You can run source setup_vars.sh to load the libraries.

  • You must load the libraries before using SPBench every time you star a new session.