intro story D-Flow FM

 

D-Flow Flexible Mesh

D-Flow Flexible Mesh (D-Flow FM) is the new software engine for hydrodynamical simulations on unstructured grids in 1D-2D-3D. Together with the familiar curvilinear meshes from Delft3D 4, the unstructured grid can consist of triangles, pentagons (etc.) and 1D channel networks, all in one single mesh. It combines proven technology from the hydrodynamic engines of Delft3D 4 and SOBEK 2 and adds flexible administration, resulting in:

  • Easier 1D-2D-3D model coupling, intuitive setup of boundary conditions and meteorological forcings (amongst others).
  • More flexible 2D gridding in delta regions, river junctions, harbours, intertidal flats and more.
  • High performance by smart use of multicore architectures, and grid computing clusters.
An overview of the current developments can be found here.
 
The D-Flow FM - team would be delighted if you would participate in discussions on the generation of meshes, the specification of boundary conditions, the running of computations, and all kinds of other relevant topics. Feel free to share your smart questions and/or brilliant solutions! 

 

=======================================================
We have launched a new website (still under construction so expect continuous improvements) and a new forum dedicated to Delft3D Flexible Mesh.

Please follow this link to the new forum: 
/web/delft3dfm/forum

Post your questions, issues, suggestions, difficulties related to our Delft3D Flexible Mesh Suite on the new forum.

=======================================================

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 


Message Boards

Compiling the Trunk (Flow and Delwaq) with GNU Fortran

BH
Bogdan Hlevca, modified 6 Years ago.

Compiling the Trunk (Flow and Delwaq) with GNU Fortran

Youngling Posts: 23 Join Date: 3/28/12 Recent Posts
Hi,

Although it is stated on the Delft3D download page that Delwaq will not compile with GNU Fortran, it is actually possible.

The problem lies in what I think are a few Makefile mistakes that:
  • do not clean the *.mod files properly when you do a make clean.
  • do not copy the freshly compiled *.mod files in the right places.


A proper cleanup of the makefiles is necessary, but if you want to compile the code now before is fixed at Deltares read below.
There are 5 MOD files that need to be copied from the location where they are compiled into the source code:

Assuming that the operations happen in
  ./trunk/src


While compiling you will see errors complaining about the MOD files that were compiled with another version of Fortran compiler. As you compile and encounter these errors you need to perform one of the 5 copies I have listed below:

1) copy

cp ./utils_lgpl/deltares_common/packages/deltares_common/src/properties.mod  ./utils_lgpl/precision/packages/precision/src/properties.mod

cp ./utils_lgpl/deltares_common/packages/deltares_common/src/properties.mod  ./utils_lgpl/inifiles/packages/inifiles/src/properties.mod


2) copy
cp ./deltares_common/packages/deltares_common/src/precision.mod ./precision/packages/precision/src/precision.mod



3) copy

cp ./utils_lgpl/deltares_common/packages/deltares_common/src/tree_structures.mod ./utils_lgpl/precision/packages/precision/src/tree_structures.mod

cp ./utils_lgpl/deltares_common/packages/deltares_common/src/tree_structures.mod ./utils_lgpl/inifiles/packages/inifiles/src/tree_structures.mod



4) copy
cp ./utils_lgpl/deltares_common/packages/deltares_common/src/precision_sp.mod ./utils_lgpl/precision/packages/precision/src/precision_sp.mod


5) copy
cp ./utils_lgpl/deltares_common/packages/deltares_common/src/precision_basics.mod  ./utils_lgpl/precision/packages/precision/src/precision_basics.mod



There may be other old files lying around that may require cleanup. I don't know the code well enough to decide what is redundant and what needs to stay
, but one thing is clear: The duplication of files in several places leads to problems. I suggest that the mod files with the same name should have only one location and Makefiles should point to them when compiling the modules. This is the only way we can stay out of trouble and the best programming practice.


Hopefully someone will find this useful and hopefully someone with access to the code can make changes to the mod files handling.

Bogdan
MJ
Michel Jeuken, modified 6 Years ago.

RE: Compiling the Trunk (Flow and Delwaq) with GNU Fortran

Jedi Knight Posts: 154 Join Date: 1/21/13 Recent Posts
Hi Bogdan,

Thank you for your comment. This problem arises when you switch compilers (e.g Intel to GNU). The practice we use at Deltares is that when you switch to another compiler you start with a clean check out of the code.

Oh, and it was already possible to build Delwaq with the GNU compiler very quickly after it was released into open source, however we forgot to remove the message. It's now removed from the site, thanks for mentioning it!

Michel
BH
Bogdan Hlevca, modified 6 Years ago.

RE: Compiling the Trunk (Flow and Delwaq) with GNU Fortran

Youngling Posts: 23 Join Date: 3/28/12 Recent Posts
Hi Michael,

