Native Compilation of Delft3D-FLOW on Ubuntu and Linux Mint
A Jupyter Book Usage Note for `install-delft3d-flow-native.sh`
Delft3D-FLOW¶
This section describes a native installation procedure for compiling the Delft3D 4 hydrodynamic kernel on Ubuntu- and Linux Mint-based systems without using Docker. The procedure is implemented in the shell script install-delft3d-flow-native.sh. The script clones the Deltares Delft3D source repository, installs a local Python/Conan build environment, installs and configures Intel oneAPI compilers, initializes the open-source Conan dependency workflow, builds the Delft3D 4 suite or the flow2d3d target, copies the resulting installation tree to a user-defined prefix, and runs a smoke test with the standard Delft3D 4 example. The procedure should be regarded as an experimental host build because the documented Linux build procedure for Delft3D is container-based. The intended use is reproducible local experimentation, code inspection, and command-line execution of Delft3D-FLOW test cases on non-containerized engineering workstations.
Get Ready¶
The Delft3D repository contains source code for both Delft3D 4 and Delft3D FM. Delft3D-FLOW is part of the Delft3D 4 suite, for which the relevant build configuration is d3d4-suite. Within that suite, the principal Delft3D-FLOW binaries are d_hydro and flow2d3d. The build system also exposes flow2d3d as an individual configuration; however, the suite-level configuration is the more conservative target for a first installation because it preserves the expected Delft3D 4 runtime context.
The script is intended for the following operating conditions:
the user requires command-line Delft3D-FLOW execution on Linux;
Docker or another container runtime is undesired;
local compilation time (roughly one to several hours) and disk use (roughly 25 GB for oneAPI, sources, and build trees) are acceptable;
the host is an Ubuntu- or Linux Mint-derived system with
apt;Intel oneAPI compilers can be installed under
/opt/intel/oneapi;the user accepts that the procedure is outside the principal tested Linux pathway described by Deltares.
The procedure is not intended to install or run the Windows Delft3D graphical user interface. It installs command-line kernels and runtime files only.
To continue, download the installer script install-delft3d-flow-native.sh.
Provenance of the Procedure¶
The script follows the repository-level build sequence used by Deltares’ own helper tools. Third-party dependencies are managed with Conan 2, while run_conan.py performs one-time Conan configuration and build.py drives dependency installation, CMake configuration, compilation, and installation. For external users without access to the Deltares Nexus package server, the relevant initialization mode is:
python run_conan.py initialize externalThe corresponding first-time build compiles all third-party dependencies locally:
python build.py --config d3d4-suite --build --build-type Release --build-dependenciesThe native script automates these operations and adds the host-level preparation steps that would normally be supplied by the Deltares build container:
It installs the Intel oneAPI toolchain pinned to the versions used by the Deltares container and Conan profile: C/C++ and Fortran compilers 2024.2, Intel MPI 2021.13, and MKL 2024.2. If these pinned packages disappear from the Intel repository, the script falls back to the latest versions and patches the Conan configuration to accept the detected compiler version.
It creates a Python virtual environment inside the source tree with
conan ~= 2.29and a current CMake, because the Delft3D build requires CMake 3.30 or newer, which Ubuntu 24.04 and Linux Mint 22 do not ship.It exports the compiler environment used inside the Deltares container (
CC=mpiicx,CXX=mpicxx,FC=mpiifx) so that CMake configures Delft3D itself with the same toolchain as the Conan-built dependencies.
Installation¶
File Placement¶
Place the script in a working directory where shell execution is permitted. The following layout is recommended:
mkdir -p "$HOME/src/delft3d-native-installer"
cd "$HOME/src/delft3d-native-installer"
# copy or move the script here
ls -l install-delft3d-flow-native.shMake the script executable:
chmod +x install-delft3d-flow-native.shDefault Installation¶
The default invocation builds the Delft3D 4 suite in release mode, copies the resulting installation tree to $HOME/opt/delft3d-flow, and runs the standard example as a smoke test:
./install-delft3d-flow-native.shThe script asks for the sudo password when it installs system packages. The default values are summarized in Table 1.
Table 1:Default script options
Option | Default | Function |
|---|---|---|
|
| Location of the cloned Delft3D source repository. |
|
| Final installation/copy destination. |
|
| Delft3D 4 suite build, including Delft3D-FLOW. |
|
| Optimized CMake build type. |
|
| Parallel build level ( |
| not set | Uses the default branch unless a branch, tag, or commit is specified. |
| not set | Skips the smoke test with the standard example. |
Reproducible Installation¶
For hydraulic-engineering studies, the source revision should be fixed. A branch tip is not a reproducible model dependency. Use a release tag or commit hash where possible.
./install-delft3d-flow-native.sh \
--tag <Delft3D-tag-or-commit> \
--config d3d4-suite \
--build-type Release \
--prefix "$HOME/opt/delft3d-flow"Minimal FLOW-Oriented Build¶
If the objective is only to evaluate the flow2d3d build target, the script may be invoked as follows:
./install-delft3d-flow-native.sh --config flow2d3dFor first-time users, d3d4-suite remains the preferred trial because it is the suite-level target associated with Delft3D 4. The smaller flow2d3d target is more suitable after the host toolchain has already been shown to work.
Skipping Package Installation¶
On managed university or institute workstations, the user may not want the script to change system packages. Two reduced modes are provided.
Skip only the Intel oneAPI installation step:
./install-delft3d-flow-native.sh --skip-oneapi-installSkip all apt activity:
./install-delft3d-flow-native.sh --no-aptThese modes assume that the required compilers and build tools are already installed. In particular, the following commands must resolve after oneAPI initialization:
source /opt/intel/oneapi/setvars.sh --force
which icx icpx ifx mpiicx mpiifx mpicxxIf the preinstalled oneAPI version differs from 2024.2, the script patches the Conan profile and the allowed compiler versions automatically, but such a deviation moves the build further away from the Deltares baseline.
Launch and Test Delft3D-FLOW¶
Runtime Environment¶
After a successful build, the installation tree resides in the selected prefix (default $HOME/opt/delft3d-flow) and contains, among others, bin/run_dflow2d3d.sh, bin/d_hydro, and the flow2d3d shared libraries. The script writes an environment file to the prefix. Source this file in every new shell before running Delft3D-FLOW:
source "$HOME/opt/delft3d-flow/env.sh"This command reinitializes the Intel oneAPI runtime, sets DELFT3D_HOME, and puts the Delft3D binaries and libraries on PATH and LD_LIBRARY_PATH.
Test with the Standard Example¶
The installer already runs this test at the end of the build unless --no-test was given. To repeat it manually, use the standard Delft3D 4 example distributed with the repository (a tidal test case on the f34 curvilinear grid):
source "$HOME/opt/delft3d-flow/env.sh"
cd "$HOME/src/delft3d/examples/delft3d4/01_standard"
run_dflow2d3d.shrun_dflow2d3d.sh locates the installation relative to its own path and reads the model configuration file config_d_hydro.xml from the current working directory. The run takes seconds. Consider the test successful when all of the following hold:
The console output ends without error messages and the script returns exit code 0.
The history and map result files
trih-f34.dat,trih-f34.def,trim-f34.dat, andtrim-f34.defwere written to the example directory.The diagnostic file
tri-diag.f34contains no lines with*** ERROR.
A quick check:
ls -l trih-f34.* trim-f34.*
grep -i error tri-diag.f34 || echo "no errors in tri-diag.f34"A successful execution indicates that the binary, runtime libraries, and command-line launch script are mutually consistent on the host. It does not establish scientific validity for a project model. Hydrodynamic model validation remains case-specific and should include grid, bathymetry, boundary condition, roughness, process coupling, and calibration checks.
Run Your Own Model¶
To run a project model, place the Delft3D-FLOW input files (for example *.mdf, grid, bathymetry, and boundary files) together with a config_d_hydro.xml configuration file in a working directory, then launch:
source "$HOME/opt/delft3d-flow/env.sh"
cd /path/to/my-model
run_dflow2d3d.sh # uses config_d_hydro.xml
run_dflow2d3d.sh my_config.xml # or an explicit configuration fileThe config_d_hydro.xml file from examples/delft3d4/01_standard serves as a template; adapt the <mdfFile> entry to the name of the project .mdf file. For parallel runs with Intel MPI, the installation also provides run_dflow2d3d_parallel.sh, which accepts the number of processes and otherwise follows the same conventions.
Log Files¶
Each installer run writes a timestamped log file under:
$HOME/.cache/delft3d-native-buildIf the build fails, inspect the final portion of the log:
tail -n 120 "$HOME/.cache/delft3d-native-build"/build-*.logFor a deterministic diagnostic record, copy the log into the model or software provenance folder:
mkdir -p provenance/software
cp "$HOME/.cache/delft3d-native-build"/build-*.log provenance/software/Common Failure Modes¶
Table 2:Diagnostic interpretation
Symptom | Probable cause | Corrective action |
|---|---|---|
| Intel oneAPI compiler or MPI packages are absent, or | Reinstall the oneAPI compiler and |
| The system CMake shadows the virtual-environment CMake. | Rerun the script; it installs CMake into |
Conan reports | The installed oneAPI version is not whitelisted in | Let the script patch the profile and settings, or install the pinned oneAPI 2024.2 packages. |
Missing third-party package during Conan install. | External users must build dependencies locally. | Ensure the build command includes |
CMake configure fails after dependency installation. | Host libraries or compiler configuration differ from the Deltares Linux container baseline. | Review the first CMake error, not only the final build summary. |
| Runtime library path is incomplete. | Source |
Build succeeds, but results differ from another workstation. | Source revision, compiler version, dependency build, or runtime configuration differs. | Record the Git revision, script log, oneAPI version, and model input files. |
Interpretation of Success¶
The installation should be considered successful when all of the following conditions are met:
run_conan.py initialize externalcompletes without remote-credential errors.build.pycompletes the CMake build and install stages.The selected prefix contains
bin/run_dflow2d3d.sh.The standard Delft3D 4 example runs from a clean shell after
env.shis sourced and writes thetrih-f34.*andtrim-f34.*result files without errors intri-diag.f34.The build log, Git revision, and compiler versions are archived.
For computational hydraulics, binary availability is not equivalent to model validation. A defensible Delft3D-FLOW study should report the software revision, compiler environment, grid schematization, physical-process switches, boundary forcing, calibration data, and acceptance metrics.
Uninstallation¶
The script installs files in user-space by default. To remove the resulting installation and build cache:
rm -rf "$HOME/opt/delft3d-flow"
rm -rf "$HOME/src/delft3d/build_d3d4-suite_release"
rm -rf "$HOME/src/delft3d/.venv"
rm -rf "$HOME/.conan2"To remove the cloned source tree entirely:
rm -rf "$HOME/src/delft3d"System packages installed by apt, including the Intel oneAPI packages and the Intel APT repository entry in /etc/apt/sources.list.d/oneAPI.list, are not removed automatically. This is intentional because compilers, CMake, Python, Git, and oneAPI components may be shared by other numerical models.
Recommended Citation Record for Reports¶
A concise reproducibility statement may be included in project documentation:
Delft3D-FLOW was compiled natively on an Ubuntu/Linux Mint host using
install-delft3d-flow-native.sh. The script initialized the Delft3D external Conan workflow with Intel oneAPI 2024.2 compilers and Intel MPI 2021.13, built thed3d4-suiteconfiguration inReleasemode, and installed the command-line runtime under a user-space prefix. The Delft3D Git revision, Intel oneAPI compiler version, and build log were archived with the model provenance files.
References¶
Deltares. 2026. “Compiling Delft3D on Linux.” Delft3D GitHub repository documentation. doc
Deltares. 2026. “Getting started with code compilation and development.” Delft3D GitHub repository documentation. doc/development.md
Deltares. 2026. “build.py.” Delft3D GitHub repository. build.py
Deltares. 2026. “delft3d_alma8_intel_2024 Conan profile.” Delft3D GitHub repository. conan
Deltares. 2026. “buildtools.Dockerfile.” Delft3D GitHub repository. ci
Intel. 2026. “Install with APT.” Intel oneAPI Toolkit Installation Guide for Linux. https://
Intel. 2024. “Use the setvars and oneapi-vars Scripts with Linux.” Intel oneAPI Programming Guide. https://
MyST Markdown. 2026. “Callouts & Admonitions.” https://
Jupyter Book. 2026. “MyST Markdown overview.” https://