A lot of people are writing code with LLMs however I don’t know if there’s any good benchmark out there for Fortran specifically. I wonder if we could hive-mind a benchmark that we can test with models - open source, private labs (OpenAI, Anthropic, etc.) so that newcomers to the language can see what models are there and which ones work the best.
My main interest is GPU programming with Fortran using OpenMP/OpenACC for data movement so I can put some examples down for this. But there are so many other areas that can be of interest (even also coArrays, etc.)
I propose a git repo where we start putting down tests/benchmarks for sample problems, expected behavior. Then based on “bad” behavior we can create community linters (maybe fortitude?) and skill files.
Yes, I think we should have a Fortran coding benchmark, as well as a dataset curated for finetuning or training of coding LLMs for Fortran code development.
I did a web search and i found some early efforts in these areas:
Existing Benchmarks:
fortbench (also discussed in another thread here): A reproducible, SWE-bench-style benchmark that tests whether LLM agents can fix 20 real issues from public Fortran projects using deterministic build/test verification. [1]
HeCBench-Fortran-OMP: Specifically targets OpenMP GPU offloading benchmarks, which aligns closely with your interest in OpenMP/OpenACC data movement.
Datasets for Fine-Tuning (Fortran Output):
HPC & OpenMP: There is a large OpenMP-Annotated Code Dataset (~77k HPC source files mapping loop contexts to OpenMP directives), as well as paired C++/Fortran datasets like CodeRosetta and HPC-Fortran-Cpp. [1, 2, 3]
General Fortran Generation:FortranCodeGen-3B-SynthData (~600 unit-tested MBPP-style tasks in Fortran) and taeukkang/fortran-llm provide prompt-to-Fortran instruction pairs, alongside raw filtered corpora like the Fortran split of The Stack v2 / StarCoderData.