Fortran Tutorial

Fortran — born from John Backus’s 1953 IBM team, first compiler shipped 1957 — is the oldest still-active language and the undisputed workhorse of high performance computing. This track teaches modern Fortran through 2023: foundations, data and modules, reliability, the full parallel stack (OpenMP, coarrays, MPI, GPUs), Python integration, and an honest comparison with Rust and Zig.

Scope: Study the lessons in order, compile every example with gfortran, run the lab demos, and keep the official sources from the references page open.

Fortran Study Progress

0% Complete
# FORTRAN Topic Description
PHASE 1: LANGUAGE FOUNDATIONS
01Fortran OverviewSixty-five years of history, today's dominance, why it still wins.
02Setup & ToolchainCompilers, install, safety flags, and first fpm project.
03Fortran SyntaxFree vs fixed form, program units, statements, implicit typing trap.
04Type SystemIntrinsic types, KIND, portable precision with selected_real_kind.
05ExpressionsOperator precedence, logic, array expressions, intrinsics.
06Control FlowIF, SELECT CASE, DO loops, CYCLE/EXIT, DO CONCURRENT.
PHASE 2: PROGRAMMING
07Functions & SubroutinesINTENT contracts, optional and keyword arguments, pure/elemental.
08ArraysColumn-major layout, slicing, constructors, WHERE, allocatable.
09StringsDeferred-length characters, intrinsics, internal files, parsing.
10File Handling & I/OUnits, FORMAT, NAMELIST, access modes, iostat error handling.
11Derived TypesType definitions, % access, arrays of records, deep copy semantics.
12ModulesUSE/ONLY, visibility, generic interfaces, compile order, submodules.
PHASE 3: RELIABILITY & DATA
13PointersPOINTER and TARGET, pointer assignment, linked structures.
14Error HandlingExit codes, iostat/iomsg, IEEE traps, assertions, backtraces.
15Object OrientationType-bound procedures, inheritance, polymorphism, finalization.
16C Interoperabilityiso_c_binding, bind(c), C_LOC/C_F_POINTER, shared libraries.
PHASE 4: HPC & PARALLEL COMPUTING
17PerformanceOptimization flags, cache and SIMD, profiling, Amdahl's law.
18Parallel ComputingOpenMP fork-join, reductions, thread safety, choosing the model.
19CoarraysImages, cosubscripts, sync, teams, collectives in the standard.
20MPIRanks, send/receive, collectives, domain decomposition, hybrid.
21GPU ProgrammingOpenACC, OpenMP target, CUDA Fortran, data movement.
PHASE 5: ECOSYSTEM & PERSPECTIVE
22Python IntegrationF2PY zero-copy modules, ctypes, orchestrating simulations.
23Ecosystemfpm, stdlib, BLAS/LAPACK, netCDF/HDF5, testing, CI.
24Fortran vs Rust vs ZigIs Fortran a system language? The honest comparison table.
PHASE 6: PRACTICE & REFERENCE
25Lab ExamplesTwenty-two runnable demos with a code viewer, by category.
26Study ProjectsStatistics, OOP shapes, and heat diffusion in three parallel styles.
27References & ResourcesStandards, compilers, playgrounds, courses, HPC APIs, community.
Credits: Lesson content of this track is original; technical claims follow the ISO standard and the official sources. See the References page for the full categorized table with playgrounds, courses, and sample repositories.

Free References

Verified free resources to keep after finishing the track — the full categorized table lives on the References & Resources page.