Abstract-Regions of nested loops are a common feature of High Performance Computing (HPC) codes. In shared memory programming models, such as OpenMP, these structure are the most common source of parallelism. Parallelising these structures requires the programmers to make a static decision on how parallelism should be applied. However, depending on the parameters of the problem and the nature of the code, static decisions on which loop to parallelise may not be optimal, especially as they do not enable the exploitation of any runtime characteristics of the execution. Changes to the iterations of the loop which is chosen to be parallelised might limit the amount of processors that can be utilised. We have developed a system that allows a code to make a dynamic choice, at runtime, of what parallelism is applied to nested loops. The system works using a source to source compiler, which we have created, to perform transformations to user's code automatically, through a directive based approach (similar to OpenMP). This approach requires the programmer to specify how the loops of the region can be parallelised and our runtime library is then responsible for making the decisions dynamically during the execution of the code. Our method for providing dynamic decisions on which loop to parallelise significantly outperforms the standard methods for achieving this through OpenMP (using if clauses) and further optimisations were possible with our system when addressing simulations where the number of iterations of the loops change during the runtime of the program or loops are not perfectly nested.
In REF , the authors propose a system that allows a code to make a dynamic choice, at runtime, of what parallelism is applied to nested loops.
Dynamic Loop Parallelisation
ArXiv
ArXiv
Computer Science