I’m the author of PRIK. I have recently wrapped two large Fortran projects with PRIK.
PRIMA (Zaikun Zhang’s modern Fortran implementation of Powell’s derivative-free solvers). All five solvers (COBYLA, UOBYQA, NEWUOA, BOBYQA, LINCOA) are generated directly from the Fortran sources.The tests check each solver against a known minimum and compare COBYLA with SciPy’s.
Guide: PRIMA Wrapper - PRIK — Bring Native Code to Python
Open MPI. PRIK generates a Python extension from Open MPI’s Fortran mpi_f08 sources. With an edited .pyi contract and a short Python module on top, an mpi4py-style program (send/recv, broadcast, reduce, allreduce) runs unchanged apart from its import and produces the same output. In our measurements, small Allreduce calls were on average about 16 % faster than mpi4py (28 % when calling the generated API directly). It covers one datatype for now.
Tutorial: Wrap Open MPI mpi_f08 - PRIK — Bring Native Code to Python
Besides the two I just described (PRIMA and Open MPI), PRIK already has maintained, numerically validated wrappers for:
Fortran: BLAS, LAPACK, FFTPACK, MINPACK, BSPLINE-FORTRAN, PRIMA, and Open MPI mpi_f08
C: libm and TA-Lib
Do you have any suggestions for other important Fortran libraries that would be worth wrapping for Python?
I have used ChatGPT to translate 566 R packages to Fortran packages. Eventually I want to have Python, Octave/Matlab, and R interfaces for all the translations. You could try PRIK on them. I use Windows on which PRIK does not yet run.
ChatGPT says the 50 most popular of the translated packages, based on downloads of the originals, are as follows. You could start with them, although the first 3 are specific to R programming (part of the tidyverse), so providing Python interfaces to Fortran translations of them may not be useful.
quadpack would be a great one, adaptive quadrature is something people reach for constantly and the fortran implementation is still the gold standard. odepack too, lsoda especially, having a solid stiff/non-stiff solver via python would get a lot of use. arpack for large sparse eigenvalue problems would round it out nicely.