San Diego Supercomputer Center engineers port NMAP-RKPM, a ~60,000-line Fortran MPI physics engine, to OpenMP-parallel C++ with structured Copilot and Codex agents; the 10-15K-line core loop took one person under two weeks
NMAP-RKPM is a roughly 60,000-line, single-threaded Fortran MPI solid-mechanics engine based on the Reproducing Kernel Particle Method. Two SDSC engineers first spent 2-3 months making subroutines thread-safe for OpenMP, using Claude Opus 4.5 through the GitHub Copilot extension in VS Code to find globals, rewrite subroutine signatures and update call sites, while humans owned architecture and testing. They then translated the code to C++ file by file, leaf nodes upward, with the OpenAI Codex extension and an AGENTS.md context file of translation rules, custom mdwraps.hpp array wrappers, example commits, and a rule that no translation was complete until the code built and passed validation. One-shot translation and older tools (F2C, FABLE) were rejected. For the tangled upper-level routines they used a 'Senior Engineer' model (GPT-5.5, high reasoning) to write a markdown plan and a 'Junior Engineer' (GPT-5.5, medium/low) to execute it block by block, plus a hybrid global-state design. The core parallel loop (about 10,000-15,000 lines) was translated by one person in under two weeks, and the upper levels took another month and a half.
The numbers (as reported)
| Codebase | Roughly 60,000 lines of Fortran |
|---|---|
| Core loop translation | ~10,000-15,000 lines in less than two weeks by a single person |
| Upper-level routines | An additional month and a half (same person) |
| OpenMP thread-safety refactor | 2-3 months with AI agents |
Facts
- Company / subject
- San Diego Supercomputer Center, UC San Diego (NMAP-RKPM)
- Tools
- GitHub Copilot, OpenAI Codex
- Models
- Claude Opus 4.5, GPT-5.3-Codex, GPT-5.4, GPT-5.5
- Codebase
- brownfield
- Work type
- Language port
- Stack
- Fortran, C++, OpenMP, MPI
- Published
- 2026-06-07
- Last checked
- 2026-11-20
What the source claims Practitioner (own blog/paper)
Claimed by the builder, writing about their own work. Not checked independently.
- Core parallel loop (~10,000-15,000 lines) translated by one person in under two weeks less than two weeks, single person
“executed in less than two weeks by a single person”
- Overall time was a fraction of a manual rewrite
“the overall time investment was a fraction of what a manual rewrite would have demanded”
- Similar productivity gain during the OpenMP enablement
“We experienced a similar productivity gain during the OpenMP-enablement.”
Caveats
Written by the two SDSC engineers who did the work (USRSE'26 conference paper, arXiv preprint). The whole conversion took 'a few months'; the authors say it was a fraction of a manual rewrite but give no manual estimate. LLM tools on their own and one-shot translation 'proved inadequate'; the method depended on heavy human structuring, and the authors report context-window collapse and hallucinated bugs. No performance, line-count-after or cost figures are given, and GPU offload is future work. Durations are approximate, so none is typed.
More stories by tool: OpenAI CodexGitHub Copilot
Related topics: Language portsBrownfield codebases