By Xavier Martorell, Associate Professor at UPC and Parallel Programming Models Group Manager at BSC
The OpenMP Architectural Review Board has approved the task multidependences extension proposed by BSC to enter the “OpenMP Technical Report 6: Version 5.0 Preview 2” (TR6) . This document is the second preview version of the upcoming OpenMP Application Programming Interface, version 5.0.
Task multidependences come to solve the issue that some application programmers face when their programs exhibit tasks with a variable number of data dependences. This happens, for instance, on applications targeting multi-physics problems, used to simulate complex engineering problems. Problems are discretized, and parallel tasks with dependences are used to exploit parallelism out of the decomposed space. But depending on the structure of the discretization, tasks may have a different number of data dependences. In this case, the standard way of expressing task dependences as a list of symbols provided to the compiler is not useful anymore. We have leveraged another feature being introduced in the TR6: iterators. Iterators allow the expression of dynamic numerical ranges in directives. These ranges are used to specify a variable number of task dependences for those situations in which a task has them.
In the context of the Mont-Blanc 3 project, we have annotated and evaluated BSC’s Alya . In this application, there is a phase named matrix assembly that is suitable for the use of the task multidependences approach. Formerly, this phase has been parallelized with two different approaches: i) a parallel loop with atomic data updates, and ii) several parallel loops and a coloring technique to break the data dependences. Figure 1 shows the way these two techniques work on the data discretization, along with the multidependences approach. See also more information on the evaluation of this matrix assembly phase of Alya in MB3 Deliverable 6.5 .
Figure 1: Comparison of parallelization approaches with task multidependences
 OpenMP ARB, OpenMP Technical Report 6: Version 5.0 Preview 2, November 2017. Online version: http://www.openmp.org/wp-content/uploads/openmp-TR6.pdf
 Mont-Blanc 3 project: D6.5 – Initial report on automatic region of interest extraction and porting to OpenMP4.0-OmpSs”, version 1.0, September 2017. Online version: https://montblanc-project.eu/wp-content/uploads/2017/12/MB3_D6.5-Initial-report-on-automatic-region-of-interest-extraction-and-porting-to-OpenMP4.0-OmpSs-1.pdf