Getting Started

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 bellow.

./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>

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.

  • To make FastFlow/SPar properly recognize and map the cores of the processor you must run at SPBench root bash ./ppis/SPar/libraries/ff/mapping_string.sh and bash ./ppis/fastflow/ff/mapping_string.sh. Only required once. However, this FastFlow feature may not be able to automatically set this value in the .../ff/config.sh file. In this case, you must do manually update the config.hpp file with the result given by the mapping_string.sh script.