A Layered Mapping of Ada 202X to OpenMP
The OpenMP specification defines a set of compiler directives, library routines, and environment variables that together represent the OpenMP Application Programming Interface, and is currently defined for C, C++, and Fortran. The forthcoming version of Ada, currently dubbed Ada 202X, includes lightweight parallelism features, in particular parallel blocks and parallel loops. All versions of Ada, since its inception in 1983, have included “tasking,” which corresponds to what are traditionally considered “heavyweight” parallelism features, or simply “concurrency” features. Ada “tasks” typically map to what are called “kernel threads,” in that the operating system manages them and schedules them. However, one of the goals of lightweight parallelism is to reduce overhead by doing more of the management outside the kernel of the operating system, using a light-weight-thread (LWT) scheduler. The OpenMP library routines support both levels of threading, but for Ada 202X, the main interest is in making use of OpenMP for its lightweight thread scheduling capabilities.
Given the above, for Ada 202X we are recommending a layered mapping to OpenMP (or other LWT scheduler), where upon seeing the syntax for a parallel construct, the compiler generates calls on a top layer which is independent of the particular LWT scheduler that will be controlling the light-weight threads. Below this layer would be an LWT-scheduler-independent API, which implements the API using a “plug-in” architecture. Specific LWT schedulers could be “plugged in” to this API implementation, and handle the various calls through the API. In the absence of any plugin, the API implementation would fall back to a purely sequential implementation.
This talk will present this layered approach,which should allow Ada 202X users to take advantage of the OpenMP features of interest, and to accommodate evolution of the OpenMP standard as well as the ability to use other LWT schedulers which might come from, say, an RTOS vendor. We believe this layered approach might be a model for other languages that want to provide a binding to OpenMP capabilities, while not requiring heavy use of compiler directives as is done in current mappings to C and Fortran, which can hurt readability and do not tend to be as composable as syntax.
Monday HILT zoom room – Monday HILT YouTube – HILT Clowdr Break Room
- Harvard College 1971-1975, AB Summa Cum Laude Chemistry
- Harvard Radcliffe Student Computing Center 1975-1979, Systems Programmer
- Intermetrics/AverStar/AverCom 1980-2002, Chief Scientist
- SofCheck 2002-2011, Founder and CTO
- AdaCore 2011-present, VP, Director of Language Research, Model-Based Toolset Product Architect