Modular and Extensible Software Architecture for Particle Dynamics

Language
en
Document Type
Doctoral Thesis
Issue Date
2021-12-27
Issue Year
2021
Authors
Eibl, Sebastian
Editor
Abstract

Developing a modern simulation framework is a complex multi-objective task. Multiple hardware architectures and software installations must be supported. In the current era of multi-core and multi-node systems, parallelization plays an important role in using compute resources efficiently. To support fast development and efficient production runs, highly optimized code alongside rapid prototyping capabilities must be provided. Physical models and numerical algorithms are essential to cover a wide range of applications. And lastly, the framework must be easy to use to allow a broad user base to work with it.

This collection of objectives demonstrates the most significant problem when designing a software framework. No single person can cover all these tasks equally well. Specialists from multiple domains need to cooperate. The diversity of experts and topics must be taken into account already in the design stage.

This thesis introduces the underlying design concepts of the MESA-PD (Modular and Extensible Software Architecture for Particle Dynamics) simulation framework and evaluates its performance and flexibility. MESA-PD supports molecular dynamics and the discrete element method (DEM). Great care is taken to provide a productive foundation to tackle the challenges mentioned above. By strictly separating different parts of the framework, they can be developed independently without knowing the other parts. At the same time, MESA-PD supports different levels of abstraction. This allows for rapid prototyping as well as fine-tuned code. The flexibility is achieved by using code generation techniques and clearly defined interfaces. MESA-PD realizes code generation via the Jinja template engine. Examples demonstrate the adaptability of the MESA-PD design to various simulation demands.

Following the general design, the performance of single-node and multi-node simulations is evaluated in detail on two state-of-the-art supercomputers - SuperMUC-NG at the Leibniz Supercomputing Centre in Munich and JUWELS at the Jülich Supercomputing Centre in Jülich. Extreme-scale simulations with over 10^5 cores and more than 10^11 particles show high performance and scalability.

For parallel simulations, load balancing strategies are a crucial topic. An uneven load distribution severely hurts the overall performance. Since particle simulations can be highly dynamic, starting with a balanced simulation is not enough. The workload must be reevaluated and rebalanced at runtime. The final part of this thesis explains the runtime load balancing strategy implemented in MESA-PD. It is based on a forest of octrees and features domain repartitioning and redistribution. A benchmark case reveals the potential performance improvement in a controlled environment. Load balancing applied to a hopper discharge simulation shows a runtime decrease of 84%, thus proving its importance for real-world applications.

Abstract

Die Entwicklung eines modernen Simulationsframeworks ist ein komplexes Unterfangen, bei dem es viele Ziele zu berücksichtigen gilt. Verschiedene Rechnerarchitekturen und Softwareinstallationen müssen unterstützt werden. Von besonderer Bedeutung für heutige Mehrkern-Systeme ist die Parallelisierung. Nur damit kann eine effiziente Ausführung gewährleistet werden. Physikalische Modelle und effiziente Algorithmen sind essentiell, um ein breites Spektrum an Simulationen zu ermöglichen. Außerdem muss es mit dem Framework möglich sein sowohl rapid prototyping zu betreiben als auch hoch optimierten Code zu entwickeln. Bei all dem, darf man nicht aus den Augen verlieren, dass das Framework für eine breite Nutzerbasis zugänglich bleibt.

Die Vielfalt an Zielen zeigt deutlich eines der größten Probleme beim Design eines Frameworks. Eine einzige Person kann nicht alle Aufgaben gleich gut erfüllen. Spezialisten aus verschiedenen Fachgebieten müssen zusammenarbeiten. Diese Diversität muss bereits beim Design berücksichtigt werden.

Diese Arbeit stellt die zugrundeliegenden Konzepte von MESA-PD (Modular and Extensible Software Architecture for Particle Dynamics) vor und bewertet die Performance und Flexibilität. MESA-PD unterstützt Molekulardynamik und die diskrete Elemente Methode. Es wird großer Wert darauf gelegt eine produktive Grundlage zum Erreichen der oben genannten Ziele zu schaffen. Dies wird durch eine strikte Trennung der verschiedenen Teile des Frameworks ermöglicht, sodass einzelne Teile entwickelt werden können ohne das gesamte Framework zu kennen. Gleichzeitig stellt MESA-PD verschiedene Abstraktionslevel für jeden Teil zur Verfügung. Dies ermöglicht schnelles Ausprobieren genauso wie sorgfältiges Optimieren des Codes. Diese Flexibilität wird durch automatische Codeerzeugung und klar definierte Schnittstellen erreicht. Die Codeerzeugung wird mittels der Jinja template engine realisiert. Beispiele verdeutlichen die Anpassbarkeit von MESA-PD an verschiedene Simulationen.

Anschließend an die grundlegenden Designentscheidungen, wird die single-node und multi-node Performance auf zwei aktuellen Supercomputern - SuperMUC-NG am Leibniz Supercomputing Centre in München und JUWELS am Jülich Supercomputing Centre in Jülich - im Detail ausgewertet. Simulationen mit über 10^5 CPU Kernen und mehr als 10^11 Partikeln zeigen eine hohe Performance und Skalierbarkeit.

Für parallelen Simulationen spielen Lastbalanzierungsstrategien eine wichtige Rolle. Eine ungleiche Lastverteilung verlangsamt die Simulation deutlich. Da Partikelsimulationen einen hohen Grad an Dynamik aufweisen, reicht es nicht mit einer ausbalanzierten Simulation zu starten. Die Arbeitslast muss zur Laufzeit neu bestimmt und umverteilt werden. Der abschließende Teil dieser Arbeit beschreibt die Lastbalanzierung, wie sie in MESA-PD implementiert wurde. Sie basiert auf einem forest of octrees und unterstützt die Neueinteilung und anschließenden Neuverteilung des Simulationsgebietes. Mit Hilfe eines Benchmarkszenarios wird die mögliche Leistungssteigerung in einer kontrollierten Umgebung abgeschätzt. Die Relevanz von Lastbalanzierung in physikalisch relevanten Simulationen wird anhand einer Siloentleerung gezeigt. Durch Lastbalanzierung zur Laufzeit konnte die Simulationszeit um 84% verringert werden.

DOI
Faculties & Collections
Zugehörige ORCIDs