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, by the way, the second generation of the OmpSs programming 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).
The reference implementation of OmpSs-2 is based on the Mercurium source-to-source compiler and the Nanos6 Runtime Library:
- The Mercurium source-to-source compiler provides the necessary support for transforming the high-level directives into a parallelized version of the application.
- The Nanos6 runtime library provides the services to manage all the parallelism in the user-application, including task creation, synchronization and data movement, and provide support for resource heterogeneity.