Installation¶
Tarantella needs to be built from source. Since Tarantella is built on top of TensorFlow 2, you will require a recent version of it. Additionally, you will need an installation of the open-source communication library GPI-2, which Tarantella uses to communicate between processes. 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 (from version 7.4.0
).
You will also need the build tool CMake (from version 3.8
).
Installing GPI-2¶
Next, you will need to download, compile and install the GPI-2 library.
The currently supported version is v1.4.0
, which needs to be built with
position independent flags (-fPIC
).
To download the required version, clone the
git repository
and checkout the correct tag
:
git clone https://github.com/cc-hpc-itwm/GPI-2.git
cd GPI-2
git fetch --tags
git checkout -b v1.4.0 v1.4.0
Now, use autotools to configure and compile the code
./autogen.sh
export GPI2_INSTALLATION_PATH=/your/installation/path
CFLAGS="-fPIC" CPPFLAGS="-fPIC" ./configure --with-ethernet --prefix=${GPI2_INSTALLATION_PATH}
make
where ${GPI2_INSTALLATION_PATH}
needs to be replaced with the path where you want to install
GPI-2. Note the --with-ethernet
option, which will use standard TCP sockets for communication.
This is the correct option for laptops and workstations.
In case you want to use Infiniband, replace the above option with --with-infiniband
.
Now you are ready to install GPI-2 with
make install
export PATH=${GPI2_INSTALLATION_PATH}/bin:$PATH
export LD_LIBRARY_PATH=${GPI2_INSTALLATION_PATH}/lib64:$LD_LIBRARY_PATH
where the last two commands make the library visible to your system.
If required, GPI-2 can be removed from the target directory by using make uninstall
.
Installing TensorFlow 2¶
Next you will need to install TensorFlow 2.
Tarantella supports TensorFlow versions 2.0
to 2.2
.
Either version can be installed in a conda environment using pip,
as recommended on the TensorFlow website.
In order to do that, first install conda on your system. Then, create and activate an environment for Tarantella:
conda create tarantella
conda activate tarantella
Now, you can install the latest supported TensorFlow version with
conda install python=3.7
pip install --upgrade tensorflow==2.2
Tarantella requires at least Python 3.7
. Make sure the selected version also matches
the TensorFlow requirements.
SSH key-based authentication¶
In order to use Tarantella on a cluster, make sure you can ssh between nodes
without password. For details, refer to the FAQ section.
In particular, to test Tarantella on your local machine, make sure
you can ssh to localhost
without password.
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
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:
cd tarantella
mkdir build && cd build
export TARANTELLA_INSTALLATION_PATH=/your/installation/path
cmake -DCMAKE_INSTALL_PREFIX=${TARANTELLA_INSTALLATION_PATH} ..
Now, we can compile and install Tarantella to TARANTELLA_INSTALLATION_PATH
:
make
make install
export PATH=${TARANTELLA_INSTALLATION_PATH}/bin:${PATH}
[Optional] Building and running tests¶
In order to build Tarantella with tests, you will also need to install Boost (for C++ tests), and pytest (for Python tests).
To install boost with the required devel-packages, under Ubuntu you can use
sudo apt install libboost-all-dev
while in Fedora you can use
sudo dnf install boost boost-devel
To install pytest you can use pip:
pip install -U pytest
After having installed these libraries, make sure to configure Tarantella with testing switched on:
cmake -DENABLE_TESTING=ON ..
Now you can compile Tarantella and run its tests in the build
directory.
make
ctest
[Optional] Building documentation¶
If you would like to build the documentation
locally, run the following cmake
command
cmake -DCMAKE_INSTALL_PREFIX=${TARANTELLA_INSTALLATION_PATH} -DBUILD_DOCS=ON ..
before compiling. This requires you to have Sphinx installed:
pip install -U sphinx