FAQ - Delft3D
Category Filter
Asset Publisher
On Windows, problems with compiling "tools_gpl\vs" ▶
"vs" is a small tool that can be used to inspect nefis files. Most probably, you will not use it. You can ignore compilation problems related to "vs".
In case you do want to solve these compilation problems: When downloading the source code, two binaries are included called "Lex" and "Yacc", see sub-directory "...\src\third_party_open\lexyacc\bin\win32". These are used to convert *.l and *.y source code files in the "vs" project into C-code. Intermediate files are placed in directory "tmp" on the current drive. The "vs" project tries to create this directory.
Most problems are related to compiling on the C-drive, without having administrator rights. This might result in errors due to missing permissions to create directory "C:/tmp". There are two ways to solve this problem:
- Checkout the Delft3D source code on the D-drive, where all users have write-permission
- With help of your system administrator: Arrange directory "C:\tmp" with you having write permission in there.
On Windows, I have problems related to warnings/error messages like "C:\Program Files\MSBuild\Microsoft.Cpp\Microsoft.CppBuild.targets(990,5): warning MSB8012" ▶
These messages are generated by MSBuild: a Microsoft plugin of VisualStudio. The Delft3D source code can not be compiled when using MSBuild. You have to disable/remove it in VisualStudio.
MSBuild seems to be added recently to the trial version of VisualStudio.
On Windows, I get the error message "the project (.vfproj) is not compatible with your Visual Studio version" ▶
Probably the Fortran compiler is missing. When you install the Intel Fortran compiler, it will cooperate with Visual Studio: Visual Studio will recognize the .vfproj projects as being Fortran projects and will activate the Fortran compiler automatically.
On Windows compilation of some projects fail with the message "LINK : fatal error LNK1104: cannot open file 'ifconsol.lib' (or 'libifcoremt.lib', ...)" ▶
These projects contain a main subroutine written in C. When linking them, the linker needs the path to the fortran runtime libraries. This directory is specified explicitly in the properties of the related project. This path differs for each version of the Intel compiler. It may be necessary to adapt this property as follows (assuming that you use "d_hydro_open_source_vs2010.sln", optionally upgraded by VisualStudio to VS20xx):
- Find out what the name of the environment parameter is pointing to the Intel compiler installation directory. As an example, for Intel 13 this is IFORT_COMPILER13
- Search for the string "IFORT_COMPILER12" in the following files:
...\src\engines_gpl\flow2d3d\packages\flow2d3d\flow2d3d.vcxproj
...\src\engines_gpl\flow2d3d\packages\flow2d3d_openda\flow2d3d_openda.vcproj
...\src\engines_gpl\part\packages\delpar\delpar.vfproj
...\src\engines_gpl\waq\packages\delwaq1\delwaq1.vfproj
...\src\engines_gpl\waq\packages\delwaq2\delwaq2.vfproj
...\src\engines_gpl\waq\packages\delwaq2_lib\delwaq2_lib.vfproj
...\src\engines_gpl\waq\packages\delwaq2_openda_lib\delwaq2_openda_lib.vfproj
...\src\engines_gpl\wave\packages\wave\wave_vs2010.vfproj
...\src\tools_gpl\datsel\packages\datsel\datsel.vcproj
...\src\tools_gpl\kubint\packages\kubint\kubint.vcproj
...\src\tools_gpl\lint\packages\lint\lint.vcproj - Replace all occurences of the string "IFORT_COMPILER12" in the files above by the correct name on your system, for example "IFORT_COMPILER13".
- Compile again
Remark: NetCDF support on output files is introduced in revision 4649. This complicates the compilation as follows:
- You have to be sure that the NetCDF libraries are available, compiled with exactly the same compiler as you use for Delft3D. Check directory "...\src\third_party_open\netcdf\lib\win32\Release" for the available precompiled NetCDF versions.
- You have to change "...\src\engines_gpl\flow2d3d\packages\flow2d3d\flow2d3d.vcxproj", such that it points to the correct version of the precompiled NetCDF libraries.
On Linux, should I use "build.sh" to compile or not? ▶
There are two ways to compile on Linux (see "src/README"): 1) Execute "autogen", "configure" and "make" with the correct flags (see "src/README)". Use this method when all used tools (automake, libtool, mpich, etc.) are installed on their default location. 2) Use the script "build.sh". In this script you have to specify paths to tools explicitly. Use this method when some tools can not be found by default. Start by editing "build.sh" to have it pointing to the correct tools on your system.
On Linux, I keep getting odd compile/link errors ▶
Your environment settings may hamper the build process. Have a colleague building the source code or try with an empty/clean (virtual) environment.
On Linux, I do not have the latest or mentioned version of autoconf/libtool/automake/mpi on my system, what should I do now? ▶
Check if you have the latest version provided by your package management system (yum, dpkg, apt, port). You can sometimes find a more up to date version in one of the community repositories, such as EPEL. If the package is not provided by your package management you can install the software manually into either your personal directory (/home), the directory for additionally installed software (/usr/local) or for external software (/opt). To do this you often need to configure that specific package using a prefix (./configure --prefix=/home/user/.local
) and to set the PATH accordingly export PATH=~/.local/bin:$PATH
On Linux the file "logs/autoreconf.log" reads "/build.sh: line 129: autoreconf: command not found" ▶
The GNU Autoconf environment is not installed. See "Prerequisites Linux" on 4. Compile the source code.
On Linux problems with mpich ▶
One of the prerequisites for compiling on Linux is that mpich is properly installed. This means that you have to download the mpich source code and compile it with exactly the same compiler as you intent to use for the Delft3D source code. After having compiled it using the default mpich directory, you can compile the Delft3D source code by executing "autogen", "configure" and "make", see 4. Compile the source code. If you don't use the default mpich directory, the easiest way to compile the Delft3D source code is by using the script "build.sh": open it in a text editor, search for mpich and fill in the correct paths as used on your local machine.
Currently, if mpich is not properly installed:
- The make log may contain an error message like:
"dfinitmpi.f90(48): error #7002: Error in opening the compiled module file. Check INCLUDE paths."
- The make log may contain an error message like:
"undefined symbol: mpi_"
- Delft3D-FLOW may compile without problems but does not run in parallel. The safest way to check whether Delft3D-FLOW is build with a proper mpich version: check the make log; the link step should contain something like
"-L/path/to/mpich/compiled/with/same/compiler/lib -lfmpich -lmpich".
- The make log may contain an error message like:
relocation R_X86_64_32 against `MPIR_ThreadInfo' can not be used when making a shared object; recompile with -fPIC
If this error appears, your MPICH version is too old. Switching to MPICH version 3.1.2 or newer should solve the problem.
On Linux in WAVE: undefined reference to `small_' (and much more) ▶
Try installing the X11 development tools.
How do I create a single precision executable? ▶
Go to directory "src/utils_lgpl/precision/scripts",
Linux: execute "./changeprecision.tcl single",
Windows: double click "singleprecision.bat",
Recompile the complete tree. This will result in "flow2d3d_sp.dll" (Windows) or "libflow2d3d_sp.so" (Linux) respectivel
How do I create a 64-bit executable? ▶
On Linux
- Delft3D is 64-bit. Check file "src/README" for compile instructions. There is a known bug on using the 32-bit version.
On Windows
- Delft3D is 64-bit by default. Compiling and running a 32-bit version is possible.
Do I really need exactly the named compiler/developer tools? ▶
Well, that's what we use. You can try others if you want. The official binaries are currently built using VS2015 and Intel 16