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
Get Extrae from https://tools.bsc.es/downloads (choose Source tarball of Extrae tool).
Unpack the tarball and enter the just created directory:
$ tar xfz extrae-xxx.tar.gz $ cd extrae-xxx
Export a target installation directory for Extrae:
$ export EXTRAE_PREFIX=$HOME/installation/extrae
Configure it:
$ ./configure --prefix=$EXTRAE_PREFIX
Build and install:
$ make $ make install
Note
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:
automake, autoconf, libtool, pkg-config, make and a C and C++ compiler
boost >= 1.59
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:
Extrae to generate execution traces for offline performance analysis with Paraver
graphviz and pdfjam or pdfjoin from TeX to generate graphical representations of the dependency graph
parallel to generate the graph representation in parallel
PAPI to generate statistics that include hardware counters
CUDA to enable CUDA tasks
PGI to enable OpenACC tasks
PAPI to generate real-time statistics of hardware counters
PQOS to generate real-time statistics of hardware counters
DLB to enable dynamic management and sharing of computing resources
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:
--with-nanos6-mercurium=prefix
to specify the prefix of the Mercurium installation--with-boost=prefix
to specify the prefix of the Boost installation--with-libunwind=prefix
to specify the prefix of the libunwind installation--with-papi=prefix
to specify the prefix of the PAPI installation--with-libnuma=prefix
to specify the prefix of the numactl installation--with-extrae=prefix
to specify the prefix of the extrae installation--with-dlb=prefix
to specify the prefix of the DLB installation--with-jemalloc
to specify the prefix of the jemalloc installation--with-papi=prefix
to specify the prefix of the PAPI installation--with-pqos=prefix
to specify the prefix of the PQoS installation--with-cuda[=prefix]
to enable support for CUDA tasks--enable-openacc
to enable support for OpenACC tasks; requires PGI compilers--with-pgi=prefix
to specify the prefix of the PGI compilers installation, in case they are not in$PATH
--enable-monitoring
to enable monitoring and predictions of task/CPU/thread statistics--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 \
-DCMAKE_INSTALL_PREFIX=$INSTALLATION_PREFIX \
-DLLVM_ENABLE_PROJECTS=clang \
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \
-DCLANG_DEFAULT_NANOS6_HOME=$INSTALLATION_PREFIX
$ make
$ make install
More details about customizing the LLVM build can be found in the LLVM website