
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.

Figure 6
Example solutions obtained using MaRDI Open Interfaces: A Solution of the problem (2) using scipy_ode implementation with integrator dopri5 (Dormand–Prince 5(4) method). B Solution of the problem (3) using jl_diffeq implementation with integrator Rosenbrock23.
Table 1
Runtimes, in seconds, of evaluating RHS implementations for system (2) 10000 times at resolution .
| IMPLEMENTATION LANGUAGE | RUNTIME, SECONDS |
|---|---|
| C | 0.115 ± 0.008 |
| Julia | 0.122 ± 0.016 |
| Python (Numba) | 0.116 ± 0.001 |
Table 2
Run times, in seconds, of time integration of system (2) using different user languages: C, Julia, or Python, with “Julia (C)” meaning that RHS implementation is in C), different ways of invoking implementations: via Open Interfaces (OIF) or directly (RAW), and three different implementations (DOPRI5-C—C translation of the original Fortran code [11], DP5 from Julia’s OrdinaryDiffEq.jl package, DOPRI5—Python wrapper over the original Fortran code [11] from SciPy).
| # | USER LANGUAGE | OIF/RAW | IMPLEMENTATION | N | ||
|---|---|---|---|---|---|---|
| 1600 | 6400 | 25 600 | ||||
| 1 | C | OIF | DOPRI5-C | 0.068 ± 0.001 | 1.011 ± 0.017 | 21.006 ± 0.100 |
| C | RAW | DOPRI5-C | 0.069 ± 0.001 | 0.951 ± 0.012 | 20.699 ± 0.121 | |
| 2 | C | OIF | DP5 | 0.082 ± 0.000 | 0.847 ± 0.003 | 20.700 ± 0.049 |
| Julia (C) | RAW | DP5 | 0.056 ± 0.002 | 0.820 ± 0.008 | 20.364 ± 0.073 | |
| Julia | RAW | DP5 | 0.067 ± 0.009 | 0.868 ± 0.004 | 21.058 ± 0.067 | |
| 3 | Python | RAW | DOPRI5 | 0.113 ± 0.000 | 1.573 ± 0.010 | 30.829 ± 0.121 |
| Python | OIF | DOPRI5 | 0.122 ± 0.009 | 1.575 ± 0.005 | 30.944 ± 0.122 | |
| Python | OIF | DP5 | 0.196 ± 0.003 | 1.466 ± 0.005 | 28.147 ± 0.040 | |
