Doctor Fortran in “We All Live in a Yellow Submodule”

Fortran 90 introduced the concept of modules, a separately compiled collection of declarations and procedures that could be referenced by other program units. This was borrowed from Ada, (and probably other languages), but omitted one very useful Ada feature: IS SEPARATE. Why is this important? With Fortran modules, a source file that USEs a module is dependent on the entire module; if any change is made to the module, every source that USEs it must be recompiled even if the changes have no effect on the interface. If you have nested modules, as many applications do, this can lead to a “recompilation cascade” that dramatically increases build time for even the most minor change.

More

Subscribe to Doctor Fortran

Subscribe to Doctor Fortran

Loading