1. Installation of OmpSs-2

The first step is choosing a directory where you will install OmpSs-2. In this document this directory will be referred to as the INSTALLATION_PREFIX directory. We recommend you to set an environment variable INSTALLATION_PREFIX with the desired installation directory. For instance:

$ export INSTALLATION_PREFIX=$HOME/installation/ompss-2

1.1. Installation of Extrae (optional)

This is just a quick summary of the installation of Extrae. For a more detailed information check Extrae Homepage

  1. Get Extrae from https://tools.bsc.es/downloads (choose Source tarball of Extrae tool).

  2. Unpack the tarball and enter the just created directory:

    $ tar xfz extrae-xxx.tar.gz
    $ cd extrae-xxx
  3. Export a target installation directory for Extrae:

    $ export EXTRAE_PREFIX=$HOME/installation/extrae
  4. Configure it:

    $ ./configure --prefix=$EXTRAE_PREFIX
  5. Build and install:

    $ make
    $ make install


Extrae may have other packages’s dependences and may use several options with the configure script. Do not hesitate to check the Extrae User’s Manual

1.2. Installation of Nanos6

Nanos6 is a runtime that implements the OmpSs-2 parallel programming model, developed by the Programming Models group at the Barcelona Supercomputing Center.

Nanos6 can be obtained from the github public repository or by contacting us at pm-tools@bsc.es.

1.2.1. Build requirements

To install Nanos6 the following tools and libraries must be installed:

  1. automake, autoconf, libtool, pkg-config, make and a C and C++ compiler

  2. boost >= 1.59

  3. hwloc

  4. numactl

  5. Finally, it’s highly recommended to have a installation of Mercurium with OmpSs-2 support enabled. When installing OmpSs-2 for the first time, you can break the chicken and egg dependence between Nanos6 and Mercurium in both sides: on one hand, you can install Nanos6 without specifying a valid installation of Mercurium. On the other hand, you can install Mercurium without a valid installation of Nanos6 using the --enable-nanos6-bootstrap configuration flag.

1.2.2. Optional libraries and tools

In addition to the build requirements, the following libraries and tools enable additional features:

  1. Extrae to generate execution traces for offline performance analysis with Paraver

  2. elfutils and libunwind to generate sample-based profiling

  3. graphviz and pdfjam or pdfjoin from TeX to generate graphical representations of the dependency graph

  4. parallel to generate the graph representation in parallel

  5. PAPI to generate statistics that include hardware counters

  6. CUDA to enable CUDA tasks

  7. PGI to enable OpenACC tasks

  8. PAPI to generate real-time statistics of hardware counters

  9. PQOS to generate real-time statistics of hardware counters

  10. DLB to enable dynamic management and sharing of computing resources

  11. jemalloc to use jemalloc as the default memory allocator, providing better performance than the default glibc implementation. Jemalloc software must be compiled with --enable-stats and --with-jemalloc-prefix=nanos6_je_ to link with the runtime

1.2.3. Build procedure

Nanos6 uses the standard GNU automake and libtool toolchain. When cloning from a repository, the building environment must be prepared through the following command:

$ autoreconf -f -i -v

When the code is distributed through a tarball, it usually does not need that command.

Then execute the following commands:

$ ./configure --prefix=$INSTALLATION_PREFIX ...other options...
$ make
$ make install

where $INSTALLATION_PREFIX is the directory into which to install Nanos6.

The configure script accepts the following options:

  1. --with-nanos6-mercurium=prefix to specify the prefix of the Mercurium installation

  2. --with-boost=prefix to specify the prefix of the Boost installation

  3. --with-libunwind=prefix to specify the prefix of the libunwind installation

  4. --with-papi=prefix to specify the prefix of the PAPI installation

  5. --with-libnuma=prefix to specify the prefix of the numactl installation

  6. --with-extrae=prefix to specify the prefix of the extrae installation

  7. --with-dlb=prefix to specify the prefix of the DLB installation

  8. --with-jemalloc to specify the prefix of the jemalloc installation

  9. --with-papi=prefix to specify the prefix of the PAPI installation

  10. --with-pqos=prefix to specify the prefix of the PQoS installation

  11. --with-cuda[=prefix] to enable support for CUDA tasks

  12. --enable-openacc to enable support for OpenACC tasks; requires PGI compilers

  13. --with-pgi=prefix to specify the prefix of the PGI compilers installation, in case they are not in $PATH

  14. --enable-monitoring to enable monitoring and predictions of task/CPU/thread statistics

  15. --enable-chrono-arch to enable an architecture-based timer for the monitoring infrastructure

The location of elfutils and hwloc is always retrieved through pkg-config. If they are installed in non-standard locations, pkg-config can be told where to find them through the PKG_CONFIG_PATH environment variable. For instance:

$ export PKG_CONFIG_PATH=$HOME/installations-mn4/elfutils-0.169/lib/pkgconfig:/apps/HWLOC/2.0.0/INTEL/lib/pkgconfig:$PKG_CONFIG_PATH

To enable CUDA the --with-cuda flag is needed. The location of CUDA can be retrieved automatically, if it is in standard system locations (/usr/lib, /usr/include, etc), or through pkg-config. Alternatively, for non-standard installation paths, it can be specified using the optional =prefix of the parameter. The location of PGI compilers can be retrieved from the $PATH variable, if it is not specified through the --with-pgi parameter.

Optionally, if you passed a valid Mercurium installation, you can execute the Nanos6 tests by running:

$ make check

1.2.4. Configuring GIT (contributing to github)

Please set up the following git configuration variables:

  • user.name

  • user.email

In addition we strongly suggest you to also set up the follwing pairs of variables and values:

  • rebase.stat=true

  • pull.rebase=true

  • branch.autosetuprebase=always

  • diff.submodule=log

  • fetch.recursesubmodules=true

  • status.submodulesummary=true

  • rerere.enabled=true

1.3. Installation of Mercurium compiler

You can find the build requirements, the configuration flags and the instructions to build Mercurium in the following link: https://github.com/bsc-pm/mcxx

You should be able to compile and install Mercurium with the following commands:

$ autoreconf -fiv
$ ./configure --prefix=$INSTALLATION_PREFIX --enable-ompss-2 --with-nanos6=$INSTALLATION_PREFIX
$ make
$ make install

1.4. Installation of LLVM-based compiler

The LLVM website describes a list of build requirements of LLVM.

You should be able to compile and install the LLVM-based compiler with the following commands:

$ cmake -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ENABLE_PROJECTS=clang \
$ make
$ make install

More details about customizing the LLVM build can be found in the LLVM website