Fortran bindings for the Enzyme automatic differentiation tool¶
Enzyme is an automatic differentiation tool that operates on LLVM. It can be used to compute derivatives in a wide variety of programming languages, by exposing the automatic differentiation functionality in the LLVM IR that these languages compile to.
Differentiable modelling is currently a hot topic in the weather and climate modelling domain but developers have not been able to benefit from such technology because most weather and climate models are written in Fortran, while popular differentiable programming frameworks such as JAX are written in Python. I proposed and am PI of a project which aims to add Fortran bindings to Enzyme, so that Fortran programmers can use Enzyme to compute derivatives of their Fortran code. My claim is that model developers are likely to be more open to switching to an LLVM-based Fortran compiler than to rewrite their model in a differentiable framework.
Funding information¶
The work is done as part of my role as an RSE at the Institute of Computing for Climate Science (ICCS).