Programming Models @ BSC

Boosting parallel computing research since 1989

Tutorial at HiPEAC2019: Heterogeneous Parallel Programming with OmpSs

- Written by Xavier Martorell

  • Place: Valencia, SPAIN
  • Event date: January 23rd, 2019 (associated to HiPEAC Conference 2019)
  • Speakers: Xavier Martorell and Xavier Teruel


OmpSs is a task-based programming model developed at BSC that we use as a forerunner for OpenMP. Like OpenMP, it is based on compiler directives. It is the base platform where we have developed OpenMP tasking, support for dependences, priorities, task reductions, support for heterogeneous devices, and our last addition is the support for application acceleration on FPGAs.

In this tutorial we are going to learn how to program using OmpSs, and its heterogeneous architectures support. We will introduce the OmpSs basic concepts related to task-based parallelism for the SMP cores and then quickly move to the support for heterogeneous devices. OmpSs supports offloading tasks to a variety of accelerators, including CUDA and OpenCL GPUs, and also FPGAs using High-Level Synthesis (HLS) from vendors. OmpSs facilitates programming because it leverages existing OpenCL and CUDA kernels without the burden to have to deal with data copies to/from the devices. Data copies are just triggered automatically by the OmpSs runtime, based on the task data dependence annotations. On the FPGAs environment with HLS, plain C/C++ applications can offload kernels to the FPGA.

OmpSs for FPGA devices is the result of our work at the AXIOM, EuroEXA and Legato European Projects. We will also show how the same directives are being used to outline code that can be compiled, run on FPGA devices, and analyzed with the BSC analysis tool Paraver thanks to the internal FPGA tracing facilities.

The tutorial will include two laboratory sessions. We will provide student accounts to attendees in our Minotauro machine (Intel-based with NVidia GPUs), and several exercises will be provided to be completed online (cholesky, matrix multiplication, nbody, 3d-stencil, merge-sort, histogram…), and learn better the details of the OmpSs support for both the SMP and heterogeneous architectures.


  • 08.30h – Introduction to the OmpSs Programming Model. Basic directives and support for heterogeneous systems
  • 10:00h – — Coffee Break —
  • 10:30h – Hands-on - OmpSs with CUDA and OpenCL support
  • 12:00h – — Lunch —
  • 13:30h – OmpSs with support for FPGA devices
  • 15:00h – — Coffee Break —
  • 15:30h – Hands-on - OmpSs @FPGA
  • 17:00h – End of the tutorial