Affiliate disclosure
Book titles on this page link to Amazon. As an Amazon Associate, DataField.Dev earns from qualifying purchases — at no additional cost to you.
Further Reading: Testing, Documentation, and Software Engineering
Where to go deeper on testing scientific code, documenting it, and making results reproducible. Sources are tagged Tier 1 (works and tools we are confident exist and recommend) and Tier 2 (real and worth seeking, but confirm the current edition, URL, or version yourself). Testing is learned by doing — several of these are tools to install and turn on today, not books to read.
Tools you should install and use
- pFUnit — the parallel Fortran unit-testing framework (
github.com/Goddard-Fortran-Ecosystem/pFUnit). The standard xUnit-style framework for modern Fortran, from NASA Goddard:@test,@assertEqualwith tolerances, and MPI-aware parallel tests. Read the user guide, then wire it into your solver'stest/directory. Tier 1. - FORD — the FORtran Documentator (
forddocs.readthedocs.io). The documentation generator this chapter uses: point it at your source, and the!>/!!doc comments become a browsable, cross-linked API site. The docs show the project-file settings and every doc-comment convention. Tier 1. - GitHub Actions (
docs.github.com/actions) andfortran-lang/setup-fpm. The CI service and the action that installs fpm on a runner. Copy this chapter's workflow into.github/workflows/ci.yml, push, and watch the compiler-matrix build run. Tier 1 (Actions); Tier 2 (the setup-fpm action — check the current version tag). - The Fortran Package Manager (fpm,
fpm.fortran-lang.org).fpm testdiscovers and runs everything intest/; its manifest pins dependency versions to a git tag — the reproducibility habit of §37.5 built into the build. Tier 1.
Testing and numerical verification
- Milan Curcic, Modern Fortran: Building Efficient Parallel Applications (Manning). Project-driven modern Fortran that shows tests and fpm in the workflow this chapter prescribes, alongside the parallel back-ends of Part VIII. Tier 1.
- Patrick J. Roache, Verification and Validation in Computational Science and Engineering (Hermosa). The reference on the distinction §37.2 draws — verification (solving the equations right, e.g. vs an analytical solution and by convergence order) versus validation (the right equations) — and the method of manufactured solutions, the industrial-strength generalization of "test against an exact case." Tier 2 (a standard in the field; confirm the edition).
- Andrew Rest et al. / the software-testing literature on the oracle problem. The reason numerical testing is hard has a name and a research literature; a search for "test oracle problem" repays the §37.1 intuition with the general theory behind it. Tier 2 (survey literature; read for the concept, not a single citation).
Reproducibility — the culture and the argument
- Jonathan B. Buckheit and David L. Donoho, "WaveLab and Reproducible Research" (1995). The essay that popularized Jon Claerbout's argument that a computational-science article is merely advertising of the scholarship — the real scholarship is the code and the instructions that made the figures. The intellectual root of §37.5. Tier 2 (a widely cited essay; confirm the reprint venue).
- Greg Wilson et al., "Best Practices for Scientific Computing" and "Good Enough Practices in Scientific Computing." Short, practical papers from the Software Carpentry community on version control, testing, and provenance for scientists — the habits of §37.4–§37.5 stated as a checklist. Tier 1.
- The Turing Way (
the-turing-way.netlify.app). A large, open, community handbook on reproducible research — data management, version control, testing, and provenance — a modern, practical companion to this chapter. Tier 2 (living online resource; content evolves).
Primary sources and background
- The GCC /
gfortrandocumentation —compiler_versionandcompiler_options. Theiso_fortran_envintrinsics that let a program self-report its build (§37.5), and the flag reference behind the reproducibility warnings (Chapter 30). Tier 1. - Pro Git, by Scott Chacon and Ben Straub (
git-scm.com/book, free online). The definitive git reference; read the chapters on tagging and on writing good commit messages for the scientific-git habits of §37.4. Tier 1.
Suggested order
- Turn on CI today. Copy the §37.3 workflow into your solver's repository and push — nothing teaches the value of automated testing like watching a red X appear the first time you break something.
- Write the three tests of the Project Checkpoint (unit, regression, verification) with the hand-rolled harness, then adopt pFUnit and re-express them — you will understand the framework because you built its core first.
- Read Wilson et al. and skim Roache on verification once the mechanics feel solid; they reframe the how of this chapter as the why that carries into the Chapter 38 capstone.
- Bookmark The Turing Way and Pro Git as references for the day you prepare a result for publication — and you will.