Skip to content

Compiling the code

Matt Hipsey edited this page Aug 30, 2026 · 2 revisions

Note

This page is a stub. The build options below are taken from build_glm.sh in the GLM 4 source, but the prerequisite lists and platform-specific notes still need to be written.

Once you have downloaded the code, the bundle is built from the glm-source directory:

cd glm-source
./build_glm.sh

Automated builds of this repository are performed by the GitHub Actions workflow at .github/workflows/compile.yml, which is the authoritative reference for a known-good build environment.

Build options

build_glm.sh accepts the following arguments:

Option Purpose
--help List available options
--auto-prereq Attempt to install prerequisites automatically
--with-aed / --without-aed Build with or without the AED water quality libraries
--with-aed-plus / --without-aed-plus Build with or without the additional AED modules
--with-lib / --without-lib Build GLM as a linked library
--no-gui Build without plotting/display support
--debug Build with debugging enabled
--mdebug Build with mixing debug output
--checks Enable runtime checks
--fence Enable memory fencing

A compiler is selected with one of --gfort, --ifort, --ifx, --clang or --flang.

Build configuration is otherwise controlled by build_env.inc and build_aedlibs.inc in glm-source. Use clean.sh to remove build artefacts.

Still to document

  • The prerequisite packages for each supported platform (notably NetCDF and the Fortran compiler).
  • Which compiler versions are currently known to work, and known-bad combinations.
  • Building on Windows.

Clone this wiki locally