Grammatical evolution+ multi-cores= automatic parallel programming!

Abstract

Multi-core processors are shared memory multiprocessors integrated on a single chip which offer significantly higher processing power than traditional, single core processors. However, as the number of cores available on a single processor increases, efficiently programming them becomes increasingly more complex, often to the point where the limiting factor in speeding up tasks is the software. This thesis presents Grammatical Automatic Parallel Programming (GAPP) which uses Grammatical Evolution to automatically generate natively parallel code on multi-core processors by directly embedding GAPP OpenMP parallelization directives in problem-specific Context Free Grammars. As a result, it obviates the need for programmers to think in a parallel manner while still letting them produce parallel code. We first perform a thorough analysis on the computational complexity of Grammatical Evolution using standard benchmark problems. This analysis results in an interesting experiment which produces a system capable of predicting on-the-fly the likelihood of a particular GE run being successful. A number of difficult proof of concept problems are examined in evaluating GAPP. The performance of the system on these informs the further optimization of both the design of grammars and fitness function to extract further parallelism. We demonstrate a surprising side effect of uncontrolled parallelism, which leads to the under-utilisation of the cores. This is addressed through the automatic generation of programs with controlled degree of parallelism. In this case, the automatically generated programs adapt to the number of cores on which they are scheduled to execute. Finally, GAPP is applied to Automatic Lockless Programming, an enormously difficult design problem, resulting in parallel code guaranteed to avoid locks on shared resources, thereby further optimizing the execution time. We then draw conclusions and make future recommendations on the use of evolutionary systems in the generation of highly constrained parallel code.