Diego A. Casas

Delft3D 4 Compilation

 (updated )

Prerequisites

In order to compile Delft3D 4 kernels tag 142586, the following software is required:

  1. Visual Studio Community 2019 (version 16) with workload “Desktop development with C++” and the following additional components:

    • C++ MFC for latest v142 build tools (x86 & x64)
    • C++/CLI support for v142 build tools (Latest)
    • C++ Modules for v142 build tools (x64/x86 - experimental)
  2. Intel oneAPI Base Toolkit 2021. To save disk space, I only install the following components:

    • Intel oneAPI Math Kernel Library
    • Intel Distribution for GDB
  3. Intel oneAPI HPC Toolkit 2021. To save disk space, I only install the following components:

    • Intel MPI Library
    • Intel oneAPI DPC++/C++ Compiler & Intel C++ Compiler Classic
    • Intel Fortran Compiler (Beta) & Intel Fortran Compiler Classic

The components listed above do not guarantee a minimal installation (i.e., some of them may be unnecessary; feel free to test).

Update A person that followed this tutorial recently told me that the Intel oneAPI links were down. I have copies of the offline installers, so I shared them with the person. However, I do not know if Intel allows redistribution of the installers. Also, I noticed that Deltares is migrating from Subversion to Git; their Subversion repository may stop working.

Compilation

Compilation is straightforward thanks to the build.bat script:

Issues

If you find other installation issues, please let me know, and I will update the instructions.

Notes on compatibility

Intel oneAPI 2021 toolkits are incompatible with Visual Studio Community 2019 version 16.11.26 (released on April 11, 2023). Since the Community edition is only supported on the latest version (see Product Lifecycle and Servicing), Microsoft does not provide Community edition installers for earlier versions (e.g., 16.11.25, which is compatible). However, it is still possible to install earlier versions of the Community edition using the installers of other editions (Professional, Enterprise or BuildTools). See earlier Visual Studio 2019 releases and this Stack Overflow question.

The latest version of the Intel oneAPI 2021 toolkits is 2021.4. However, compilation of Delft3D 4 with 2021.4 toolkits seems to be unsupported. Version 2021.3 of the toolkits works without problems.

Delft3D 4 compilation requires Intel Fortran compiler version 2021, 2019, 2018 or 2016. However, on Intel’s website you can only download the latest version (current year) of the oneAPI toolkits. To get installers for previous versions, Intel “suggests” its users to purchase a license from a reseller (see this post). In order to download older versions without purchasing a license, direct download links may be used. The following GitHub repository contains a list of download links for Intel oneAPI toolkits versions 2021.x and 2022.1: github.com/hypersad/oneapi-release-history.

Acknowledgements

These instructions were adapted from Mathew Topper.

I thank Rafael Bueno for testing and providing valuable feedback.