This is a short guide for compiling and testing the SNL-Delft3D-CEC current energy converter modification for the Deltares Delft3D-4 solver.
The SNL-Delft3D-CEC Home Page contains details regarding installing and running the code. As the version in the master branch is out of date, I have created a pull request to update the code to tag 65936 from the Deltares SVN servers which is the recommended version for Delft3D-4 according to the Deltares Get Started page.
The code in the pull request can be downloaded as a zip file from this link. Unzip this code to some path, which we will refer to as \path\to\Delft3D
below.
If and when the code is merged into the master branch of SNL-Delft3D-CEC, I will update this information accordingly.
If you want to download the vanilla version of Delft3D-4 instead, then, first, install an SVN client like sliksvn and then save my SVN helper script as Check-Out-SVN.ps1
. Now run it using PowerShell like so:
.\Check-Out-SVN.ps1 \path\to\Delft3D -SRC https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/65936
Follow the default installation instructions for Anaconda Python.
For Visual Studio, choose the "Desktop development with C++" workload and ensure the following additional components are selected:
- 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)
See the SciVision guide for installing the Intel FORTRAN compiler using Intel oneAPI.
After logging into the Deltares Get Started pages, use the request form to obtain a copy of the Delft3D-4 GUI and a license. Install the DS_Flex license manager with your license file and then install the Delft3D-4 GUI.
Save this python helper script as prepare_sln_auto.py
in the \path\to\Delft3D\src
directory.
Now, run the script from an Anaconda3 Powershell prompt (open from the Anaconda3 Start menu folder):
(base) PS > cd \path\to\Delft3D\src
(base) PS > python prepare_sln_auto.py
...
Visual Studio Version : 2019
.Net Framework Version : v4.6.1
Intel oneAPI Version : 2021
Solution path :
- Open Visual Studio
- Open the
delft3d_open.sln
file in thesrc
directory - Using the solution explorer, open the
third_party_open/netcdf/netcdff/Header Files/nfconfig.inc
file - Edit line 99 to read
#define HAVE_TS29113_SUPPORT
and save the file - Change the configuration from "Debug" to "Release"
- Change the platform from "Win32" to "x64"
- Select "Build Solution" from the "Build" menu
- Wait...
After downloading the SNL-Delft3D-CEC Tutorial 2 Files, follow the steps in the SNL-Delft3D-CEC Tutorial 1 and SNL-Delft3D-CEC Tutorial 2 pdf files.
The x64 binaries compiled in this tutorial are available to download with this release.
Hi~
I got some errors, when I am compiling by using "delft3d_open.sln". Here are some my errors:
error #6439: This symbol has too many characters. [OMPX_TARGET_ALIGNED_ALLOC_DEVICE] (from File: omp_lib.h; Line: 895)
error #6439: This symbol has too many characters. [OMPX_TARGET_ALIGNED_ALLOC_SHARED] (from File: omp_lib.h; Line: 911)
Compilation Aborted (code 1) (from File: ...\engines_gpl\part\packages\kernel_f\src\delpar.F90 Line: 1)
fatal error LNK1181: cannot open input file '...\src\engines_gpl\part\packages\kernel_f\x64\Release\part_kernel_f.lib'
fatal error LNK1181: cannot open input file '...\src\engines_gpl\waq\bin\x64\Release\delwaq_dll.lib'
How can I fix these errors? Could you kindly give me some suggestions? I have got Delft3D-4 complication for about 2 weeks.
Thank you very much!