Programming Models @ BSC

Boosting parallel computing research since 1989

OmpSs-2


OmpSs-2 logo

OmpSs-2 is a programming model composed of a set of directives and library routines that can be used in conjunction with a high-level programming language in order to develop concurrent applications. It is the second generation of the OmpSs prorgamming model. The name originally comes from two other programming models: OpenMP and StarSs. The design principles of these two programming models constitute the fundamental ideas used to conceive the OmpSs philosophy.

OmpSs takes from OpenMP its viewpoint of providing a way to produce a parallel version of the application annotating in the source code. These annotations do not have an explicit effect in the semantics of the program; instead, they allow the compiler to produce a parallel version of it.

StarSs differs from OpenMP in some important areas: it uses a different execution model, thread-pool where OpenMP implements fork-join parallelism; it also includes features to target heterogeneous architectures through leveraging native kernels implementation (while OpenMP targets accelerator support through direct compiler code generation); and finally, StarSs offers asynchronous parallelism as the main mechanism of expressing concurrency whereas OpenMP only started to implement it since its version 3.0 and synchronization by means of task dependences enabling the look-ahead instantiation of task whereas OpenMP included it since its version 4.0.

A task is the minimum execution entity that can be managed independently by the runtime scheduler (although a single task may be executed at different phases according to its task scheduling points). Tasks in OmpSs-2 can be created by any task generating code. Dependences let the user annotate the data flow of the program, this way at runtime this information can be used to determine if the parallel execution of two tasks may cause data races. In other words, dependence is the relationship existing between predecessor tasks (must execute before) and one of its successor tasks (must execute after).

Currently, there are two reference implementations of OmpSs-2. One of the implementations is based on the nOS-V and NODES runtimes and the LLVM/Clang compiler. The other is based on the Nanos6 runtime and the LLVM/Clang compiler.

  • The Nanos6 runtime library provides the services to manage all the parallelism in user applications, including task creation, synchronization, and data movement, and provides support for resource heterogeneity. Although it is still maintained, all development has stopped, and we recommend using nOS-V and NODES.
  • nOS-V is a threading and tasking runtime that supports co-execution and can be leveraged by higher-level programming models.
  • NODES is a runtime library designed to work on top of the nOS-V runtime while providing most of the functionalities of its predecessor, Nanos6. It acts as a dependency system for nOS-V by synchronizing the data flow of OmpSs-2 codes.
  • The LLVM/Clang compiler is an LLVM-based compiler that provides the necessary support for transforming high-level directives into a parallelized version of the application.

These runtimes libraries, compilers, and other OmpSs-2 related software can be found in our OmpSs-2 Releases GitHub.