Installation

Tarantella needs to be built from source. Since Tarantella is built on top of TensorFlow, you will require a recent version of it. Additionally, you will need an installation of the open-source communication libraries GaspiCxx and GPI-2, which Tarantella uses to implement distributed training.

Lastly, you will need pybind11, which is required for Python and C++ inter-communication.

In the following we will look at the required steps in detail.

Installing dependencies

Compiler and build system

Tarantella can be built using a recent gcc compiler with support for C++17 (starting with gcc 7.4.0). You will also need the build tool CMake (from version 3.12).

Installing TensorFlow

First you will need to install TensorFlow. Supported versions range between Tensorflow 2.4 - 2.9, and they can be installed in a conda environment using pip, as recommended on the TensorFlow website.

Caution

This tutorial targets installations on the STYX cluster, where some of the dependencies are pre-installed. For a full description of Tarantella’s installation steps, refer to the Tarantella documentation.

To get started, create and activate an environment for Tarantella:

conda create -n tarantella
conda activate tarantella

Now, you can install TensorFlow with:

conda install -c nvidia python==3.9 cudatoolkit~=11.2 cudnn
pip install --upgrade tensorflow_gpu==2.9
conda install pybind11 pytest networkx

Tarantella requires at least Python 3.7. Make sure the selected version also matches the TensorFlow requirements.

Caution

If a new conda environment is created, or Tensorflow is reinstalled/updated, please repeat all the steps concerning the Tarantella library installation. The Tarantella backend is compiled against the TensorFlow library, and thus it requires exactly the same binary version at runtime.

Installing GaspiCxx

GaspiCxx is a C++ abstraction layer built on top of the GPI-2 library, designed to provide easy-to-use point-to-point and collective communication primitives. Tarantella’s communication layer is based on GaspiCxx and its PyGPI API for Python.

To install GaspiCxx and PyGPI, first download the latest dev branch from the git repository:

git clone https://github.com/cc-hpc-itwm/GaspiCxx.git
cd GaspiCxx
git checkout dev

Compile and install the library as follows, making sure the previously created conda environment is activated:

conda activate tarantella

mkdir build && cd build
export GASPICXX_INSTALLATION_PATH=/your/gaspicxx/installation/path
cmake -DBUILD_PYTHON_BINDINGS=ON    \
      -DBUILD_SHARED_LIBS=ON        \
      -DCMAKE_INSTALL_PREFIX=${GASPICXX_INSTALLATION_PATH} ../
make -j$(nproc) install

where ${GASPICXX_INSTALLATION_PATH} needs to be set to the path where you want to install the library.

Building Tarantella from source

With all dependencies installed, we can now download, configure and compile Tarantella. To download the source code, simply clone the GitHub repository:

git clone https://github.com/cc-hpc-itwm/tarantella.git
cd tarantella
git checkout master

Next, we need to configure the build system using CMake. For a standard out-of-source build, we create a separate build folder and run cmake in it:

conda activate tarantella

cd tarantella
mkdir build && cd build
export TARANTELLA_INSTALLATION_PATH=/your/installation/path
cmake -DCMAKE_INSTALL_PREFIX=${TARANTELLA_INSTALLATION_PATH} \
      -DCMAKE_PREFIX_PATH=${GASPICXX_INSTALLATION_PATH} ../

Now, we can compile and install Tarantella to TARANTELLA_INSTALLATION_PATH:

make -j$(nproc) install
export PATH=${TARANTELLA_INSTALLATION_PATH}/bin:${PATH}

[Optional] Building and running tests

In order to build Tarantella with tests, please follow the steps from the Tarantella docs.