English

Automated Fortran--C++ Bindings for Large-Scale Scientific Applications

Software Engineering 2019-07-04 v2

Abstract

Although many active scientific codes use modern Fortran, most contemporary scientific software "libraries" are implemented in C and C++. Providing their numerical, algorithmic, or data management features to Fortran codes requires writing and maintaining substantial amounts of glue code. This article introduces a tool that automatically generates native Fortran 2003 interfaces to C and C++ libraries. The tool supports C++ features that have no direct Fortran analog, such as templated functions and exceptions. A set of simple examples demonstrate the utility and scope of the tool, and timing measurements with a mock numerical library illustrate the minimal performance impact of the generated wrapper code.

Keywords

Cite

@article{arxiv.1904.02546,
  title  = {Automated Fortran--C++ Bindings for Large-Scale Scientific Applications},
  author = {Seth R. Johnson and Andrey Prokopenko and Katherine J. Evans},
  journal= {arXiv preprint arXiv:1904.02546},
  year   = {2019}
}
R2 v1 2026-06-23T08:29:18.411Z