Mar 5 – 7, 2024
Julius-Maximilians-Universität Würzburg
Europe/Berlin timezone

Controlling parallel simulations in Julia from C/C++/Fortran programs with libtrixi

Mar 6, 2024, 11:30 AM
20m
HS3

HS3

Talk (15min + 5min) Research Software in C/C++ Cross-Platform Development with C/C++

Speaker

Michael Schlottke-Lakemper (RWTH Aachen University)

Description

The Julia programming language aims to provide a modern approach to scientific high-performance computing by combining a high-level, accessible syntax with the runtime efficiency of traditional compiled languages. Due to its native ability to call C and Fortran functions, Julia often acts as a glue code in multi-language projects, enabling the reuse of existing libraries implemented in C/Fortran. With the software library libtrixi, we reverse this workflow: It allows one to control Trixi.jl, a complex Julia package for parallel, adaptive numerical simulations, from a main program written in C/C++/Fortran. In this talk, we will present the overall design of libtrixi, show some of the challenges we had to overcome, and discuss continuing limitations. Furthermore, we will provide some insights into the Julia C API and into the PackageCompiler.jl project for static compilation of Julia code. Besides the implications for our specific use case, these experiences can serve as a foundation for other projects that aim to integrate Julia-based libraries into existing code environments, opening up new avenues for sustainable software workflows.

Primary author

Michael Schlottke-Lakemper (RWTH Aachen University)

Co-author

Benedict Geihe (University of Cologne)

Presentation materials