AllScale Compiler

Application codes utilizing the AllScale API can be compiled using any C++14 compliant compiler for development and debugging. However, for deployment on large-scale systems use of the AllScale compiler is required. Based on the Insieme source-to-source compiler, it provides extensions and addons that support AllScale-specific constructs and semantics, and converts them into structures compatible with the AllScale runtime system.

 

AllScale Frontend Extension

The AllScale extension of the compiler frontend is responsible for converting input code depending on the AllScale API into a high-level explicit parallel intermediate representation (IR). This extension consists of 3 components:

  • The Type Mapper maps API-specific C++ types of the input program to IR constructs that embody their respective AllScale semantics

  • The Expression Mapper maps API-specific C++ expressions to IR constructs that reflect their AllScale semantics

  • The Data Item Semantics component converts the instantiation, access and deletion of data items to IR constructs that are understood by the core and analysis pipeline.

AllScale Pipeline

Employing the powers of Insieme’s Haskell-based Analysis Framework and the data item semantics generated by the frontend, the Data Requirement Analysis module of the AllScale compiler determines the data requirements of parallel tasks (work items) in the IR. These requirements describe data to be transferred - along with a work item - to a different address space on a distributed memory system.

Before this most important and complex analysis step, the core pipeline performs several AllScale-specific transformations and optimizations:

  • Lambda Lowering and Global Constant Propagation, which allow a larger variety of inputs to be treated as-is by the compiler.

  • Data Item Conversion, generating the local access operations required for data items – the implied requirements of which are later determined by the analysis framework.

  • Access Optimization, eliminating redundant access requests and hoisting them out of loops wherever possible.

  • Automatic Serialization Code Generation which analyses user-defined types, and, where possible, automatically generates serialization code for them. This allows application developers to use most data types as-is in the AllScale distributed memory environment without requiring explicit serialization code

AllScale Backend Addon

The AllScale backend addon synthesizes C++ code from the previously generated intermediate representation, adhering to the API and semantics of the AllScale runtime system. This includes C++ representations of the requirements functions derived by the analysis module to dynamically compute data requirements of work items in the runtime system. It comprises the following components:

  • The Preprocessing step converts IR constructs representing parallel recursive tasks into work items of the AllScale runtime system, as well as control code for proper runtime startup and shutdown.

  • The Runtime Work Item Conversion is responsible for converting IR operators that model parallel control flow semantics such as the spawning of or waiting for tasks into the corresponding constructs supported by the AllScale runtime.

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 671603

Contact Details

General Coordinator

Thomas Fahringer

Scientific Coordinator

Herbert Jordan