Glossary
Every key term, with the chapter that first defines it. Terms are listed alphabetically.
-flto / link-time optimization — An optimization mode in which the heavy optimization is deferred to the
link step, where the whole program is visible at once, so the compiler can inline and analyze across
source files (not just within one). Must be passed at both the compile and the link commands. Slower to
build and harder to debug; a release-only flag. (Intel's equivalent is -ipo.)
-march=native — A flag telling the compiler to detect the exact CPU it is compiling on and emit code using every instruction that chip supports, most importantly its widest SIMD instruction set (e.g. AVX-512). Fast for vectorizable numerical code, but the resulting binary is not portable: on a different CPU lacking those instructions it aborts with an "illegal instruction" fault. It can also enable fused multiply-add, changing results in the last bit.
-Ofast (and its caveats) — A gfortran optimization mode equal to -O3 plus -ffast-math (and, for
Fortran, -fno-protect-parens). It buys speed by relaxing strict IEEE 754 semantics: the compiler may
reassociate floating-point operations, ignore the parentheses you wrote, assume no NaN/Inf occurs, and
flush denormals to zero. Each relaxation can change the number your program prints (it can turn
(1e20 + -1e20) + 1 from 1.0 into 0.0), silently and without warning. Use it only after validating
that results still pass tolerance, and record that you used it.
.mod file — a compiler-generated file (e.g., kinds.mod) recording a module's public interface: the names, types, and signatures it exports. It is read by any unit that uses the module and must therefore exist before that unit is compiled. It is not the compiled code — the machine code lives in the .o file and must still be linked. (A module with separate module procedures also emits a .smod file recording its submodule interfaces.)
class — a declaration (class(base_t)) making a variable, component, or dummy argument polymorphic: at run time it may hold base_t or any type that extends it. Its declared type (fixed, seen by the compiler) may differ from its dynamic type (the actual type held now). Contrast type(base_t), which is monomorphic — always exactly base_t. A polymorphic non-dummy object must be allocatable or pointer.
classof — the polymorphic companion to typeof: classof(x) declares an entity polymorphic over the declared type of x (the class(...) analogue). Both typeof and classof are steps toward a full generics facility.
cpu_time — The Fortran intrinsic subroutine call cpu_time(t) that returns the processor time (CPU-seconds) consumed by the program so far, as a real number. Only differences between two readings are meaningful; idle time (I/O waits, being descheduled) is not charged to it, and on most implementations it sums time across threads.
do concurrent (performance use) — A loop form in which the programmer asserts to the compiler that the iterations are independent and may execute in any order or simultaneously. It is an unchecked promise that frees the compiler to vectorize, reorder, unroll, or (with the right flags/compiler) parallelize; it does not by itself guarantee parallel or vector execution. Breaking the independence promise (an in-place update, a running total) yields an undefined result.
final — a subroutine listed under final :: in a type's contains section, called automatically ("finalization") just before an object of that type is destroyed (by deallocate, scope exit, or before being overwritten in an intrinsic assignment). Fortran's destructor. Its dummy argument is type(...), not class(...), because finalization is not dispatched.
info — the integer status argument returned last by every LAPACK computational routine. info = 0 means success; info < 0 means the (-info)-th argument had an illegal value (almost always a bug in the caller's argument list); info > 0 reports a routine-specific numerical failure (for dgesv, an exactly singular matrix; for dsyev, failure to converge). Must always be checked.
ipiv — the integer pivot array (length n) that dgesv and the LU factorizations use to record the row interchanges made by partial pivoting; required as workspace-plus-output even when the caller never inspects it.
restrict — a C99 type qualifier by which a C programmer promises, per pointer, that the object it points to is accessed only through that pointer (i.e., it does not alias) — the manual, opt-in, per-pointer, easy-to-get-wrong equivalent of the non-aliasing Fortran guarantees automatically for every argument. Named here for contrast with the no-aliasing advantage.
select type — a construct that inspects a polymorphic object's dynamic type and runs a different block for each: a type is (t) guard matches the exact dynamic type t; a class is (t) guard matches t or any extension (most specific match wins); class default catches the rest. Inside a matched block the object is treated with the more specific type.
system_clock (the timing idiom) — The Fortran intrinsic system_clock(count, count_rate, count_max) that reports an integer tick count from a processor clock, the count_rate (ticks per second), and the count_max at which count wraps to zero. Wall-clock elapsed seconds = real(count_end - count_start, dp)/real(count_rate, dp). The idiom: use int64 counters (high resolution, rare wrap), read count_rate from the call rather than assuming it, subtract two counts, and divide.
typeof — a Fortran 2023 declaration type specifier, typeof(x), that declares an entity to have the same declared type and type parameters as an existing entity x, without naming that type explicitly.
A
A-stability — the property of an integrator that its numerical solution of $y' = \lambda y$ ($\operatorname{Re}\lambda < 0$) decays for every step size $h > 0$; backward Euler has it, explicit methods do not.
absorption — the loss of a small value when it is added to a much larger running sum and falls below half a ULP of it, so the sum is unchanged. The mechanism behind floating-point addition being non-associative.
abstract type — a derived type declared type, abstract :: t that cannot be instantiated (no type(t) variable, no allocate(t)), existing only to be extended. It defines the common components and, via deferred bindings, the interface that extensions must fulfill.
accelerator — the general term for a specialized device attached to a CPU to speed up a particular kind of computation; a GPU is by far the most common accelerator in scientific computing, and in Fortran contexts the two words are effectively interchangeable.
actual argument — the specific value or variable a caller passes to a procedure, associated by position (or by keyword) with the procedure's dummy arguments.
adaptive integration — a quadrature scheme that automatically refines its sampling where the integrand is hardest, guided by a run-time error estimate: apply a rule to an interval and to its two halves, and subdivide (recurse) wherever the two disagree by more than the tolerance.
adaptive step size — a scheme that estimates each step's local error and adjusts $h$ (rejecting and shrinking, or accepting and growing) to keep the error near a tolerance.
adjustl / adjustr — the justification intrinsics: adjustl left-justifies (removes leading blanks and appends that many at the end); adjustr right-justifies (removes trailing blanks and prepends that many at the front). Both preserve the string's length — blanks are moved, not deleted.
allocatable array — an array declared with the allocatable attribute and a deferred shape (a(:)), sized at run time with allocate, released with deallocate, and automatically deallocated when its local scope ends; allocated tests its state.
allocatable component — a component of a derived type that has the allocatable attribute; its size (or, for a character, its length) is set at run time rather than in the type definition. Assignment of the containing derived-type variable performs a deep copy of the component (independent storage), and the component is deallocated automatically when the object goes out of scope — the reasons it is preferred over a pointer component for scientific data. Available since Fortran 2003.
Amdahl's Law — for a program with parallelizable fraction $p$ and serial fraction $1-p$, run on $N$ processors, the speedup is $S(N) = 1/((1-p) + p/N)$; as $N \to \infty$ it is capped at $S_{\max} = 1/(1-p)$. Governs strong scaling (fixed problem size): the serial fraction limits the achievable speedup no matter how many cores are added.
arithmetic intensity — the ratio of floating-point operations performed to bytes (or numbers) moved from memory; the quantity that separates the compute-bound Level-3 BLAS (high intensity, near-peak achievable) from the memory-bound Levels 1 and 2 (low intensity). "Cast the work as Level-3 BLAS" is the practical form of "maximize arithmetic intensity."
array constructor — an inline rank-1 array value built from a bracketed list, e.g. [1.0_dp, 2.0_dp, 3.0_dp]; higher-rank arrays are made by pouring a constructor into reshape.
array section — a subarray selected with a subscript triplet lower:upper:stride in one or more dimensions (a lone : meaning the whole extent). A section is a first-class array value: it can be read, assigned to, passed to a procedure, and used in any array expression.
assertion — a statement placed in the code declaring that a condition the programmer believes must be true at that point actually is; if false, the program halts at once with a diagnostic, because a false assertion means a bug has already happened. Fortran has no built-in assert, so one is written as a small procedure that error stops when its condition is false. Assertions guard "impossible" conditions (bugs in one's own logic), as distinct from expected errors, which use stat/iostat.
association status — the state of a pointer, one of: associated (a valid alias for a target or allocated memory), disassociated (explicitly pointing at nothing, via nullify or => null()), or undefined (never initialized). associated(p) distinguishes the first two but must never be called on an undefined pointer.
assumed-length character — a dummy-argument declaration character(len=*) that takes its length from the actual argument the caller passes; the character analog of an assumed-shape array argument, used on essentially every string procedure argument.
assumed-shape — a dummy array argument declared with colons for its dimensions (a(:,:)), whose shape is taken automatically from the actual argument; the modern default. Its lower bounds default to 1 and it requires an explicit interface.
assumed-size array — the legacy FORTRAN 77 dummy array form a(*) whose last extent is unknown to the procedure, defeating size, whole-array operations, and bounds checking; avoid in new code.
auto-vectorization — The compiler's automatic transformation of an ordinary scalar loop into one that uses SIMD instructions, processing several iterations per instruction, without the programmer writing any intrinsics or assembly. Requires (at -O2+) independent iterations, unit-stride access, a countable trip count, no aliasing, and a simple body.
B
backward (implicit) Euler — the implicit first-order method $y_{n+1} = y_n + h f(t_{n+1}, y_{n+1})$; A-stable, the simplest method suited to stiff problems.
benchmark methodology — The disciplined practice of measuring performance so the numbers are meaningful and reproducible: warm up before timing, repeat the measurement many times, report a robust statistic (minimum or median, not a lone sample) with its spread, control the environment (release build, quiet machine, fixed frequency, same input), change one thing at a time, and record the conditions.
bind(c) — an attribute giving a Fortran entity C linkage. On a procedure it produces a predictable, un-mangled binding label (the symbol a C linker resolves), set exactly by an optional name= clause or defaulting to the lower-case Fortran name; on a derived type it makes the type interoperable (C-struct layout); on a module variable it gives the variable C linkage (a shared extern). Its dummy arguments and result must be interoperable.
bit-for-bit — Agreement of two floating-point results to the last bit (identical IEEE 754 patterns, so a == b
is exactly true); the strictest and most fragile comparison, valid only under a pinned build configuration.
bit-for-bit reproducibility — agreement of two computations to the last bit of every floating-point value; achievable only when precision, operations, and their order are preserved, and it is a property of the source together with the compiler and its flags.
BLAS — the Basic Linear Algebra Subprograms: a standardized set of low-level routines for the fundamental operations of linear algebra, organized into three levels — Level 1 (vector-vector, $O(n)$ work), Level 2 (matrix-vector, $O(n^2)$), and Level 3 (matrix-matrix, $O(n^3)$). The reference implementation is Fortran; tuned implementations (OpenBLAS, Intel MKL, BLIS) supply hardware-specific speed behind the same interface.
BLAS levels — the three-way grouping of the Basic Linear Algebra Subprograms by operand shape and arithmetic intensity. Level 1 is vector–vector work, $O(n)$ operations on $O(n)$ data (e.g. daxpy, ddot); Level 2 is matrix–vector, $O(n^2)$ operations on $O(n^2)$ data (e.g. dgemv); Level 3 is matrix–matrix, $O(n^3)$ operations on only $O(n^2)$ data (e.g. dgemm). Only Level 3 has enough arithmetic per datum to reuse cache and approach the processor's peak speed; Levels 1 and 2 are memory-bound.
build configuration — the complete set of choices that determine how source is turned into a program: the compiler and its version, the optimization and debugging flags, which optional code paths and preprocessor macros are enabled, the precision, and the exact versions of every external library linked in. A debug build and a release build of one source are two different build configurations; recording the configuration is part of recording a reproducible result.
Butcher tableau — the compact table of stage nodes, coupling coefficients, and final weights that specifies a Runge-Kutta method.
C
C-contiguous — a NumPy memory layout (row-major) in which the last array index varies fastest in memory; rows are stored one after another. NumPy's default. The opposite of Fortran's layout, so a C-contiguous array must be copied to be passed to Fortran. Checked with a.flags['C_CONTIGUOUS'].
C-interoperable kind — a Fortran kind parameter, exported by iso_c_binding, whose objects share their representation bit for bit with the corresponding C type, so values pass to and from C without conversion. If no matching Fortran kind exists on a platform, the constant is negative. (E.g. real(c_double) matches C double; integer(c_int) matches C int.)
cache blocking (tiling) — A loop-nest restructuring that works on small blocks (tiles) of data that fit inside a fast cache level, finishing all the work that reuses a tile before advancing. It captures data reuse in cache instead of re-reading from main memory. Pays for high-reuse, compute-bound kernels (matrix multiply) and does almost nothing for low-reuse, memory-bound kernels (a single stencil sweep).
cache line — the fixed-size contiguous block of memory (typically 64 bytes = eight real(dp)) transferred between main memory and cache as a single unit. You never load one value, only the whole line containing it. Using all of a fetched line before it is evicted is what makes cache-friendly (with-the-grain) loop order fast; touching one value per line wastes seven-eighths of the bandwidth.
cachegrind — The valgrind tool (valgrind --tool=cachegrind) that runs a program on a simulated machine with a modelled cache hierarchy (I1, D1, LL) and counts every memory reference and miss. Its counts are deterministic and reproducible but model a generic cache; cg_annotate attributes misses to individual source lines. Complements perf, which reads real hardware counters.
call graph — The gprof report that shows the caller/callee structure with time attributed along the edges: for each procedure, its callers appear above and its callees below, and its time is split into "self" and "children." It explains why a routine is hot (who calls it, how often).
catastrophic cancellation — the severe loss of significant digits when subtracting two nearly equal floating-point numbers: the shared leading digits cancel, promoting the operands' small rounding errors into the leading digits of the result. Cured by rearranging the algebra (e.g. the conjugate trick) so the near-equal subtraction never happens.
CF conventions — The Climate and Forecast metadata conventions: a community standard for the attributes in a NetCDF file, so the data is unambiguous and machine-interpretable. CF specifies a units attribute (from UDUNITS) on every variable, an optional standard_name from a controlled vocabulary plus a free-text long_name, physical axes given as coordinate variables, _FillValue for missing data, and global provenance attributes (title, institution, source, history, Conventions). A CF-compliant file is read without configuration by the whole geoscience toolchain (ParaView, Panoply, xarray, cdo, ncview).
CFL condition — The stability requirement that an explicit scheme's timestep be small enough, named for Courant, Friedrichs, and Lewy (1928). Intuition: the scheme sees only as far as its stencil (one cell) per step, so $\Delta t$ must keep the physics within about one cell. For 2D explicit heat: $r = \alpha\Delta t/h^2 \le 1/4$; for the wave equation (the original form): Courant number $C = c\Delta t/h \le 1$.
characterization test — a test written to capture what a piece of code currently does (rather than what it should do), so that its behavior is pinned before you refactor underneath it; especially valuable when the running legacy program is the only specification that exists.
chunking — Storing a dataset not as one contiguous block but as a grid of fixed-size rectangular tiles (chunks), each written and read independently. Chunking enables reading a sub-region without loading the whole array (only the overlapping chunks are fetched) and is a prerequisite for compression (the filter runs one chunk at a time). The chunk shape should match the typical read pattern. HDF5 sets it with h5pset_chunk_f on a dataset-creation property list; NetCDF-4 via chunksizes= on nf90_def_var.
coarray — a variable declared with a codimension (an extra bound in square brackets, e.g. real :: a[*]), which makes it exist as a separate copy on every image and lets any image access any other image's copy by writing a coindexed reference a[q]. A coarray may be scalar, array, or allocatable; the ( ) bounds are the local shape (identical on every image) and the [ ] bounds are the coshape (the arrangement of images). Without the brackets a variable is ordinary and private to its image.
codimension — a dimension of a coarray, written in square brackets [ ], that ranges over images rather than over elements within one image: where a(3) is the third element of the local array, a[3] is image 3's copy of a. The number of codimensions is the corank (a[*] has corank 1); the coextents form the coshape. The trailing * in [*] means "as many images as the program was launched with."
collective communication — an operation that all processes in a communicator call together, cooperating in one communication pattern (broadcast, reduce, gather, scatter). Every process must make the matching call or it hangs; in return MPI implements the pattern efficiently (often log-depth tree algorithms). Clearer and faster than hand-rolling from point-to-point calls.
collective subroutine — an intrinsic subroutine (Fortran 2018) that performs a coordinated operation across all images at once and therefore must be called by every image with matching arguments: co_sum, co_max, co_min (reductions that combine a value across images), co_broadcast (copy one image's value to all), and co_reduce (reduction by a user operation). A collective carries its own synchronization for the data it touches and is the safe, one-line counterpart to hand-rolled coindexed reductions; co_sum is the analogue of MPI's MPI_Allreduce.
colormap — the function that maps each scalar value to a display color. A perceptually uniform colormap (matplotlib's viridis, inferno, magma, plasma) renders equal value-steps as equal-looking color-steps and is colorblind-safe; the rainbow/jet map is not — it invents false boundaries at its color bands and hides detail — and should be avoided for scientific data.
column-major order — the memory layout Fortran uses for arrays, in which the first array index varies fastest through memory. Introduced here as the reason loop order matters for speed; developed fully in Chapter 5.
COMMON — a named (or blank) region of memory that several program units may each declare and thereby share. Written COMMON /name/ list, it associates the listed variables of different units by position, not by name, with no compiler checking that the declarations agree; FORTRAN 77's mechanism for global shared state and the ancestor of the module variable.
communicator — an MPI object identifying a group of processes and providing a private communication context for them; every message is sent within a communicator, and a rank is meaningful only relative to one. The predefined MPI_COMM_WORLD contains all processes the program was launched with. In the use mpi interface a communicator is a default integer handle.
compilation order — a valid build sequence for a multi-module program: a topological ordering of the module-dependency graph in which each module is compiled after every module it uses (leaves first, the main program last). It is a property of the dependencies, not the file names.
compiler — the program that translates a high-level language into the machine instructions a processor actually executes.
compiler flag — an option passed to the compiler on the command line, conventionally beginning with a hyphen, that modifies how it compiles: what output to produce (-o, -c), which warnings to report (-Wall), which run-time checks to insert (-fcheck=all), how hard to optimize (-O2), which standard to enforce (-std=f2018), and whether to embed debug information (-g).
complex — an intrinsic type storing a pair of reals as a single number a + b*i, with arithmetic following complex algebra; real(z) extracts the real part, aimag(z) the imaginary part, and abs(z) the modulus.
component — one of the named data members a derived type groups together; read or written with the percent operator % (v%comp, and chained for nested types as p%pos%x). A component may be a scalar, an array, another derived type, or allocatable, and may carry a default initializer (integer :: count = 0).
compression — Losslessly shrinking a dataset's stored bytes with a filter applied per chunk, transparently decompressed on read. The most common HDF5 filter is deflate; smooth scientific fields (which have highly redundant bytes) compress well, noisy fields barely at all. Requires chunking. HDF5: h5pset_deflate_f; NetCDF-4: deflate_level= on nf90_def_var.
computational scientist — a scientist or engineer whose primary research tool is large-scale computation: someone who poses a scientific question, chooses or devises the numerical method to attack it, writes and runs the simulation, and interprets the results as science. Sits at the science end of the career spectrum; typically holds an advanced degree in a domain (physics, atmospheric science, chemistry, engineering) and is a capable programmer because the computation is how they do their science.
computational-science paper — the conventional written form of a computational result, structured as problem statement, governing equations and numerical method, verification and validation, implementation and performance, results, conclusion, and reproducibility. The order reflects what a reader needs to trust the work: the method and its verification precede the results, because results are only meaningful once the code that produced them is shown to be correct.
compute-bound — Describing a loop whose speed is limited by how fast the processor can perform arithmetic; the floating-point units are the bottleneck and data arrives faster than it can be crunched. Dense, well-blocked linear algebra (a tuned dgemm) is engineered to be compute-bound.
computed GOTO — a control statement of the form GO TO (L1, L2, L3), K that transfers control to the label selected by the integer K (the first label if K is 1, and so on), falling through if K is out of range. FORTRAN 77's integer-indexed multi-way branch, the ancestor of select case.
concatenation — the // operator, which joins two character values into one whose length is the sum of their lengths ('heat' // '.vtk' is 'heat.vtk'). It joins the operands exactly as given, blanks included, so a fixed-length operand must be trimmed first or its trailing blanks are spliced in.
conditional expression — a Fortran 2023 expression of the form ( logical-condition ? value-if-true : value-if-false ), parenthesized, that yields one of two values depending on a scalar logical condition. Only the selected branch is evaluated (it short-circuits), unlike the merge intrinsic, which evaluates both value arguments. The 2023 standard also permits the same ? : form as an actual argument (a "conditional argument"). Fortran's equivalent of C's ternary operator and Python's a if cond else b.
conditioning — a property of a problem: how sensitive its answer is to small changes in its inputs, measured by the condition number (a condition number of $10^{k}$ means losing about $k$ digits). A well-conditioned problem is insensitive; an ill-conditioned one amplifies input error, and no algorithm can beat that.
contiguous — an attribute (Fortran 2008) for an array pointer or assumed-shape dummy argument that promises the array occupies a single unbroken block of memory (no strides or gaps). It licenses optimization (notably vectorization) without changing results, and is verified at run time by is_contiguous.
continuous integration (CI) — The practice of automatically building a project and running its test suite on every change, on a clean neutral machine, so a break is caught within minutes rather than weeks; reports pass/fail (the green check / red X) and, for a proposed merge, can block it.
convergence — the property that a method's approximation approaches the exact answer as the discretization is refined, $E(h) \to 0$ as $h \to 0$ (or $n \to \infty$). The order of accuracy says how fast it converges.
coordinate variable — A one-dimensional NetCDF variable with the same name as a dimension, holding the physical coordinate of each index along that axis (e.g. dimension x of length 4 and variable x(x) = [0.0, 0.25, 0.5, 0.75] with units = "m"). Coordinate variables turn array indices into physical space, letting tools label axes in real units, place data on a map, or interpolate. A CF cornerstone; often carries an axis attribute ("X", "Y", "Z", "T").
counted do loop — do i = start, end, step: an integer counter runs from start to end (inclusive on both ends) in increments of step (default 1); the trip count is fixed at loop entry.
CPU time — The amount of processor time actually consumed by the program, measured with cpu_time. Equal to wall time for a serial compute-only run on a quiet machine; smaller when the program waits (I/O-bound); larger than wall time when work is spread across several cores.
CUDA Fortran — NVIDIA's set of Fortran extensions (from PGI, now nvfortran) for writing explicit GPU kernels and launching them from host code. Exposes the CUDA model directly (device arrays, attributes(global) kernels, <<<grid,block>>> launch). NVIDIA-specific — more control than OpenACC, at the cost of portability.
cycle — a statement that abandons the current iteration of a loop and jumps to the next one, without leaving the loop (Python's continue). With a construct name, cycle name acts on the named loop.
D
dangling pointer — a pointer that aliases memory that has been freed (deallocated through another alias) or has gone out of scope; it may still report associated == .true., but dereferencing it is undefined behavior.
data parallelism — performing the same operation on many independent data elements simultaneously (e.g., applying the identical stencil to every interior cell of the plate); the dominant, well-scaling form of parallelism in scientific computing.
data race — a bug in which two or more threads access the same memory concurrently with at least one writing, and no synchronization orders the accesses, so the result depends on nondeterministic thread timing. The signature is an answer that changes from run to run on the same input. In OpenMP a race is almost always a data-scoping mistake — typically a shared variable written across a parallel loop.
data region — a block of code, delimited by !$acc data` … `!$acc end data, over which named arrays are kept resident in device memory: the data clauses move the arrays once (in at entry, out at exit), and every !$acc parallel loop inside reuses the resident copy without re-transferring it. The mechanism for "move data once, compute on it many times."
data scoping — assigning a data-sharing attribute to every variable in a parallel region, declaring whether the team shares one instance or each thread holds a private one. The principal attributes: shared (one instance for all), private (an uninitialized per-thread copy), firstprivate (a per-thread copy initialized to the pre-region value), and reduction (private per thread, combined at the end). A wrong attribute produces a data race or wrong values, not a compiler error.
dataset — In HDF5, a typed, multidimensional array stored in a file — the analogue of a NetCDF variable. A dataset has a datatype (e.g. H5T_IEEE_F64LE), a dataspace (its rank and shape), and an optional creation property list controlling chunking and compression. Created with h5dcreate_f, written with h5dwrite_f, read with h5dread_f.
declared type — the type a variable is declared with, fixed and known to the compiler (base_t in class(base_t) :: x).
defensive programming — the practice of writing code that actively verifies its own assumptions — validating inputs (preconditions), checking that results are sane (postconditions), guarding every operation that can fail, and initializing everything — and that fails early, loudly, and with a diagnostic when an assumption is violated. Its goal is to convert a subtle, far-downstream wrong answer into an immediate, localized, diagnosable halt.
deferred binding — a type-bound procedure declared deferred in an abstract type: it names a binding and its (abstract) interface but supplies no body. Every concrete extension must implement it or itself be abstract — a compile-time contract.
deferred-length character — a string declared character(:), allocatable :: s whose length is not fixed but acquired at run time, either from allocate(character(len=n) :: s) or, usually, from assignment (s = value allocates s to the value's exact length, with no padding, and reallocates on a later assignment). The character-typed form of an allocatable array; len(s) is always exact and allocated(s) reports whether it has a length yet.
deflate — The gzip/zlib lossless compression algorithm, the default HDF5 compression filter, controlled by a level from 1 (fast, less shrinkage) to 9 (slow, most shrinkage). Levels 4–6 are the practical sweet spot for smooth floating-point fields; level 9 buys little extra ratio for much CPU. Often paired with the shuffle filter (h5pset_shuffle_f), applied before deflate, which reorders the bytes of the values so the near-identical high-order bytes of a smooth field line up and compress better.
Dennard scaling — the observation (Robert Dennard, 1974) that as transistors shrink, their voltage and current shrink in proportion so that power per unit area stays roughly constant, which for decades permitted rising clock frequencies "for free." Its breakdown in the mid-2000s (chiefly from leakage current) ended the era of automatic single-core speedups and forced the shift to multicore.
derived type — a data type you define yourself by grouping together other data (of intrinsic types like real and integer, or of other derived types) under one new type name; a variable of a derived type is a single object holding all the grouped values at once. Defined with type :: name … end type name; declared with type(name) :: v. Introduced in Fortran 90.
device — the accelerator (GPU) and its separate on-board memory, which executes the parallel kernels the host sends it. Host and device memories are distinct address spaces; data must be explicitly copied between them.
diffusion number — The dimensionless group $r = \alpha\Delta t/h^2$ (also "mesh Fourier number") that collects the physics, timestep, and grid spacing; it multiplies the stencil in the FTCS update and sets both the step size and the stability amplification factor.
direct access — a file access mode (access='direct', recl=N) with fixed-length records addressable by number with rec=k, allowing random jumps to any record. The units of recl are processor-defined (bytes in gfortran).
Dirichlet boundary condition — A boundary condition that fixes the value of the field on the boundary ($u = g$). Coded by setting boundary points once and never updating them; the time loop sweeps only the interior.
disassociated — the clean "points at nothing" status a pointer has after nullify(p) or initialization => null(); associated returns .false. for it.
distributed memory — a parallel model in which each process has its own private memory and cannot directly access another's; processes coordinate by explicitly sending messages. The model of a cluster of separate nodes on a network; scales to the largest machines. Fortran tools: MPI, coarrays.
do concurrent — a loop do concurrent (i = a:b) … end do in which the programmer asserts the iterations are independent (no iteration depends on another's result), permitting the compiler to reorder, vectorize, or parallelize them. The promise is unchecked; violating it makes the program invalid.
do loop — Fortran's loop construct, do … end do, in three forms: counted (do i = a, b, s), conditional (do while (c)), and infinite (a bare do ended by exit).
do while — a loop do while (condition) … end do that tests the logical condition before each pass and runs the body only while it is true; runs zero times if the condition is false at the outset.
domain decomposition — the strategy of dividing a simulation's spatial domain into subdomains, assigning one to each process, and having each process compute the update for its own subdomain. The dominant way to parallelise grid-based physics on distributed memory; because a finite-difference stencil couples only nearby points, communication (boundaries) is small relative to computation (interiors), which is why it scales.
domain scientist — the role furthest toward the science end: asks the research question, runs existing codes, and modifies them only lightly; domain depth matters more than software depth.
double precision — an intrinsic real type (and legacy keyword) providing roughly 15 significant digits, historically distinct from single-precision real; modern code obtains the same thing more flexibly through a kind parameter (real(dp)), but the keyword and the 1.0d0 literal form persist in older code.
dp — this book's name for the double-precision real kind, defined once as integer, parameter :: dp = selected_real_kind(15, 307) (at least 15 significant digits, range to 10^307 — IEEE 754 double on mainstream systems). Reals are declared real(dp) and real literals carry a _dp suffix (1.0_dp).
driver program — the top-level program unit that orchestrates a run — reading configuration, setting up data structures, running the main loop by calling into the solver and physics, arranging output, and shutting down — while performing none of the science itself. In the heat project, program heat is the driver.
dtype — a NumPy array's element type (float64, float32, int32, complex128, …). For an array passed to Fortran it must match the Fortran declaration's kind byte for byte (real(real64) ↔ float64, integer(int32) ↔ int32, etc.); a mismatch forces f2py to copy and convert on every call.
dummy argument — the placeholder name a procedure declares for an input; associated at each call with an actual argument, the value the caller supplies.
dynamic dispatch — resolving a type-bound procedure call at run time by the object's dynamic type (an indirect call through a table), rather than at compile time. It is what makes polymorphism work, and — because it cannot be inlined — what makes it costly inside hot loops.
dynamic type — the actual type a polymorphic variable holds at run time, which may be the declared type or any extension of it, and may vary during execution.
E
edit descriptor — a code inside a format string that controls how one value is converted between its internal form and characters. Data descriptors (i, f, e, es, a) format values; control descriptors (x, /) position text without consuming a value. The number in f8.2 gives the field width and, for reals, the digits after the decimal point. (First tasted informally in Chapter 3 §3.7; owned here.)
elemental — a procedure attribute for a procedure written with scalar arguments that may be applied element-by-element to array arguments of any shape; an elemental procedure is automatically pure.
embedded Runge-Kutta pair — a method that yields two solutions of different order from the same stages (e.g. RKF45, Dormand-Prince), giving a nearly free error estimate.
entry point — the single program unit of a Fortran program, where execution begins; the root of the call tree and the first thing to read when navigating an unfamiliar code.
enumeration type — a Fortran 2023 distinct data type whose values are a fixed, named set of enumerators; a variable of the type may hold only one of those named values, and the compiler type-checks it. Distinct from — and more type-safe than — the C-interoperable enum, bind(c) of Fortran 2003, which merely creates named integer constants. (Exact declaration syntax is new; verify against your compiler.)
EQUIVALENCE — a statement, written EQUIVALENCE (a, b), declaring that the named variables or array elements share the same memory location, so writing one changes the other. Used to save memory (reuse one buffer) or to reinterpret storage as a different shape or type; FORTRAN 77's tool for deliberate aliasing, and the most dangerous construct in the language.
error stop — a statement that terminates a program immediately as an error termination, reporting failure to the environment with a nonzero exit code; contrasts with plain stop (normal termination, exit code zero by default). Both accept an optional integer or character stop code, which error stop uses as (or maps to) the process exit status. In a parallel (coarray) program, error stop halts every image at once. Introduced in Fortran 2008.
Euler's method — the first-order integrator $y_{n+1} = y_n + h f(t_n, y_n)$; follows the tangent at the interval's left endpoint. Global error $O(h)$.
executable — the final product of the build: a complete, self-sufficient program the operating system can load and run, with every reference resolved and every needed library linked in or locatable at run time. Typically has no extension on Linux/macOS and ends in .exe on Windows.
exit — a statement that immediately terminates the enclosing loop (or, with a construct name, a named loop) and transfers control to the statement after its end do.
explicit interface — full compiler knowledge of a procedure's arguments (number, type, intent) at the call site; provided automatically by internal and module procedures, and required for optional, keyword, and assumed-shape features.
explicit scheme — A time-stepping scheme in which each new value is given by a formula in already-known (current-step) values only, so it is computed directly with no equations to solve. Cheap per step but conditionally stable (a timestep limit).
explicit-shape array (argument) — a dummy array whose extents are stated outright (a(n, n)), requiring the caller to pass the sizes separately; guaranteed contiguous but error-prone.
extension module — a compiled shared library (.so on Linux/macOS, .pyd on Windows) that Python can import exactly like a pure-Python .py file, but whose code is native machine code rather than interpreted Python. NumPy and SciPy are extension modules; f2py lets you build your own from Fortran.
extent — the number of elements along one dimension of an array.
external procedure — a standalone procedure with no host and no automatic explicit interface; a source of uncaught argument-mismatch bugs in legacy code, and the reason modern code uses contains or modules.
F
F-contiguous — a NumPy memory layout (column-major, "F" for Fortran) in which the first array index varies fastest in memory; columns are stored one after another. This matches Fortran's array layout, so an F-contiguous, correct-dtype array passes to Fortran with zero copy. Created with order='F' or np.asfortranarray(); checked with np.isfortran(a). (A 1-D array is both C- and F-contiguous.)
f2py — "Fortran to Python interface generator," a program distributed with NumPy that reads Fortran source and automatically generates and compiles a Python extension module exposing the Fortran procedures as callable Python functions. It parses the Fortran, generates the C glue between the Python and Fortran calling conventions, maps types and array shapes, and invokes the compilers. Invoked as f2py -c -m NAME source.f90.
false sharing — a performance fault (not a correctness one) in which threads on different cores write to different variables that happen to occupy the same cache line, so the cache-coherence hardware must repeatedly transfer that line between cores even though the threads share no data logically. The result is a severe, silent slowdown with a correct answer. The usual cure is a reduction (genuinely private accumulators) or padding each thread's data onto its own cache line.
finite difference — an approximation of a derivative formed by evaluating a function at a few points a finite distance $h$ apart and combining the values, rather than taking the calculus limit $h \to 0$. The forward $(f(x+h)-f(x))/h$ and backward $(f(x)-f(x-h))/h$ differences are $O(h)$; the central $(f(x+h)-f(x-h))/(2h)$ is $O(h^2)$; the three-point second difference $(f(x+h)-2f(x)+f(x-h))/h^2$ approximates $f''$ to $O(h^2)$. (This is the derivative-approximation sense; the finite-difference method for PDEs is Ch. 24.)
first-order system of ODEs — a vector state $\mathbf{y}$ evolving under a vector RHS $\mathbf{y}' = \mathbf{f}(t, \mathbf{y})$; any higher-order ODE reduces to one by introducing derivatives as new state variables.
five-point stencil — The finite-difference approximation to the 2D Laplacian that combines a grid point with its four nearest neighbours (north, south, east, west): $(u_{i+1,j}+u_{i-1,j}+u_{i,j+1}+u_{i,j-1}-4u_{i,j})/h^2$ on a square grid. Second-order accurate; exact for quadratics. Drawn on the grid it is a plus sign.
fixed-form source — the source layout of FORTRAN 77 and earlier, in which each line is divided into fixed character columns with reserved meanings: columns 1–5 hold an optional statement label, column 6 is the continuation marker, columns 7–72 hold the statement, columns 73–80 are ignored, and a C or * in column 1 makes the whole line a comment. The counterpart to free-form source (Fortran 90 onward). A .f/.for file is fixed-form.
fixed-length character — a string declared with a constant length, character(len=n) :: s; it always holds exactly n characters, blank-padding a shorter value on the right and truncating a longer one. The length is a property of the variable, not of its contents.
flat profile — The gprof report that ranks procedures by the time spent inside each one (its "self" time), ignoring callees. Columns: % time, cumulative seconds, self seconds, call count, self ms/call, total ms/call. The % time column usually identifies what to optimize.
floating-point exception trap — a mode in which the CPU halts the program at the exact instruction that raises an anomalous floating-point condition, instead of silently producing a special value. gfortran enables it with -ffpe-trap=list; the useful list is invalid (0/0, sqrt of a negative → NaN), zero (nonzero divided by zero → Inf), and overflow (result too large → Inf). underflow and inexact occur in normal correct code and must not be trapped. Combined with -fbacktrace, trapping locates where a NaN/Inf was born.
FORD — FORtran Documenter: a tool that generates browsable HTML documentation from Fortran source and from special doc comments (!! after an entity, !> before one). The markers are ordinary comments, so annotated code compiles unchanged. (Used in Chapter 37.)
FORD (FORtran Documentator) — A documentation generator for modern Fortran that reads the source and its
structure and produces a cross-linked HTML site from doc comments written !> (before the item) or !! (after it);
because those are ordinary comments, documented source still compiles.
fork–join — OpenMP's execution model: a single master thread runs serially until it reaches a parallel region, where it forks a team of threads that all execute the region; at the region's end the threads join (synchronize and terminate) and the master continues alone. Parallelism is added incrementally, one region at a time.
format string — the parenthesized list of edit descriptors in print '(...)' or write(unit, '(...)') that acts as a template for the I/O list of values.
fortls — the Fortran Language Server: a background program speaking the editor-agnostic Language Server Protocol (LSP) that gives an editor autocompletion, hover documentation, go-to-definition, and live error diagnostics for Fortran.
fpm — the Fortran Package Manager: a build tool and dependency manager for Fortran, developed by the fortran-lang community. It builds a project with one command, works out module compilation order automatically, and fetches and builds dependencies, all driven by a small fpm.toml manifest. Conventions: app/ holds programs, src/ the library, test/ the tests.
free-form source — the modern Fortran source layout (Fortran 90 onward) in which statements are not constrained to fixed character columns, as opposed to the fixed-form layout of FORTRAN 77 and earlier.
FTCS (Forward-Time, Centred-Space) — The classic explicit scheme for the heat equation: forward (Euler) difference in time, centred difference in space. Update: $u^{n+1}_{i,j} = u^n_{i,j} + r(\text{neighbour sum} - 4u^n_{i,j})$ with $r = \alpha\Delta t/h^2$.
function — a procedure that returns a single value and is used inside an expression (e.g. y = f(x)); declared with an optional result clause naming the return variable.
fused multiply-add (FMA) — A single hardware instruction computing a*b + c with just one rounding
step instead of two. Faster and usually more accurate — but because it rounds once rather than twice, an
FMA build can differ from a non-FMA build in the last bit, even without -Ofast. Often enabled by
-march=native when the CPU supports it; a reproducibility consideration to record.
G
Gaussian quadrature — quadrature that chooses both the nodes and the weights optimally (nodes = roots of Legendre polynomials), achieving exactness for polynomials up to degree $2n-1$ with $n$ points — twice the reach of an equally-spaced rule. Maximizes accuracy per function evaluation on smooth integrands.
generics — a planned Fortran facility for parametric polymorphism: writing a procedure or type once, parameterized over one or more types (and kinds), so the compiler generates a specialized, type-checked version for each concrete type used — no code duplication, no runtime dispatch. Fortran does not have this yet; it is in development for a future revision (informally "Fortran 202Y"). typeof/classof are early pieces of the same effort.
ghost cell (halo cell) — a grid cell a process stores but does not own: a copy of a neighbouring subdomain's boundary data, kept so the stencil can reach across the subdomain edge without special-casing it. A process surrounds its owned block with a one-cell layer of ghost cells (a halo), refreshes it each step, and runs the ordinary interior update. Refreshing the halo each step is the halo exchange.
global order of accuracy (of an integrator) — the exponent $p$ in the error $O(h^p)$ at a fixed final time; specializes Chapter 22's order-of-accuracy idea to time-stepping. (Euler $p=1$, RK4 $p=4$.)
gprof — The GNU profiler: compile and link with -pg (keeping -O2 -g), run the program (which writes gmon.out), then run gprof exe gmon.out. It instruments procedure entry to count calls exactly and samples the program counter to estimate time, producing a flat profile and a call graph.
GPU (graphics processing unit) — a processor built around a very large number of simple cores that execute the same operation on many data elements simultaneously — a throughput-optimized, data-parallel machine, originally designed for graphics and now used for general numerical computation. Fast on wide, regular, data-parallel work; poor on small, branchy, or irregular work.
group — In HDF5, a container that holds datasets and other groups, named with filesystem-style paths (/fields/temperature). Every file has a root group /; a tree is built beneath it. Groups are HDF5's mechanism for hierarchy, the headline difference from NetCDF's flat model. Created with h5gcreate_f, opened with h5gopen_f, closed with h5gclose_f.
Gustafson's Law — for a problem whose size grows with the processor count so that per-processor work stays fixed, the scaled speedup is $S(N) = s + (1-s)N$, where $s$ is the serial fraction of the parallel run. Linear in $N$ with no ceiling; governs weak scaling. Answers "how much bigger a problem in the same time?" rather than Amdahl's "how much faster for a fixed problem?"
H
halo exchange — the act of refreshing every process's ghost (halo) cells each step by swapping boundary rows with neighbouring subdomains; in the project, two mpi_sendrecv calls (up and down), deadlock-free, with MPI_PROC_NULL neutralising the physical edges.
HDF5 — Hierarchical Data Format version 5: a self-describing, portable, binary format and library for large, complex scientific data, maintained by The HDF Group. Its model is a filesystem inside a file — a tree of groups (like directories) containing datasets (typed, multidimensional arrays) and attributes (metadata on any object). It is the standard for large simulation output and the storage layer beneath NetCDF-4. Fortran uses the hdf5 module and the h5*_f interface: subroutines whose last argument is an error flag (hdferr), bracketed by h5open_f/h5close_f, with opaque handles of kinds hid_t (objects) and hsize_t (sizes) that must each be closed by hand.
high-level language — a programming language that expresses computation in human-meaningful abstractions (variables, expressions, loops, procedures) rather than a specific processor's raw instructions; Fortran was the first to win broad adoption.
high-performance computing (HPC) — the use of the most powerful available computers, typically clusters of many thousands of processor cores, to solve problems too large or too slow for an ordinary machine.
host — in accelerator programming, the CPU and its main memory (RAM), which runs the main program, does the serial work and I/O, and issues commands to the device.
host association — the mechanism by which an internal procedure can directly read and write the variables of its host program unit without them being passed as arguments.
host–device transfer — the copying of data across the bus connecting CPU and GPU (host→device before a kernel, device→host after). Its bandwidth is much lower and latency much higher than either processor's access to its own memory (commonly ~10–30× slower), so it is usually the dominant cost in a GPU program — hence the first rule of GPU performance: minimize transfers by keeping data resident on the device.
hot loop — The small region of code, very often a single innermost loop, where a program spends the large majority of its time (the "hot spot"). Numerical codes are highly concentrated this way; finding and optimizing the hot loop captures nearly all available speedup, and optimizing elsewhere is wasted effort.
HPC engineer — sometimes "performance engineer" or "scientific software engineer": the person brought in to make a code run faster, scale to more nodes, or move onto a GPU. Lives in Parts VII–VIII (profiling, optimization, OpenMP/MPI/coarrays/GPU).
I
IEEE 754 — the international standard for binary floating-point arithmetic (1985; revised 2008, 2019). It fixes how reals are encoded in bits, how many bits each format uses, how operations round, and what happens in exceptional cases, giving bit-for-bit reproducibility across conforming machines. Fortran's real kinds are IEEE 754 formats.
if construct — a block of the form if (condition) then … end if that runs its enclosed statements only when the logical condition is true; may include else if (condition) then branches (tested in order) and a final else. At most one branch executes.
image — one of the several concurrent instances of a coarray program that execute together, each running the same executable with its own complete private set of variables. Images are numbered 1 to num_images(); the executing image's number is this_image(). The image is Fortran's unit of parallelism, the counterpart of an MPI rank or an OpenMP thread, but built into the language rather than a library.
implicit method — an integrator that defines the new state in terms of the RHS at the new state (e.g. backward Euler, $y_{n+1} = y_n + h f(t_{n+1}, y_{n+1})$), requiring an equation solve per step.
implicit none — a statement placed at the top of every program, module, and procedure (right after the opening program/module/subroutine/function line) that switches off implicit typing and requires every variable to be explicitly declared; with it in force, using an undeclared name is a compile-time error rather than a silently invented variable. The single most important defensive habit in Fortran.
implicit scheme — A time-stepping scheme whose update involves the unknown new values on both sides, so each step requires solving a coupled linear system. Costlier per step (a linear solve) but typically unconditionally stable (no timestep limit).
implicit typing — the FORTRAN convention by which an undeclared variable's type is set by the first letter of its name: names beginning I–N are INTEGER, all others are REAL. Summarized "I through N are integers." A variable comes into existence, typed by its initial, the first time it is used; modern Fortran disables this with implicit none.
implied-do — a loop-like generator inside an array constructor, e.g. [(i*i, i = 1, 5)], which produces [1, 4, 9, 16, 25].
incremental modernization — transforming a working program through a series of small, individually verified changes — compiling and re-running its tests after each one — so the code stays correct and buildable at every step; the opposite of a "big-bang" rewrite.
index — index(string, sub[, back]), the 1-based position where sub first occurs in string, or 0 if it does not occur; with back=.true., the position of the last occurrence. It returns a position, not a boolean — test > 0 for "present."
Inf — a signed infinity, the result of overflow or of a nonzero number divided by zero; obeys sensible rules ($\infty+1=\infty$, $1/\infty=0$) and compares greater than every finite number.
initial-value problem (IVP) — a first-order ODE $\frac{dy}{dt} = f(t, y)$ together with an initial condition $y(t_0) = y_0$; the standard form solved by marching a numerical integrator forward in time.
inlining — the optimization that replaces a call to a procedure with a copy of the procedure's body pasted into the caller. Removes call overhead and, more importantly, lets the compiler optimize the pasted-in code together with its surroundings (constant propagation, vectorization across the former call boundary). Often the enabling optimization. gfortran inlines small procedures at -O2, more aggressively at -O3.
inquire — a statement that asks the runtime about the state of a file or unit without transferring data: exist=, opened=, number=, size=, iolength=, and more.
integer division — division of two integers with /, which computes the mathematical quotient and then discards the fractional part, truncating toward zero: 7/2 is 3, 1/2 is 0, -7/2 is -3. The remainder is obtained separately with mod or modulo.
intent — an attribute on a dummy argument declaring how the procedure uses it: intent(in) (read-only), intent(out) (write-only; undefined on entry), or intent(inout) (read and write). The compiler enforces the declared intent — a safety feature most languages lack.
internal file — a character variable used as the unit of a read or write statement. write(s, fmt) values formats numbers into the string s; read(s, fmt) vars parses the characters of s into variables. No disk file is involved — the string is the file — and the full set of Chapter 7 edit descriptors applies. Fortran's in-memory bridge between numbers and text.
internal procedure — a procedure defined after a contains statement inside another program unit; it has an explicit interface automatically and can access the host's variables via host association.
interoperable derived type — a derived type declared with the bind(c) attribute (type, bind(c) :: t), laid out by the compiler with the same field order, padding, and alignment as the equivalent C struct. Its components must all be of interoperable type and kind; it may not have allocatable or pointer components, type-bound procedures, or the sequence attribute.
intrinsic function — a function built into the language itself, always available without being written by the programmer or imported from a library (e.g. sqrt, sin, abs, mod, modulo, real, selected_real_kind); the compiler supplies the implementation and can often optimize it specially.
iomsg — an optional specifier that fills a character variable with a human-readable description of an I/O failure, paired with iostat.
iostat — an optional specifier on an I/O statement that stores an integer status instead of aborting on error: zero on success, negative at end-of-file or end-of-record (compare against iostat_end/iostat_eor from iso_fortran_env), positive on error.
iso_c_binding — an intrinsic module (requested with use, intrinsic :: iso_c_binding) that supplies the named kind parameters, derived types, and procedures needed to interoperate with C. Its exports include the C-interoperable kinds (c_int, c_double, c_char, …), the c_ptr/c_funptr types, the null constants (c_null_ptr, c_null_char), and the procedures c_loc, c_f_pointer, c_associated, and c_sizeof. Introduced in Fortran 2003.
K
kernel — a procedure that runs on the device, executed simultaneously by many GPU threads (one thread per data element). In CUDA Fortran a kernel is a subroutine marked attributes(global) (called from the host, run on the device); every thread runs the same body but computes its own index and operates on its own data.
keyword argument — an actual argument named explicitly at the call site (factor=0.5_dp), allowing arguments to be passed out of order and optionals to be skipped; every argument after the first keyword must also be keyword. Requires an explicit interface.
kind parameter — an integer that selects one of an intrinsic type's variants (which differ in storage size and therefore in range and precision); written in parentheses after the type, as in real(dp) or integer(i64). The default kind is whatever the compiler chose, which portable numerical code should not depend on.
L
LAPACK — the Linear Algebra PACKage: a large numerical library, written in Fortran, that solves the standard problems of dense linear algebra — factoring matrices, solving systems $A\mathbf{x}=\mathbf{b}$, computing eigenvalues and singular value decompositions. It is built on top of BLAS and is the library under NumPy, MATLAB, and R. (Named here; called directly in Chapter 21.)
LAPACK routine naming — the systematic scheme by which every LAPACK routine name encodes its function in a few letters: a precision prefix (s real single, d real double, c complex single, z complex double), then a two-letter matrix type (ge general, sy symmetric, po symmetric positive-definite, gt general tridiagonal, tr triangular, he Hermitian, …), then a short computation code (sv solve, trf LU/Cholesky factorization, trs solve using the factors, ev eigenvalues, svd singular value decomposition, gels least squares). Thus dgesv = double + general + solve; dsyev = double + symmetric + eigenvalues; dgesvd = double + general + SVD.
leading dimension (lda, ldb) — the first dimension of a two-dimensional array as it is declared in memory, which in Fortran's column-major layout is the stride between the start of one column and the next. It is not necessarily the number of rows in use: solving the top-left n×n block of a real(dp) :: a(100,100) array requires lda = 100, the declared first dimension, not n. Passing the wrong leading dimension silently addresses the wrong elements rather than crashing.
legacy code — working, deployed, often old software that an organization depends on and must keep running; in scientific computing, frequently synonymous with "validated," "trusted," and "irreplaceable."
legacy VTK (STRUCTURED_POINTS) — the older, positional, human-readable .vtk text format for a uniform grid: five mandatory parts in fixed order — the magic string # vtk DataFile Version 3.0, a title line, ASCII/BINARY, DATASET STRUCTURED_POINTS with DIMENSIONS/ORIGIN/SPACING, and POINT_DATA with SCALARS/LOOKUP_TABLE and the values. Order and spelling are exact; the reader parses positionally.
len_trim — the intrinsic giving a string's length excluding trailing blanks (0 for an all-blank string); usually what you mean when you ask "how long is the content?"
LFortran — a modern, LLVM-based Fortran compiler that can also run Fortran interactively, statement by statement, and powers the fortran-lang browser playground. (Named here as part of the community; defined and developed fully in Chapter 39.)
linker — the program that combines one or more object files with the libraries they depend on into a complete executable, resolving every reference from one piece to another. gfortran invokes it automatically unless told to stop after compiling with -c. A failure at this stage (e.g. "undefined reference to …") is a linker error, distinct from a compile error.
list-directed I/O — input or output in which the processor chooses the formatting, selected by writing * in place of a format: print *, x, read *, x. Quick to write and uncontrolled in layout; list-directed output emits one leading blank.
logical — an intrinsic type holding a truth value, either .true. or .false.; printed as T or F under the l edit descriptor.
logical operator — an operator that combines logical values: .and. (both true), .or. (either true), .not. (negation), and .eqv. / .neqv. (equivalence / exclusive-or). The dots are part of the spelling.
loop fission — A loop transformation that splits one loop into two or more over the same range, each doing part of the original body. Used to isolate a vectorizable portion from one that blocks vectorization (a call, a data-dependent branch), or to relieve register/cache-stream pressure. Also called loop distribution; the inverse of fusion.
loop fusion — A loop transformation that merges two adjacent loops running over the same index range into a single loop, so each data element is touched once instead of once per loop. Cuts memory traffic and loop overhead and often eliminates a temporary array. Also called loop jamming.
loop unrolling — the optimization that does several iterations' worth of a loop's work per pass, reducing per-iteration bookkeeping (counter increment, bound test, branch) and exposing more independent operations. Notably, gfortran does not unroll at any -O level by default — you request it with -funroll-loops (or it comes on under profile-guided optimization).
M
machine epsilon — written $\varepsilon_{\text{mach}}$, the gap between 1.0 and the next larger representable number; $2^{-52} \approx 2.22\times10^{-16}$ for double, $2^{-23} \approx 1.19\times10^{-7}$ for single. Returned by epsilon(x) (only the kind of x matters). It is the relative resolution of the format.
memory-bound — describing a loop whose speed is limited primarily by how fast data moves between memory and the CPU, not by how much arithmetic it performs. Most dense array kernels are memory-bound, because floating-point units are far faster than main memory; the way to speed such a loop up is to move less memory (better loop order, blocking), not to do less arithmetic. Contrast compute-bound. (Compute- vs memory-bound is developed further in Ch. 28.)
memory-bound / compute-bound — A kernel is memory-bound when its arithmetic intensity is low enough that it hits the memory-bandwidth ceiling before the arithmetic ceiling (optimize by moving less data); compute-bound when high intensity lets it hit the arithmetic ceiling (optimize by keeping the arithmetic units fed).
method of lines — solving a time-dependent PDE by discretizing the spatial derivatives on a grid while keeping time continuous, producing a large system of ODEs (one per grid point) to be time-stepped.
mixed-mode arithmetic — an arithmetic expression whose operands are of different types. For each binary operation Fortran promotes the lower-ranked operand to the higher type (integer → real → double precision → complex) and computes in that higher type; crucially, the type of a subexpression is fixed by its own operands, not by where the result is assigned.
module — a program unit (module name … end module name) that packages related definitions — named constants, variables, derived types, and procedures — so other program units can access them via use. A module is not a program and runs nothing on its own; it is a library of definitions.
module map — the dependency graph of a code's modules (who uses whom), which is also its compile-order graph and its layering; the codebase's true, compiler-enforced table of contents.
module procedure — a subroutine or function defined after a module's contains statement. Because it lives in a module it carries an explicit interface for every user, and it may be public or private.
module variable — a variable declared directly in a module (not inside one of its procedures). It has the save attribute implicitly (persists for the whole run, initialized once) and is shared by every procedure that can see it; best kept private and mutated only through public procedures.
MPI (Message Passing Interface) — a standardised library (first standardised 1994) for distributed-memory parallel programming, in which many independent processes, each with private memory, coordinate by explicitly sending and receiving messages. Not part of any language; a specification with Fortran/C/C++ bindings, implemented by libraries such as Open MPI and MPICH. Used from Fortran via use mpi (or use mpi_f08) and mpi_* calls. The dominant substrate of large-scale scientific computing.
MPI-IO — the part of the MPI standard for parallel file I/O: all processes write to (or read from) a single shared file concurrently, each into its own region, so output does not funnel through one rank. Usually used through a self-describing library (parallel HDF5 / parallel NetCDF) built on it.
mpif90 (mpifort) — the MPI Fortran compiler wrapper: it calls the underlying Fortran compiler (usually gfortran) with all MPI include and library flags added automatically; used exactly like gfortran. Launch the resulting program with mpirun -np N.
N
name mangling — a compiler's transformation of a source-level procedure or variable name into the decorated symbol that actually appears in the object file and linker (with gfortran: foo → foo_, and module m's foo → __m_MOD_foo). It differs between compilers and from C, which is why bind(c) — giving a chosen, un-mangled symbol — is needed for a C caller to find a Fortran routine.
named construct — any do, if, or select case given a name (name: do … / end do name); exit name and cycle name then act on the named construct, the only clean way to break out of or continue an outer loop from inside an inner one.
namelist — a statement associating a group name with a list of variables (namelist /config/ nx, alpha) so that one read(unit, nml=config) parses a &config nx=100, alpha=1e-4 / block, matching values to variables by name, case-insensitively, in any order, with omitted names left unchanged. Fortran's built-in configuration-file format.
NaN — "Not a Number," the result of an undefined operation ($0/0$, $\infty-\infty$, $\sqrt{-1}$ in real arithmetic). It is contagious (any arithmetic with it yields NaN) and not equal to anything, including itself — so x /= x (or ieee_is_nan(x)) detects it.
NetCDF — Network Common Data Form: a self-describing, portable, binary data format and library for array-oriented scientific data, created and maintained by Unidata (UCAR). Its data model is small — a file holds named dimensions (lengths), variables (arrays declared over dimensions, with an element type), and attributes (metadata key/value pairs on a variable or, via NF90_GLOBAL, on the whole file). It is the de facto standard for climate, weather, and ocean data. Fortran uses the netcdf module and the nf90_* interface, every routine of which returns an integer status code (nf90_noerr == 0). NetCDF-4 stores its data inside an HDF5 file.
Neumann boundary condition — A boundary condition that fixes the normal derivative (gradient) of the field on the boundary ($\partial u/\partial n = q$). The common zero-flux ("insulated") case is coded by setting the edge equal to its inward neighbour, e.g. u(1) = u(2).
non-blocking communication — an MPI operation (mpi_isend, mpi_irecv) that initiates a send or receive and returns immediately, handing back a request handle; the data is unsafe to use until completed with mpi_wait/mpi_waitall. The point is overlap: independent work done between the initiate and the wait hides the communication cost.
numerical equivalence — the property that two programs produce the same results on a given input, either bit-for-bit identical (every floating-point value equal to the last bit) or identical to within a stated tolerance ("close enough").
numerical stability — a property of an algorithm: how much error it adds beyond what the problem's conditioning forces. A stable algorithm is about as accurate as the conditioning allows; an unstable one manufactures extra error (typically through internal cancellation), returning poor results even for well-conditioned problems.
O
object file — the output of compiling a single source file: a file conventionally ending in .o (gfortran produces .o on every platform, including Windows; some Windows-native compilers use .obj instead) containing the source translated into machine instructions but not yet a runnable program, because references to things defined elsewhere (the print runtime, routines in other files) are not yet resolved. Produced on its own with gfortran -c.
offload — to move a portion of a program (typically a data-parallel loop or kernel and the data it needs) from the host to the device for execution, then bring the results back. A GPU program is a host program that offloads its hot parallel regions while keeping serial control flow and I/O on the host.
OpenACC — an open standard for directive-based parallel programming of accelerators. Ordinary Fortran is annotated with !$acc comment-directives that an OpenACC-aware compiler turns into device offload (data movement + parallel kernels). Portable, incremental, and — like OpenMP directives — ignorable by a non-OpenACC compiler, which then runs the code on the CPU.
OpenMP — Open Multi-Processing: a standard set of compiler directives (in Fortran, comments beginning !$omp), library routines (omp_lib), and environment variables for shared-memory parallel programming in Fortran, C, and C++. Because the directives are comments, the same source compiles as correct serial code without -fopenmp and as parallel code with it. Defined by the OpenMP Architecture Review Board.
optimization level — the -O flag controlling how hard the compiler optimizes: -O0 (none, debuggable), -O2 (the safe, IEEE-clean production workhorse), -O3 (adds auto-vectorization and aggressive inlining), -Ofast (-O3 plus -ffast-math, which reorders floating-point arithmetic and can change results).
optimization report — diagnostic output the compiler emits on request describing which optimizations it applied to which source lines, and — often more usefully — which it declined and why. In gfortran, the -fopt-info family: -fopt-info-vec (loops vectorized), -fopt-info-vec-missed (loops not vectorized, with reason), -fopt-info-optimized, -fopt-info-inline, -fopt-info-all. Intel's equivalent is -qopt-report; NVIDIA's nvfortran uses -Minfo.
optional argument — a dummy argument with the optional attribute that the caller may omit; inside the procedure, the intrinsic present(arg) reports whether it was supplied. Requires an explicit interface.
order of accuracy — the exponent $p$ in a method's error model $E(h) \approx C h^p$ as $h \to 0$. Measured numerically by halving $h$ and confirming the error ratio approaches $2^p$ (2 for first order, 4 for second, 16 for fourth).
overflow — when a result's magnitude exceeds the largest finite representable number (huge); under IEEE 754 the result becomes a signed infinity (Inf).
P
parallel efficiency — the speedup divided by the processor count, $E(N) = S(N)/N$; the fraction of each processor that is actually being used. Perfect (linear) speedup corresponds to $E = 1$.
parallel region — the block of code between !$omp parallel` and `!$omp end parallel, executed by every thread of the forked team. Serial code outside such regions runs on the master thread only.
parameter — an attribute declaring a named constant whose value is fixed at compile time and can never be reassigned (an attempt to do so is a compile-time error); because the value is known at compile time it is folded into the generated code at no run-time cost. Used for dp, physical constants, and fixed sizes.
parameterized derived type (PDT) — a derived type carrying type parameters written in parentheses after its name: a kind parameter (integer, kind, a compile-time constant such as a precision) and/or a length parameter (integer, len, fixed when an object is created, such as an array extent). Standard since Fortran 2003, but the modern feature whose compiler support has most lagged (gfortran's has long-standing bugs).
partial differential equation (PDE) — An equation relating a function of several variables to its partial derivatives (rates of change with respect to each variable separately). Where an ODE governs a function of one variable, a PDE governs a field spread over space that also evolves in time. Examples: the heat, wave, and fluid-flow equations.
passed-object dummy argument — the dummy argument of a type-bound procedure that automatically receives the invoking object; it must be declared polymorphic (class(name), never type(name)). Its identity is controlled by pass (default: the first dummy), pass(name) (a named dummy), or nopass (no object passed).
periodic boundary condition — A boundary condition that wraps the domain so the last point's neighbour is the first ($u_{n+1} \equiv u_1$), modelling a representative patch of a large uniform system without edges. Coded with modulo neighbour indexing.
pFUnit — a unit-testing framework for Fortran developed at NASA's Goddard Space Flight Center, designed for scientific computing and able to run tests in parallel under MPI. The lighter, fpm-native test-drive is a common alternative for smaller projects. (Used in Chapter 37.)
physics module — a module that encodes one piece of the science — a single physical process or term in the governing equations — as procedures computing it, ideally pure functions of their inputs (e.g. diffusion, advection). In the project, the five-point Laplacian is the physics.
point-to-point communication — the exchange of a message between exactly two processes: one calls a send operation naming the receiver, the other a matching receive naming the sender. The fundamental building block of MPI; core pair mpi_send/mpi_recv.
POINT_DATA — the legacy-VTK section declaring that the following arrays hold one value at each grid point; its count must equal nx*ny*nz (the number of points, which is what DIMENSIONS gives). Contrast CELL_DATA (one value per cell), used by finite-volume schemes; finite-difference nodal values are point data.
pointer — a variable declared with the pointer attribute that holds no value of its own but can be associated with (made an alias for) another object, or with a block of memory obtained by allocate. It is dereferenced automatically — using the pointer's name uses its target — and a pointer to an array carries that array's shape and bounds.
pointer aliasing — the situation in which two names refer to the same region of memory. Fortran assumes procedure arguments do not alias, which frees its compiler to optimize aggressively; C added the restrict keyword to let programmers make the same promise.
pointer assignment — association of a pointer with a target using the => operator (p => a), which makes the pointer an alias for the target and changes what the pointer refers to. It is distinct from value assignment =, which — for an associated pointer — copies a value through the pointer into its current target.
polymorphism — the ability of one piece of code to operate on values of different types through a common interface, with the specific behavior chosen by each value's dynamic type. A call on a polymorphic object dispatches to the procedure of whatever type it currently holds.
private — an attribute/statement making a module entity visible only inside the module. A bare private (no list) sets the module's default to hidden, so only entities explicitly marked public escape — the recommended "hide by default, expose on purpose" idiom.
procedure pointer — a pointer that is associated with a procedure rather than data, declared against an interface, so that one call site can invoke different procedures chosen at run time (the callback pattern).
profile-guided optimization (PGO) — A two-phase build: first compile an instrumented binary and run it on representative input to record which branches, functions, and loops are actually hot; then recompile using that recorded profile so the optimizer's branch-layout, inlining, and hot/cold decisions are informed by real behavior rather than guessed. Helps branchy code; little help for a branch-free numerical kernel.
profiling — Measuring where a running program spends its resources (time, memory traffic, cache misses) so you can find the small part of the code that dominates the cost. A profiler answers "where does the time go?", as opposed to a timer, which answers only "how long did this region take?".
provenance (used) — The record of how a result was produced: the code (commit), compiler and version, flags, inputs, library versions, seeds, and processor count.
public — an attribute/statement making a module entity visible to any unit that uses the module. public :: a, b exposes exactly the named entities.
pure — a procedure attribute promising the procedure has no side effects (no I/O, no modifying global state); all dummy arguments of a pure function are intent(in). Lets the compiler reorder, hoist, deduplicate, or parallelize the call.
PVD — a ParaView collection file (.pvd): a small XML file mapping each data file to a physical timestep value. Opening the single .pvd loads the whole series with correct physical times on the slider, decoupling physical time from the file index.
Q
quadrature — the numerical approximation of a definite integral $\int_a^b f\,dx$ by a weighted sum $\sum_i w_i f(x_i)$ over a finite set of nodes $x_i$ with weights $w_i$. The word (from "constructing a square of equal area") is the classical term for finding area under a curve; a quadrature rule is defined entirely by its nodes and weights.
R
rank — the number of dimensions of an array: a vector has rank 1, a matrix rank 2; Fortran allows up to rank 15.
record — the atomic chunk a single I/O statement transfers: one line for a text file, one write's worth of bytes for unformatted data.
recursion — a procedure that calls itself; in Fortran it must use a result clause, and (before Fortran 2018's default) be marked recursive.
reduction — a reduction(op:var) clause that combines per-thread contributions under an associative operator op (+, *, max, min, .and., .or., …). Each thread gets a private copy of var initialized to the operator's identity, accumulates into it without contention, and the runtime combines the private copies into the single shared var at the region's end — giving parallel accumulation with no race and no explicit synchronization.
refactoring — a change to the form of code that leaves its observable behavior unchanged; a change that alters the answer is by definition not a refactoring but a bug.
regression test — a test that runs a program on a fixed input and compares its output against a stored "golden" reference (captured from the trusted version), reporting failure if they differ by more than an allowed amount; in a migration, the reference is the original program's output.
relational operator — an operator that compares two values and yields a logical: == (equal), /= (not equal), <, <=, >, >=.
reproducibility — The property that a computational result can be regenerated from the recorded materials — the same code, inputs, build, and environment producing the same result (bit-for-bit or within a stated tolerance); what makes a computational result checkable, and therefore scientific. Its failure mode is "it works on my machine."
reproducible build — A build whose exact inputs — compiler name and version, every flag, the target
architecture, and linked library versions — are recorded precisely enough that another person (or you,
later) can reconstruct the same binary and reproduce the same results. The intrinsics compiler_version()
and compiler_options() let a binary stamp its own recipe into its output.
research software engineer (RSE) — a professional who combines genuine software-engineering expertise with enough research understanding to build and maintain the software that research depends on. A recognized and growing career track, with its own professional societies (the Society of Research Software Engineering, US-RSE) and, increasingly, its own job ladder at universities and labs. Sits at the software end of the spectrum: the science sets the requirements; the engineering — architecture, testing, performance, reproducibility — is the craft.
Richardson extrapolation — combining two approximations of different step size to cancel the leading error term: for a method of order $p$, $(2^p A(h/2) - A(h))/(2^p - 1)$ removes the $h^p$ term, yielding a higher-order estimate. Applied to the trapezoidal rule at halved steps it is Romberg integration.
right-hand-side function (RHS) — the function $f(t, y)$ in $y' = f(t, y)$ giving the instantaneous rate of change of the state; the whole physics of the problem, passed to a solver as a procedure argument.
RK4 (classical fourth-order Runge-Kutta) — the four-stage method with weights $\frac16,\frac13,\frac13,\frac16$; global error $O(h^4)$; the default general-purpose ODE integrator.
roofline model — A performance model plotting a kernel's achievable rate against its arithmetic intensity under two ceilings — memory bandwidth and peak arithmetic rate — so a kernel runs at whichever ceiling it hits first. It tells you which optimizations can possibly help: reduce memory traffic under the memory ceiling, feed the arithmetic units under the compute ceiling.
round-off floor (in numerical differentiation) — the smallest useful step size for a finite-difference derivative: because the numerator subtracts near-equal values (catastrophic cancellation, Ch. 20), round-off error grows like $\varepsilon/h$ while truncation falls like $h^p$, so total error is U-shaped with an optimal step $h^* \sim \sqrt\varepsilon$ (forward) or $\varepsilon^{1/3}$ (central). Below $h^*$ a smaller step makes the derivative worse.
Runge-Kutta method — a family of one-step integrators that evaluate the RHS at several intermediate stages within a step and combine those slopes with fixed weights; higher order than Euler for a few extra evaluations.
S
scan — scan(string, set[, back]), the position of the first character of string that is a member of set (or 0 if none); with back, the last. Used to find a delimiter, a digit, any character from a set.
scheduling — the policy by which a work-sharing loop assigns iterations to threads, set with schedule(kind[,chunk]). static divides the range into equal chunks once, before the loop, and is cheap and reproducible (best for uniform work); dynamic lets threads grab chunks at run time as they finish (self-balancing, best for uneven work); guided is dynamic with shrinking chunk sizes.
select case — a control construct that evaluates one discrete expression (integer, character, or logical — never real) and runs the single case block whose label matches; labels may be a value, a list, or a range (case (60:69)), with an optional case default. It has no fall-through, and its labels must be disjoint.
selected_int_kind — the intrinsic function selected_int_kind(r) that returns an integer kind parameter able to represent every integer with up to r decimal digits (e.g. selected_int_kind(18) yields a 64-bit integer kind).
selected_real_kind — the intrinsic function selected_real_kind(p, r) that returns a real kind parameter guaranteeing at least p decimal digits of precision and a decimal exponent range of at least r; it returns a negative value if no available kind can satisfy the request. Its integer cousin is selected_int_kind(r).
self-describing format — A file format that stores, alongside the data, enough metadata to interpret the data with no external information: each array's shape and rank, its numeric type and byte order (endianness), variable and dimension names, and arbitrary user attributes. A program that has never seen the writing code can open a self-describing file and discover what is inside it. NetCDF and HDF5 are the two dominant self-describing formats in scientific computing; a raw Fortran unformatted or stream file (Ch. 7) is the opposite — as mute as the bytes it contains, recording neither shape, type, nor byte order.
sequential access — the default file access mode, in which records are read and written in order, front to back.
shape — the list of all of an array's extents, one per dimension, given as a rank-1 integer array (e.g. an a(3,4) array has shape [3, 4]).
shared memory — a parallel model in which several threads read and write the same single address space; coordination happens implicitly through common variables rather than explicit messages. The model of the multiple cores within one node. Fortran tools: OpenMP, coarrays.
significand — (also mantissa) the part of a floating-point number carrying its significant digits, the $1.f$ in $\pm 1.f \times 2^{e}$. Its width sets precision: double's 53-bit significand gives about 16 decimal digits. The leading 1 of a normalized number is implicit ("hidden bit"), so 52 stored fraction bits buy 53 bits of precision.
SIMD — Single Instruction, Multiple Data: the class of CPU instructions that apply one operation to several data elements simultaneously (packed into a vector register). The hardware mechanism that vectorization targets; "32 byte vectors" = four real(dp) per instruction (AVX). Deeper treatment in Ch. 29.
SIMD (Single Instruction, Multiple Data) — A hardware capability in which one machine instruction applies the same operation to a whole small vector of operands packed into a wide register (a 256-bit AVX register holds four real(dp) values; 512-bit AVX-512 holds eight), so one SIMD add handles several element-adds at once.
Simpson's rule — quadrature that fits parabolas through pairs of panels: $S_n = \tfrac{h}{3}[f_0 + 4f_1 + 2f_2 + \cdots + 4f_{n-1} + f_n]$ ($n$ even). Error $-\tfrac{(b-a)h^4}{180}f^{(4)}$, so $O(h^4)$; exact for cubics.
solver module — a module that owns the numerical engine: the algorithm that advances or converges the solution (the time-stepping loop's machinery, the iteration scheme, the update rule). It knows how to advance a field, not where the field came from or where results go. In the project, heat_solver.
source tree — the directory hierarchy of a project's files, deliberately arranged in a well-organized code to mirror the module map (utilities at the bottom, driver at the top).
sparse format — a storage scheme that records only a matrix's nonzero entries plus index information, giving $O(n)$ memory for an $n$×$n$ matrix with $O(n)$ nonzeros instead of $O(n^2)$. Common formats: COO (coordinate — parallel arrays of row index, column index, value), CSR (compressed sparse row — values and column indices grouped by row, with a per-row start pointer), and CSC (the column-major analogue). Sparse matrices use dedicated direct (SuperLU, UMFPACK, MUMPS, PARDISO) or iterative (CG, GMRES) solvers, never the dense dgesv.
SPMD (Single Program, Multiple Data) — the model in which one program text is run by many processes at once, each specialising its behaviour by its rank (the if (rank == 0) branch is its signature). Almost all MPI programs are SPMD.
stability (numerical) — The property that errors already present in the solution (round-off, initial data) stay bounded as the scheme marches, rather than growing without limit. An unstable scheme amplifies errors geometrically until they overflow.
stat / errmsg (allocation) — optional specifiers on allocate and deallocate that turn a fatal memory error into a reportable value — the allocation counterpart of iostat/iomsg. stat=s sets the integer s to zero on success and a nonzero, processor-dependent value on failure (out of memory, an already-allocated or already-deallocated object); errmsg=msg fills a character variable with a description. Without stat, a failed allocation aborts the program. The portable test is s /= 0.
statement function — a single-statement function definition written among a routine's declarations, of the form name(args) = expression. Local to the routine that defines it, expanded like a formula wherever called; the lightweight ancestor of the modern internal procedure, now obsolescent.
stdlib — the Fortran standard library: a community-developed package of general-purpose routines the language's intrinsics do not cover (statistics, sorting, strings, text-table I/O, math helpers), organized into modules such as stdlib_stats and stdlib_io. It is not part of the ISO Fortran standard — it is a dependency you declare (via fpm) and build.
step doubling (Richardson error estimate) — estimating local error by comparing a step of size $h$ with two steps of size $h/2$: error $\approx (y_{\text{half}} - y_{\text{full}})/(2^p - 1)$.
step size ($h$) — the time increment $t_{n+1} - t_n$ taken by an integrator; smaller $h$ means more steps and (for a convergent method) less error.
stiffness — the property of an ODE system with widely separated time scales that forces an explicit integrator into tiny steps limited by stability rather than accuracy.
stream I/O — unformatted I/O with access='stream' (Fortran 2003): a pure byte stream with no record markers, addressable to the byte with pos=, used to interoperate with C, Python, and other non-Fortran readers.
strong scaling — a scaling experiment (and regime) in which the total problem size is held fixed while the processor count increases; speedup is measured and is governed by Amdahl's Law. Parallel efficiency necessarily falls as cores are added; good strong scaling is hard.
structure constructor — an expression that builds a value of a derived type by using the type's name as a function: point2d(3.0_dp, 4.0_dp) (positional) or point2d(x=3.0_dp, y=4.0_dp) (keyword). May be overloaded with a user-defined function via an interface named like the type.
structured grid — A mesh whose points form a regular array, so a point's neighbours are found by index arithmetic ($(i\pm1,j)$, $(i,j\pm1)$) with no stored connectivity. Maps directly onto a Fortran array; contrasts with an unstructured grid (arbitrary cells with explicit connectivity).
structured grid output — writing field values on a logically rectangular grid, where each point has an implied index (i, j, k) and neighbors are found by adding or subtracting one from an index, so the grid's connectivity is implicit and need not be stored. For a uniform structured grid (like the heat plate) even the point coordinates are implicit, recoverable from an origin and a spacing — so only the values are written. The opposite of unstructured output, where arbitrary point coordinates and every cell's connectivity must be written explicitly.
submodule — a program unit (submodule (parent) name) that supplies the bodies of separate module procedures whose interfaces are declared in its parent module (or an ancestor submodule). It is never used directly; it exists to separate implementation from interface, avoiding recompilation cascades and circular dependencies. It sees its parent's entities by host association.
subnormal — (denormal) a number in the gap between tiny and zero, represented by giving up the hidden leading 1 so leading significand bits may be zero; keeps underflow gradual, down to about $4.9\times10^{-324}$ for double, at some speed cost.
subroutine — a procedure invoked with the call statement that performs an action and returns results through its arguments; it may return zero, one, or many values.
substring — a contiguous piece of a string selected by a 1-based, inclusive position range: s(i:j) is characters i through j, a string of length j - i + 1. Omitting a bound means "to the end" (s(i:)) or "from the start" (s(:j)); if i > j the substring is zero-length. A substring of a variable is itself a variable (you can assign into it).
sync all — an image-control statement that acts as a barrier across every image: an image reaching sync all waits until all images have reached their own, establishing a shared ordering point so that anything written before it (on any image) is safe to read after it (on any image). It is the simplest and most common coarray synchronization and the correct default for making a "write then read remotely" sequence race-free.
T
target — the target attribute, given to an object so that a pointer may point at it. An object with neither target nor pointer may not be a pointer's target, which lets the compiler assume nothing aliases it and optimize accordingly.
task parallelism — performing different operations concurrently (e.g., reading the next file while computing on the current one); limited by the number of genuinely independent tasks, so it scales less far than data parallelism.
team — a named subset of images that, inside a change team block, behaves as a self-contained set of images: this_image() and num_images() report rank and count within the team, and coindexing refers to team members. Teams (Fortran 2018) let disjoint groups of images run different parallel computations concurrently — the classic use is a coupled atmosphere/ocean model — or decompose a problem hierarchically. Standard, but among the least-supported coarray features in current gfortran.
test oracle (used, not boxed) — A source of the known-correct answer a test compares against; in numerical code, drawn from exact special cases, invariants, symmetry, or convergence order (the "oracle problem" is that a direct oracle is often unavailable).
the 80/20 rule — The Pareto principle applied to performance: the large majority of a program's runtime is spent in a small minority of its code (often ~80% in ~20%, and frequently far more extreme in numerical software). The practical consequence: profile to find that small hot fraction and optimize only it. The whole-program speedup from speeding a fraction p by factor K is 1/((1-p) + p/K), capped at 1/(1-p).
the no-aliasing advantage — the optimization freedom a Fortran compiler gains from the standard's prohibition on argument aliasing: if a dummy argument is defined (written) within a procedure, the program may not have it associated with — aliased to — any other dummy argument or accessible entity the procedure also references. Because the standard makes non-aliasing the programmer's responsibility, the compiler may assume distinctness for free (no runtime check) and reorder, load, store, and vectorize freely. It is a language-level guarantee enforced by the standard's contract, not checked at run time; violating it is undefined behavior. This is the deepest reason Fortran generates fast numerical code, and the reason C added restrict. (First-defined here; foreshadowed informally as "pointer aliasing" in Ch. 1.)
the standards process (J3 / WG5) — the committee process by which Fortran evolves. WG5 (formally ISO/IEC JTC1/SC22/WG5) is the international working group that sets each revision's direction, scope, and schedule; J3 is the US Fortran committee (an INCITS committee, historically ANSI X3J3) that does the detailed technical drafting and processes feature papers. Anyone may propose a feature; proposals are debated, voted in, accumulated in a working draft, and published as an edition of ISO/IEC 1539-1. Revisions appear roughly every five years.
time-series output — a sequence of files, one per saved timestep, that a viewer loads together and plays as an animation. Each file is an ordinary field snapshot; what makes the set a movie is (a) a shared base name with a zero-padded, increasing index (heat_000000.vtk, heat_000100.vtk, …) so the viewer detects and orders the group by lexical sort, and (b) optionally a collection file naming each snapshot and its physical time.
tokenizer — a routine that splits a string into its meaningful units (tokens) separated by delimiters, treating a run of delimiters as a single separator. Built here from verify (find where a token starts) and scan (find where it ends).
tolerance — An allowed difference within which two floating-point results are treated as equal:
abs(a-b) <= tol (absolute) or abs(a-b) <= tol*abs(b) (relative); the robust default for numerical comparisons,
because arithmetic rounds.
TOP500 — the semiannual ranking of the world's fastest supercomputers by a standard benchmark; a common reference point for the state of HPC hardware.
translation dictionary — a categorized lookup mapping each FORTRAN 77 construct to its faithful modern-Fortran equivalent, so a legacy pattern can be replaced without re-deriving the modernization from first principles; the organizing device of this chapter and of Appendix E.
trapezoidal rule — quadrature that joins samples with straight lines: $T_n = h[\tfrac12 f_0 + f_1 + \cdots + f_{n-1} + \tfrac12 f_n]$. Error $-\tfrac{(b-a)h^2}{12}f''$, so $O(h^2)$; exact for linear integrands. The correct tool for sampled data (nodes fixed).
trim — the intrinsic returning a copy of a string with its trailing blanks removed (leading blanks kept); its length is len_trim. trim(adjustl(s)) removes blanks from both ends.
truncation error — the error a finite-difference or quadrature formula incurs by truncating the Taylor series — dropping the higher-order terms. Its leading power of $h$ is the method's order of accuracy. It is distinct from round-off error and would persist even on a machine with infinite precision.
two-language workflow — a program structured so a high-level interactive language (in scientific computing, almost always Python) handles everything except the numerical hot spot — input, orchestration, decisions, plotting, output — while a compiled language (Fortran or C) handles the small arithmetic-heavy kernel where nearly all the runtime is spent.
type extension — defining a new derived type that inherits all the components and type-bound procedures of an existing type (the parent), then adds its own and/or overrides inherited procedures; written with the extends attribute, type, extends(parent_t) :: child_t. The child is a parent.
type-bound procedure — a procedure attached to a derived type inside the type definition (procedure :: m => proc) and invoked through an object with the percent operator (object%m(args)); by default the object is passed automatically to the procedure as its first argument (the passed-object dummy). Fortran's spelling of a method, introduced in Fortran 2003.
U
ULP (unit in the last place) — the value of a one-bit change in the significand at a number's magnitude; returned by spacing(x). One ULP is a constant fraction (about $\varepsilon_{\text{mach}}$) of the number but a growing absolute amount as the number grows.
undefined (pointer status) — the status of a pointer that has never been initialized or nullified; querying it with associated is undefined behavior. Prevented by initializing every pointer => null() at declaration.
underflow — when a nonzero result is smaller in magnitude than the smallest normal number (tiny); it is represented as a subnormal with reduced precision, and flushes to zero if smaller still.
unformatted I/O — I/O that transfers a value's exact internal bytes with no character conversion, selected by form='unformatted'; you write(u) x and read(u) x with no format. Exact and fast; a traditional unformatted-sequential file wraps each record in length markers.
unit — an integer handle that names an open data channel; every read and write is directed at a unit. Units 5, 6, and 0 are conventionally standard input, output, and error; file units should be obtained with newunit.
unit roundoff — written $u$, the maximum relative error introduced by rounding a real to the nearest representable value; under round-to-nearest, $u = \varepsilon_{\text{mach}}/2 = 2^{-53}$ for double. Every basic floating-point operation has relative error at most $u$.
unit test — A small, automated check that exercises one unit of code (a single procedure or a few) in isolation, with known inputs, and verifies the expected output; fast, independent, and specific enough to localize a failure.
use — the statement that gives the current program unit access to a module's public entities. use m imports all of them; use m, only: a, b imports only the named ones (the preferred, self-documenting form); use m, only: x => a imports a under the new name x.
utility module — a module providing foundational, general-purpose support used throughout a code and specific to no single part of the science (precision kinds, physical constants, timers, logging, string helpers). Utility modules sit at the bottom of the dependency graph. In the project, kinds, constants, and timers.
V
validation — the process of confirming that the mathematical model itself adequately represents physical reality — "solving the right equations." Validation is about the model: it is established by comparing simulation results against experiment or observation. A code can be perfectly verified (it solves its equations correctly) yet invalid (those equations are the wrong description of the physical system), and vice versa.
value attribute — a dummy-argument attribute (real(c_double), value :: x) declaring that the argument is passed by value: the procedure receives a private copy, and changes to it are not seen by the caller. It is how a Fortran interface matches C's default by-value passing of scalars; it requires an explicit interface and may not be combined with intent(out)/intent(inout).
vectorization — the optimization that transforms a loop performing one operation per iteration into a loop performing that operation on several array elements at once, using the CPU's SIMD instructions (one instruction adding, e.g., four or eight pairs of doubles). The speedup is bounded by the vector width. Enabled in gfortran at -O3. Requires the compiler to prove the iterations are independent and the arrays do not alias — exactly the conditions Fortran's array structure and no-aliasing rule provide. Introduced here at intro level; the discipline of writing vectorizable code (alignment, cache blocking, do concurrent) is Ch. 29.
verification — Confirming that a code correctly solves the equations it claims to solve (the numerics are right), classically by comparison against an analytical solution and by checking convergence order; distinct from validation (that the equations describe reality).
verification and validation (V&V) — the paired discipline of establishing both that a code solves its equations correctly (verification) and that those equations describe reality (validation). In computational science a result reported without V&V is not yet trustworthy; the convergence study against an analytical solution is the canonical verification artifact.
verify — verify(string, set[, back]), the position of the first character of string that is not in set (or 0 if every character is in set); with back, the last. verify(s, set) == 0 is the idiom for "every character of s is drawn from set" (e.g., all digits).
VTI — VTK's XML ImageData format (.vti), the XML-era equivalent of the legacy STRUCTURED_POINTS dataset. Stores the same uniform grid (as WholeExtent of 0-based inclusive point indices, plus Origin and Spacing) and point data, but as well-formed XML that can carry compressed or binary payloads and parallel pieces.
VTK — the Visualization Toolkit, an open-source C++ visualization library, and (the sense used here) the family of file formats it defines for storing a dataset — a grid plus the field values on it — for viewers such as ParaView and VisIt. Two generations: the legacy format (a plain, human-readable .vtk text file) and the newer XML formats (.vti, .vtr, .vts, .vtu, plus parallel .p* variants) supporting compression and per-rank pieces. A VTK file stores data, not a picture; the viewer renders the picture on demand.
W
wall-clock time — Elapsed real time, as a stopwatch on the wall would measure it: how long you actually waited. Measured with system_clock. Contrast with CPU time.
warm-up — One or more untimed executions of the code run before timing begins, to pull data into cache, fault in memory pages, and bring the CPU to its steady operating frequency, so that the timed runs measure steady-state performance rather than start-up transients.
weak scaling — a scaling experiment (and regime) in which the problem size per processor is held fixed and the total problem grows with the processor count; run time is expected to stay roughly constant, governed by Gustafson's Law. Easier to achieve than strong scaling.
where — a construct performing a masked whole-array assignment: where (mask) … applies its array assignments only where the logical array mask is true, with an optional elsewhere (masked or not) for the remaining positions. The mask and arrays must be conformable.
whole-array operation — an operation written on entire arrays rather than individual elements; for conformable arrays a + b, a * b (elementwise), scalar broadcasts, and elemental intrinsics like sqrt(x) all act element by element with no explicit loop.
work sharing — dividing the execution of a code block among the threads of an existing team so the work is done once collectively rather than once per thread. Fortran's work-sharing constructs are !$omp do` (partition a loop's iterations), `!$omp sections (different blocks to different threads), !$omp single` (one thread runs it), and `!$omp workshare (partition whole-array statements). Each carries an implicit barrier at its end and must appear inside a parallel region.
workspace query — the LAPACK idiom for sizing a routine's scratch array: call the routine once with lwork = -1, whereupon it performs no computation but writes the optimal workspace size into work(1); the caller reads that value, allocates a work array of that size, and calls again for the real computation. Used by dsyev, dgesvd, dgels, and many others.