Extending the C++ Asynchronous Programming Model with the HPX Runtime System for Distributed Memory Computing

Language
en
Document Type
Doctoral Thesis
Issue Date
2019-05-27
Issue Year
2019
Authors
Heller, Thomas
Editor
Abstract

This thesis presents a fully Asynchronous Many Task (AMT) runtime system extending the C++ programming language. Defining the distributed, asynchronous C++ Programming Model based on the C++ programming language is in focus. Besides, presenting performance portable Application Programming Interfaces (APIs) for shared and distributed memory computing as well as accelerators.

With the rise of multi and many-core architectures, the C++ Language got amended with support for concurrency and parallelism. This work derives the methodology for massive parallelism from this industry standard and extending it with fine-grained user-level threads as well as distributed computing allowing large-scale Supercomputers to employ the same syntax and semantics for remote and local operations. By leveraging the nature of asynchronous task-based message passing using a one-sided Remote Procedure Call (RPC) mechanism, the overarching principle of work follows data manifests.

By leveraging the asynchronous, task-based nature of the future as a handle for asynchronously computed results, the term Futurization is coined, presenting a technique based on Continuation Passing Style (CPS) programming. This technique allows dealing with millions of concurrently running asynchronous tasks. By attaching continuations, dynamic dependency graphs are formed naturally from the regular control flow of the code. The effect is to parallelize through the runtime system by executing multiple continuations in parallel. In other words, the future based synchronization is expressing fine-grained constraints. Furthermore, Futurization blends in naturally with other well-known Techniques, such as data parallelism. Those other paradigms can be built using Futurization.

The technique as mentioned earlier provides the necessary foundation to address the needs for modern scientific applications targeting High Performance Computing (HPC) platforms. However, addressing the challenge of handling more and more complicated architectures, like different memory access latencies and accelerators is essential. This thesis attempts to solve this challenge by providing necessary means to define computational and memory targets by reusing already defined, or upcoming, concepts for C++. Consequently, providing means to link them together to intensify the principle of work follows data.

The feasibility of this approach will be demonstrated with a set of low-level micro- benchmarks to show that the provided abstractions come with minimal overhead. Providing a 2D Stencil example that attests the programmability of Futurization, as well as the performance benefits, serves as the second benchmark. Lastly, showing the results of futurizing the astrophysics application OctoTiger, a 3D octree Adaptive Mesh Refinement (AMR) based binary star simulation, running at extreme scales concludes the experimental section.

Abstract

Diese Arbeit stellt ein vollständig “Asynchronous Many Task (AMT)“ Laufzeitsystem vor. Der Fokus liegt dabei auf der Definition der benötigten Konzepte auf der Basis der C++ Programmiersprache. Darüberhinaus werden portable APIs für das Rechnen auf verteilten System und Beschleuniger-Hardware eingeführt.

Mit dem Aufkommen von Multi- und Many-Core-Architekturen wurde die C++ Programmiersprache mit Unterstützung für Nebenläufigkeit und Parallelität erweitert. Diese Arbeit leitet die Methodik für massive Parallelität von diesem Industriestandard ab und ergänzt es mit fein granularen User- Level-Threads sowie verteiltem Rechnen. Dies ermöglicht das Benutzen großer Supercomputer mit derselben Syntax und Semantik für entfernte und lokale Operationen. Durch Verwendung des asynchronen task-basierten Nachrichtenaustausches durch einseitige Remote Procedure Call (RPC), ergibt sich das all umfassende Prinzip des ”work follows data”, d.h. die Arbeit wird dort ausgeführt, wo die Daten liegen.

Der Begriff Futurization wird als Basis der “Continuation Passing Style (CPS)“ Programmierung geprägt. Dies erreicht man anhand der future basierten Handle zum Ausdruck von asynchronen, Task-basierten Ergebnissen. Diese Technik erlaubt es, Millionen von nebenläufigen, asynchronen Tasks handzuhaben. Durch Einhängen von Continuations werden dynamische Abhängigkeitsgraphen erzeugt, die als Nebenprodukt des regulären Kontrollflusses, leicht zu bestimmen sind. Dies hat den Effekt, dass mehrere dieser Continuations parallel durch das Laufzeitsystem abgearbeitet werden können. Durch diese future basierte Synchronisierung ist man in der Lage, fein granulare Bedingungen für die korrekte Ausführung zu bestimmen. Darüber hinaus, ermöglicht Futurization die Implementierung anderer Programmierparadigmen wie Data Parallelismus.

Diese Technik bietet die notwendige Grundlage, um den Bedarf an modernen wissenschaftlichen Anwendungen für High Performance Computing (HPC) Plattformen gerecht zu werden. Allerdings werden die Herausforderungen, um immer kompliziertere Architekturen effizient zu programmieren, immer schwieriger. Darunter fallen unterschiedliche Speicherzugriffslatenzen und Hardware-Beschleunigern. Diese Arbeit verfolgt das Ziel diese Aufgabe zu lösen, indem sie die notwendigen Mittel durch die Wiederverwendung bereits definierter oder zukünftiger Konzepte aus dem C++ Standard bereitstellt.

Die Ergebnisse dieses Ansatzes werden anhand der Evaluation mehrerer Benchmarks dargestellt. Zuerst wird eine Messung mit diversen Micro-Benchmarks durchgeführt, um zu zeigen, dass der Overhead der bereitgestellten Abstraktionen minimal ist. Sowohl die Programmierbarkeit als auch die Leistungsfähigkeit wird anhand einer 2D Stencil Anwendung demonstriert. Die Arbeit wird abgeschlossen durch die Anwendung OctoTiger, eine 3D octree basierte “Adaptive Mesh Refinement (AMR)“ Astro Physik Simulation. Diese wird anhand von Futurization auf einen der größten aktuellen Supercomputer portiert.

DOI
Faculties & Collections
Zugehörige ORCIDs