Modern Fortran tour: 2008, 2018, 2023

2008: the parallel turn

The 2008 standard made parallelism a first class part of the language and added clear tools for concurrent loops and partitioned data.

Portable parallel loops became easy to write, and large machines could run the same standard source with different runtimes.

program concurrent_demo implicit none real :: a(5) integer :: i do concurrent (i = 1:5) a(i) = real(i) * 2.0 end do print *, a end program concurrent_demo

2018: polish everywhere

The 2018 standard polished many corners of the language: parallel features, interoperability details, and long standing rough edges.

For daily code this means fewer workarounds and cleaner interaction between teams, images, and procedures.

program polish_demo implicit none integer :: vals(3) vals = [10, 20, 30] print *, "size =", size(vals) print *, "sum =", sum(vals) end program polish_demo

2023: the latest standard

The 2023 standard is the latest published milestone in the Fortran timeline after 2008 and 2018.

Compilers implement new standards progressively, so check your compiler manual for the current support level and keep course code to widely supported constructs.

gfortran --version

GNU Fortran (Alpine 15.2.0) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.

Follow compiler support

Standards move first and compilers follow. Track support with the compiler release notes and the -std flag.

Write course code to the 2018 level by default, then enable newer options only when the target compiler is known.

gfortran -std=f2018 main.f90 -o main

A clean strict build prints nothing: the 2018 check passed. Feed it code from a later standard, such as the reduce clause of lesson 28, and the same command reports the line instead of building the program.

The code on this page was run with gfortran 15.2.0 on Alpine Linux 3.24 (x86_64) in a Docker container.

Article author: Arthur Isaev