1.4. 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.4.1. Build requirements

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

  1. automake, autoconf, libtool, 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.4.2. Optional libraries and tools

In addition to the build requirements, the following libraries and tools enable additional features that are useful for debugging and analysing the performance of applications:

  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

1.4.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=TARGET ...other options...
$ make all check
$ make install

where TARGET 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 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

The location of elfutils and hwloc is always retrieved through pkg-config. The location of PAPI can also be retrieved through pkg-config if it is not specified through the --with-papi parameter. 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

After Nanos6 has been installed, it can be used by compiling your C, C++ and Fortran codes with Mercurium using the --ompss-2 flag. Example:

$ mcc -c --ompss-2 a_part_in_c.c
$ mcxx -c --ompss-2 a_part_in_c_plus_plus.cxx
$ mcxx --ompss-2 a_part_in_c.o a_part_in_c_plus_plus.o -o app

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