Table of Contents
Fetching ...

Improving Interoperability in Scientific Computing via MaRDI Open Interfaces

Dmitry I. Kabanov, Stephan Rave, Mario Ohlberger

TL;DR

MaRDI Open Interfaces tackles cross-language interoperability in scientific computing by introducing unified interfaces for common numerical tasks and a mediator library (liboif) that automates data marshalling, reducing language-implementation bindings from O$(L\times I)$ to O$(L+I)$. The architecture decouples user code from solvers using a Gateway–Converter–Dispatch–Bridge–Interface–Adapter stack, with a C-based intermediate representation and careful memory management to preserve performance. The IVP ODE interface and a set of data types (e.g., $\text{OIF extunderscore ARRAY extunderscore F64}$) enable seamless, low-copy data exchange and cross-language invoking of solvers such as SUNDIALS, SciPy, and OrdinaryDiffEq.jl, as demonstrated by Burgers' equation (C) and Van der Pol’s oscillator (Python). Quality control via CI, testing across languages, and thorough documentation support reproducibility, while performance analysis shows a modest overhead (generally <5%) that decreases with problem size. The project aims to generalize to additional problem types and languages, enabling benchmarking, rapid solver switching, and broader reuse in computational science.

Abstract

MaRDI Open Interfaces is a software project aimed at improving reuse and interoperability in Scientific Computing by alleviating the difficulties of crossing boundaries between different programming languages, in which numerical packages are usually implemented, and of switching between multiple implementations of the same mathematical problem. The software consists of a set of formal interface specifications for common Scientific Computing tasks, as well as a set of loosely coupled libraries that facilitate implementing these interfaces or adapting existing implementations for multiple programming languages and handle data marshalling automatically without sacrificing performance, enabling users to use different implementations without significant code efforts. The software has high reuse potential due to aim to solve general numerical problems.

Improving Interoperability in Scientific Computing via MaRDI Open Interfaces

TL;DR

MaRDI Open Interfaces tackles cross-language interoperability in scientific computing by introducing unified interfaces for common numerical tasks and a mediator library (liboif) that automates data marshalling, reducing language-implementation bindings from O to O. The architecture decouples user code from solvers using a Gateway–Converter–Dispatch–Bridge–Interface–Adapter stack, with a C-based intermediate representation and careful memory management to preserve performance. The IVP ODE interface and a set of data types (e.g., ) enable seamless, low-copy data exchange and cross-language invoking of solvers such as SUNDIALS, SciPy, and OrdinaryDiffEq.jl, as demonstrated by Burgers' equation (C) and Van der Pol’s oscillator (Python). Quality control via CI, testing across languages, and thorough documentation support reproducibility, while performance analysis shows a modest overhead (generally <5%) that decreases with problem size. The project aims to generalize to additional problem types and languages, enabling benchmarking, rapid solver switching, and broader reuse in computational science.

Abstract

MaRDI Open Interfaces is a software project aimed at improving reuse and interoperability in Scientific Computing by alleviating the difficulties of crossing boundaries between different programming languages, in which numerical packages are usually implemented, and of switching between multiple implementations of the same mathematical problem. The software consists of a set of formal interface specifications for common Scientific Computing tasks, as well as a set of loosely coupled libraries that facilitate implementing these interfaces or adapting existing implementations for multiple programming languages and handle data marshalling automatically without sacrificing performance, enabling users to use different implementations without significant code efforts. The software has high reuse potential due to aim to solve general numerical problems.

Paper Structure

This paper contains 18 sections, 6 equations, 6 figures, 2 tables.

Figures (6)

  • Figure 1: Schematic comparison of two approaches to the problem of multiple languages/multiple implementations. A Standard pairwise bindings B Bindings via Open Interfaces (OIF).
  • Figure 2: Data flow from user to implementation in MaRDI Open Interfaces.
  • Figure 3: UML sequence diagram for the initialization phase, in which user requests an implementation for an interface of interest. The abbreviation "impl" stands for "implementation".
  • Figure 4: UML sequence diagram showing the function invocations when the user does the actual computations. The diagram shows invocation of a hypothetical method compute with two arguments that are converted to a list oif_args and then unpacked by the Bridge component to native data types of the implementation.
  • Figure 5: UML sequence diagram showing the function invocations for the unloading phase when the user has finished using the implementation.
  • ...and 1 more figures