Thank you for your reply. I use only GNU fortran. However, just to verify I did a new fresh checkout in a separate folder and I searched for *.mod.

It appears that some mods are checked in, which can cause the problems I reported earlier.

bogdan@high:/software/software/scientific/Delft3D/delft3d_repository/src> find ./ -name \*.mod -exec ls -l {} \;
-rw-r--r-- 1 bogdan users 90551 Jan  9 12:45 ./third_party_open/mpich2/x64/include/mpi_base.mod
-rw-r--r-- 1 bogdan users 8417 Jan  9 12:45 ./third_party_open/mpich2/x64/include/mpi_sizeofs.mod
-rw-r--r-- 1 bogdan users 3702 Jan  9 12:45 ./third_party_open/mpich2/x64/include/mpi.mod
-rw-r--r-- 1 bogdan users 36141 Jan  9 12:45 ./third_party_open/mpich2/x64/include/mpi_constants.mod
-rw-r--r-- 1 bogdan users 82614 Jan  9 12:45 ./third_party_open/mpich2/include/mpi_base.mod
-rw-r--r-- 1 bogdan users 7806 Jan  9 12:45 ./third_party_open/mpich2/include/mpi_sizeofs.mod
-rw-r--r-- 1 bogdan users 2172 Jan  9 12:45 ./third_party_open/mpich2/include/mpi.mod
-rw-r--r-- 1 bogdan users 25580 Jan  9 12:45 ./third_party_open/mpich2/include/mpi_constants.mod
-rw-r--r-- 1 bogdan users 234145 Jan  9 12:48 ./third_party_open/netcdf/lib/linux/netcdf.mod
-rw-r--r-- 1 bogdan users 273136 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/x64/Debug/ifort13/netcdf.mod
-rw-r--r-- 1 bogdan users 273134 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/x64/Debug/netcdf.mod
-rw-r--r-- 1 bogdan users 273136 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/x64/Release/ifort13/netcdf.mod
-rw-r--r-- 1 bogdan users 273134 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/x64/Release/netcdf.mod
-rw-r--r-- 1 bogdan users 243420 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/Debug/ifort13/netcdf.mod
-rw-r--r-- 1 bogdan users 243418 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/Debug/netcdf.mod
-rw-r--r-- 1 bogdan users 1397 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/Release/ifort12/typesizes.mod
-rw-r--r-- 1 bogdan users 243410 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/Release/ifort12/netcdf.mod
-rw-r--r-- 1 bogdan users 243420 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/Release/ifort13/netcdf.mod
-rw-r--r-- 1 bogdan users 243410 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/Release/netcdf.mod
-rwxr-xr-x 1 bogdan users 243410 Jan  9 12:48 ./third_party_open/netcdf/lib/win32/Release/ifort10/netcdf.mod


Despite this the code compiles correct if I do:


FCFLAGS="$FCFLAGS -fPIC" CXXFLAGS="$CXXFLAGS -fPIC" CFLAGS="$CFLAGS -fPIC" CPPFLAGS="$CPPFLAGS -fPIC" ./configure

make

sudo make install


I tried your
build.sh -gnu
but has wrong paths for mpich on my openSuse 13.1
Changing those paths as below you can compile using your build script even on Suse 13.1


if [ "$compiler" = 'gnu' ]; then
make[6]: Leaving directory `/software/software/scientific/Delft3D/delft3d_repository/src/utils_lgpl/esmfsm/packages/esmfsm_c/src/esm'
Making install in fsm
make[6]: Entering directory `/software/software/scientific/Delft3D/delft3d_repository/src/utils_lgpl/esmfsm/packages/esmfsm_c/src/fsm'
make[7]: Entering directory `/software/software/scientific/Delft3D/delft3d_repository/src/utils_lgpl/esmfsm/packages/esmfsm_c/src/fsm'
make[7]: Nothing to be done for `install-exec-am'.
    #addpath PATH /opt/mpich2-1.4.1-gcc-4.6.2/bin
   [b] addpath PATH /opt/mpich/ch-p4/bin/[/b]
    #export MPI_INCLUDE=/opt/mpich2-1.4.1-gcc-4.6.2/include
    [b]export MPI_INCLUDE=/opt/mpich/ch-p4/include[/b]
    #export MPILIBS_ADDITIONAL="-L/opt/mpich2-1.4.1-gcc-4.6.2/lib -lfmpich -lmpich -lmpl"
    [b]export MPILIBS_ADDITIONAL="-L/opt/mpich/ch-p4/lib64 -lfmpich -lmpich -lmpe"[/b]
    # export MPILIBS_ADDITIONAL=" "
    #export MPIFC=/opt/mpich2-1.4.1-gcc-4.6.2/bin/mpif90 
    [b]export MPIFC=/opt/mpich/ch-p4/bin/mpif90 


Regards,
Bogdan