.. index:: double: Ompss; installation .. _installation-ompss: Installation of OmpSs ===================== Preparation ----------- You must first choose a directory where you will install OmpSs. In this document this directory will be referred to as ``TARGET``. We recommend you to set an environment variable ``TARGET`` with the desired installation directory. For instance:: $ export TARGET=$HOME/ompss .. index:: double: Extrae; installation .. _extrae-installation: 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 #. Configure it:: $ ./configure --prefix=$TARGET .. note:: Extrae may have a number of dependences. Do not hesitate to check the `Extrae User's Manual `_ #. Build and install:: $ make $ make install Now you can proceed to the :ref:`nanos-installation`. Do not forget to pass ``--with-extrae=$TARGET`` to Nanos++ ``configure``. .. index:: double: Nanos++; installation .. _nanos-installation: Installation of Nanos++ ----------------------- #. First, make sure that you fulfill all the :ref:`nanos-build-requirements`. #. Get the latest Nanos++ *tarball* (``nanox-version-yyyy-mm-dd.tar.gz``) from https://pm.bsc.es/ompss-downloads Unpack the file and enter the just created directory:: $ tar xfz nanox-version-yyyy-mm-dd.tar.gz $ cd nanox-version #. Run ``configure``. There are a number of flags that enable or disable different features of Nanos++. Make sure you pass ``--prefix`` with the destination directory of your OmpSs installation (in our case ``TARGET``). .. important:: If you want instrumentation support, you must add ``--with-extrae=dir`` to your *configure-flags* (see below), where ``dir`` is the directory where you installed Extrae (usually ``TARGET``). Check :ref:`nanos-configure-flags` for more information about *configure-flags*. :: $ ./configure --prefix=$TARGET configure-flags .. note:: You can pass an empty set of *configure-flags*. .. hint:: ``configure`` prints lots of output, but a small summary of enabled features is printed at the end. You may want to check it to ensure you are correctly passing all the flags #. Build :: $ make This may take some time. You may build in parallel using ``make -jN`` where ``N`` is the maximum number of threads you want to use for parallel compilation. #. Install :: $ make install This will install Nanos++ in ``TARGET``. Now you can proceed to :ref:`mercurium-installation`. .. index:: double: Nanos++; build requirements .. _nanos-build-requirements: Nanos++ build requirements ^^^^^^^^^^^^^^^^^^^^^^^^^^ There are a number of software requirements to successfully build Nanos++ from the source code. .. important:: Additional software is needed if you compile from the git repository. This section details the requirements when building from a *tarball* (a *tar.gz* file). * A supported platform running Linux (i386, x86-64, ARM, PowerPC or IA64). * GNU C/C++ compiler versions 4.4 or better. If you want CUDA support: * CUDA 5.0 or better. If you want to enable the cluster support in Nanos++ you will need: * GASNet 1.14.2 or better .. index:: double: Nanos++; configure flags .. _nanos-configure-flags: Nanos++ configure flags ^^^^^^^^^^^^^^^^^^^^^^^ By default Nanos++ compiles three versions: *performance*, *debug* and *instrumentation*. Which one is used is usually governed by flags to the Mercurium compiler. You can speedup the build of the library by selectively disabling these versions. You can also enable a fourth version: *instrumentation-debug*. That one is probably of little interest to regular users of Nanos++ as it enables debug and instrumentation at the same time. --disable-instrumentation Disables generation of instrumentation version --disable-debug Disables generation of debug version --disable-performance Disables generation of performance version --enable-instrumentation-debug Enables generation of instrumentation-debug version Besides the usual shared memory environment (which is called the *SMP* device), Nanos++ supports several devices. Such devices are automatically enabled if enough support is detected at the host. You can disable them with the following flags. --disable-gpu-arch Disables CUDA support --disable-opencl-arch Disables OpenCL support Nanos++ includes several plugins that are able to use other software packages. You can enable them using the following flags. --with-cuda=dir Directory of CUDA installation. By default it checks ``/usr/local/cuda``. If a suitable installation of CUDA is found, CUDA support is enabled in Nanos++ (unless you disable it) --with-opencl=dir Directory of OpenCL installation. By default it checks ``/usr``. If a suitable installation of OpenCL is found, OpenCL support is enabled in Nanos++ (unless you disable it) --with-opencl-include=dir If you use --with-opencl=dir, ``configure`` assumes that dir/``include`` contains the headers. Use this flag to override this assumption. --with-opencl-lib=dir If you use --with-opencl=dir, ``configure`` assumes that dir/``lib`` contains the libraries. Use this flag to override this assumption. --with-extrae=dir Directory of Extrae installation. **This is mandatory if you want instrumentation**. Make sure you have already installed Extrae first. See :ref:`extrae-installation` --with-mpitrace=dir This is a deprecated name for ``--with-extrae`` --with-nextsim=dir Directory of NextSim installation --with-ayudame=dir Directory of `Ayudame installation `_ --with-hwloc=dir Directory of `Portable Hardware Locality (hwloc) `_ installation. This is highly recommended for NUMA setups --with-chapel=dir Directory of `Chapel `_ installation --with-mcc=dir Directory of Mercurium compiler. *This is only for testing Nanos++ itself and only useful to Nanos++ developers*. .. index:: double: Mercurium; installation .. _mercurium-installation: Installation of Mercurium C/C++/Fortran source-to-source 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/blob/master/README.md Once you complete all the steps listed in the link above you should be ready to :ref:`compile-ompss-programs`.