1. Install OmpSs@FPGA toolchain

This page should help you install the OmpSs@FPGA toolchain. However, it is preferred using the pre-build Docker image with the latest stable toolchain. They are available at DockerHUB (https://hub.docker.com/r/bscpm/ompss_at_fpga). Moreover, we distribute pre-built SD images for some SoC. Do not hesitate to contact us at <ompss-fpga-support @ bsc.es> if you need help.

First, it describes the prerequisites to do the toolcahin installation. After that, the following sections explain different approaches to do the installation.

1.1. Prerequisites

1.1.1. Git Large File Storage

AIT repository uses Git Large File Storage to handle relatively-large files that are frequently updated (i.e. hardware runtime IP files) to avoid increasing the history size unnecessarily. You must install it so Git is able to download these files.

Follow instructions on their website to install it.

1.1.2. Vendor backends - Xilinx Vivado

Follow installation instructions from Xilinx Vivado, VivadoHLS and SDK, as well as the device support for the devices you’re working, should be enabled during setup. However, components can be added or removed afterwards.

1.2. Stable release

There is a meta-repository that points to latest stable version of all tools: https://github.com/bsc-pm-ompss-at-fpga/ompss-at-fpga-releases. It contains a Makefile that based on some environment variables will compile and install the toolchain. The evironment variables are:

  • TARGET [Def: aarch64-linux-gnu] Linux architecture that toolchain will target
  • PREFIX_HOST [Def: /] Installation prefix for the host tools (e.g. mcxx, ait)
  • PREFIX_TARGET [Def: /] Installation prefix for the target tools (e.g. nanox, libxdma)
  • EXTRAE_HOME [Def: ] (Optional) Extrae installation path
  • BUILDCPUS [Def: nproc] Number of processes used for building

The following example will cross-build the toolchain for the aarch64-linux-gnu architecture and install it in /opt/bsc/host-arm64/ompss and /opt/bsc/arm64/ompss:

git clone --recursive https://github.com/bsc-pm-ompss-at-fpga/ompss-at-fpga-releases.git
cd ompss-at-fpga-releases
export TARGET=aarch64-linux-gnu
export PREFIX_HOST=/opt/bsc/host-arm64/ompss
export PREFIX_TARGET=/opt/bsc/arm64/ompss
make

1.3. Individual git repos

The master branches of all tools should generate a compatible toolchain. Each package should contain information about how to compile/install itself, look for the README files. The following points briefly describe each tool and provide a possible build configuration/setup for each one. We assume that all packages will be installed in a Linux OS in the /opt/bsc/arm64/ompss folder. Moreover, we assume that the packages will be cross-compiled from an Intel machine to be run on an ARM64 embedded board.

List of tools to install:

1.3.1. Accelerator Integration Tool (AIT)

To install AIT just clone the repository, run the <ait>/install.sh script and add PREFIX/ait/ to PATH.

git clone https://github.com/bsc-pm-ompss-at-fpga/ait
cd ait
git lfs install
git lfs fetch
./install.sh PREFIX/ait/ all all
export PATH=PREFIX/ait/:$PATH

1.3.2. Kernel module

The driver is only needed to execute the applications. To compile them, the library must be installed on the host but the kernel module may not be loaded. Example to cross-compile the driver:

git clone https://github.com/bsc-pm-ompss-at-fpga/ompss-at-fpga-kernel-module
cd ompss-at-fpga-kernel-module
export CROSS_COMPILE=aarch64-linux-gnu-
export KDIR=/home/my_user/kernel-headers
export ARCH=arm64
make

1.3.3. XDMA

Example to cross-compile the library and install it in the /opt/bsc/arm64/ompss/libxdma folder:

git clone https://github.com/bsc-pm-ompss-at-fpga/xdma
cd xdma/src/zynq
export CROSS_COMPILE=aarch64-linux-gnu-
export KERNEL_MODULE_DIR=/path/to/ompss-at-fpga/kernel/module/src
make
make PREFIX=/opt/bsc/arm64/ompss/libxdma install

1.3.4. xTasks

Example to cross-compile the library and install it in the `/opt/bsc/arm64/ompss/libxtasks folder:

git clone https://github.com/bsc-pm-ompss-at-fpga/xtasks
cd xtasks/src/zynq
export CROSS_COMPILE=aarch64-linux-gnu-
export LIBXDMA_DIR=/opt/bsc/arm64/ompss/libxdma
make
make PREFIX=/opt/bsc/arm64/ompss/libxtasks install

1.3.5. Nanos++

Example to cross-compile the runtime library and install it in the /opt/bsc/arm64/ompss/nanox folder:

git clone https://github.com/bsc-pm-ompss-at-fpga/nanox
cd nanox
autoreconf -ifv
mkdir build-fpga-arm64
cd build-fpga-arm64
../configure --prefix=/opt/bsc/arm64/ompss/nanox --host=aarch64-linux-gnu host_alias=aarch64-linux-gnu --with-xtasks=/opt/bsc/arm64/ompss/libxtasks [--with-extrae=/opt/bsc/arm64/ompss/extrae]
make
make install

1.3.6. Nanos++ with cluster support

Example to cross-compile the runtime library, with cluster architecture enabled, and install it in the /opt/bsc/arm64/ompss/nanox folder. The example assumes that mpich and GASNet are already compiled and installed.

git clone https://github.com/bsc-pm-ompss-at-fpga/nanox
cd nanox
autoreconf -ifv
mkdir build-fpga-cluster-arm64
cd build-fpga-cluster-arm64
export PATH=$PATH:/opt/bsc/arm64/ompss/mpich/bin
../configure --prefix=/opt/bsc/arm64/ompss/nanox --host=aarch64-linux-gnu host_alias=aarch64-linux-gnu --with-xtasks=/opt/bsc/arm64/ompss/libxtasks --with-gasnet=/opt/bsc/arm64/ompss/gasnet --with-mpi=/opt/bsc/arm64/ompss/mpich LDFLAGS="-Wl,--allow-shlib-undefined" MPICC=mpicc MPICXX=mpicxx CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++
make
make install

1.3.7. Mercurium

Example to build a Mercurium cross-compiler that runs on the host and creates binaries for another platform (ARM64 in the example):

git clone https://github.com/bsc-pm-ompss-at-fpga/mcxx
cd mcxx
autoreconf -ifv
mkdir build-fpga
cd build-fpga
../configure --prefix=/opt/bsc/host-arm64/ompss/mcxx-arm64 --with-nanox=/opt/bsc/arm64/ompss/nanox --enable-ompss --enable-tl-openmp-nanox --target=aarch64-linux-gnu target_alias=aarch64-linux-gnu
make
make install