\( \newcommand\D{\mathrm{d}} \newcommand\E{\mathrm{e}} \newcommand\I{\mathrm{i}} \newcommand\bigOh{\mathcal{O}} \newcommand{\cat}[1]{\mathbf{#1}} \newcommand\curl{\vec{\nabla}\times} \newcommand{\CC}{\mathbb{C}} \newcommand{\NN}{\mathbb{N}} \newcommand{\QQ}{\mathbb{Q}} \newcommand{\RR}{\mathbb{R}} \newcommand{\ZZ}{\mathbb{Z}} \)
UP | HOME

FORTRAN

Table of Contents

1. Overview

Fortran is the "gold standard" for numerical computation. Since the F90 dialect came about, it has evolved from the "assembly doppleganger" to something resembling Pascal.

Like Common Lisp, it's case insensitive (unfortunately).

2. Tools

I am specifically trying to not reinvent the wheel. Towards this end, I am willing to delegate work to specialized libraries (like LAPACK and friends).

2.1. Literate Fortran

If I wanted to write a program in Fortran and include the motivation, derivation, etc., then a common trick is to use literate programming. There are a few toolkits available:

  • Noweb, a generic tool for literate programming, which works really well with LaTeX, and can produce HTML output. The only disadvantage I can think of is it doesn't easily handle syntax highlighting.
  • FWEB, a fork of WEB specifically for Fortran
  • Org-mode, which I prefer least

2.2. Unit Testing Frameworks

There are about a dozen frameworks for unit testing Fortran code. One of the tenets of unit testing is to keep reports of test results, and the only framework producing an artifact (in the form of a file) is FRUIT.

3. References

3.1. Blogs

Last Updated 2022-02-10 Thu 14:29.