Dear Flang community
I’ve been following the development of Flang with bated breath since way before the upstreaming into LLVM happened, spurred initially by the desire / need to have a freely available Fortran compiler on windows for conda-forge, which is a cross-language packaging ecosystem (historical focus having been Python) that aims to serve all major platforms and architectures.
In particular, one of the key packages in python – SciPy – requires a Fortran compiler,
which has long been a source of problems (and the cause for my interest in Flang initially). This was exacerbated by recent changes in Python 3.12, which made it impossible to keep using the ducktape-and-string solution that had been in place before, and so we were in quite urgent need of an alternative – and indeed I had been trying to maneuver Flang into our infrastructure for almost a year already.
Though it turned out to be quite a non-trivial operation to get everything built & running with all components involved (not just our infra, but also the package itself and its build system), the final moment of this story was so unexpectedly positive that I was reminded of Tolkien’s term “eucatastrophe”.
After we had managed to get through all the build & installation woes, I was expecting the SciPy test suite to blow up with failures, hangs or crashes, and things… just passed 100% on the first time we got to the test suite…
There are some factors that help explain this (e.g. the Fortran code in SciPy is quite old, we don’t use OpenMP[1], etc.), but the main reason was just that Flang was already at a high enough quality to do so, and so I want to take the opportunity to thank you all for your work on Flang, which managed to get us out of quite a pickle – I hope you can forgive the terrible pun in the title.
If you’re curious about the rest of this story, I wrote it up in blog post. It tries to paint a big picture and it’s very possible that I made mistakes in summarizing so much history – if you spot something that you think is wrong, please let me know.
intentionally, it’s a long story ↩︎