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 nefis in Linux/OSX

PM
Pedro Magaña, modified 3 Years ago.

Compiling nefis in Linux/OSX

Youngling Posts: 7 Join Date: 12/21/15 Recent Posts
Hello,

I'm trying to compile nefis to use with nefis-python library. I downloaded tag 6118, but when i try to run the build script, I got the following error:

configure: error: cannot find sources (plugins_qt/packages/dido/dido/dido.f90) in . or ..


Any idea?

Thanks!
Adri Mourits, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX (Answer)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Pedro,

I solved some bugs in the config files in subdirectory ".../utils_lgpl/nefis". Can you try with revision 6625 in the trunk?

Regards,

Adri
PM
Pedro Magaña, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 7 Join Date: 12/21/15 Recent Posts
Hello Adri,

Thank so much for your reply.

Nevertheless, I still can't compile nefis. If get the following errors:

Making all in packages
Making all in nefis
Making all in src
rm -rf ../include/nefis_version.h
../../../scripts_lgpl/linux/update_version.sh ./../include/nefis_version.h . ../include/version_number.ini ../../..
make[4]: ../../../scripts_lgpl/linux/update_version.sh: No such file or directory
make[4]: *** [../include/nefis_version.h] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
running make check, results into test/testresults.txt
./build.sh: line 9: test/testresults.txt: No such file or directory


If I copy scripts_lgpl to the nefis folder, I can continue compiling, but I get another related (I guess) error:

nefis_version.cpp:30:10: fatal error: 'nefis_version.h' file not found
#include "nefis_version.h"
         ^
1 error generated.
make[5]: *** [nefis_version.lo] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
running make check, results into test/testresults.txt
./build.sh: line 9: test/testresults.txt: No such file or directory


Regards,
Pedro
Adri Mourits, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX (Answer)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Pedro,

The safes method is to download the full trunk directory "https://svn.oss.deltares.nl/repos/delft3d/trunk/" and then go into the nefis subdirectory and try to compile it.

Regards,

Adri
PM
Pedro Magaña, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 7 Join Date: 12/21/15 Recent Posts
Hello Adri,

I downloaded the full trunk directory, but I can't still compile nefis:

./build.sh
running autoreconf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: subdirectory libltdl not present
autoreconf: configure.ac: not using Libtool
autoreconf: running: /home/user/local/bin/autoconf --force
configure.ac:88: error: possibly undefined macro: AC_LIBLTDL_CONVENIENCE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:89: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /home/user/local/bin/autoconf failed with exit status: 1
running configure
configure: error: cannot find install-sh, install.sh, or shtool in config "."/config
running make
make: *** No targets specified and no makefile found.  Stop.
running make check, results into test/testresults.txt
./build.sh: line 9: test/testresults.txt: No such file or directory


I've never used autoreconf, but it seems to be related to libtool and libtool-ltdl-devel. The two packages are installed, and I can compile Delft3D:

./autogen.sh --verbose
Verbose output enabled
Found a configure template: ./configure.ac
Preparing the Delft3D build system...please wait

Checking autoreconf version: autoreconf --version
Checking autoconf version: autoconf --version
Found GNU Autoconf version 2.69
Checking if 2.69.0 is greater than 2.52.0
Checking automake version: automake --version
Found GNU Automake version 1.13
Checking if 1.13.0 is greater than 1.10.0
Checking libtoolize version: libtoolize --version
Found GNU Libtool version 2.2.6b
Checking if 2.2.6 is greater than 2.2.0
Checking aclocal version: aclocal --version
Checking autoheader version: autoheader --version
Checking whether to only output version information
Backing up COPYING in /home/user/nefis/src
cp -p COPYING COPYING.27774.protect_from_automake.backup
Backing up INSTALL in /home/user/nefis/src
cp -p INSTALL INSTALL.27774.protect_from_automake.backup
Found an autom4te.cache directory, deleting it
rm -rf autom4te.cache
Detected auxillary directory: config
mv -f "config/config.guess" "config/config.guess.backup"
mv -f "config/config.sub" "config/config.sub.backup"
mv -f "config/ltmain.sh" "config/ltmain.sh.backup"
Found extra aclocal search directory: m4


Do you have any clue?

Thanks!
Pedro
PM
Pedro Magaña, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 7 Join Date: 12/21/15 Recent Posts
I forgot to mention that I didn't actually compile Delft3d fully (I stopped when I saw everything was going well). Is it necessary to compile Delft3D in order to compile nefis?
Adri Mourits, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX (Answer)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Pedro,

The build.sh script in the nefis subdirectory is very basic: just autoreconf, configure and make

The build.sh script on the toplevel contains a lot of explicit references to installed tools (which you might need to adjust to your own system).

The easy way is to execute the build.sh at the toplevel and see what happens. nefis is compiled before the Delft3D kernels, so even if something goes wrong there, you might end up with a working nefis library.
The more difficult way is to extend the build.sh in the nefis subdirectory with the needed references to tools being used.

Regards,

Adri
PM
Pedro Magaña, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 7 Join Date: 12/21/15 Recent Posts
Hi Adri,

Now, to compile Delft3D successfully I just do the following commands in the top level:

./autogen.sh
./configure
make ds-install

Do you mean to do these ones?

./autogen.sh
./configure
./build.sh

Or just build.sh?

Regards,
Pedro
Adri Mourits, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX (Answer)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Pedro,

See file "src\README" in the sourcecode:
OR you execute "autogen/configure/make ds-install", OR you adapt and execute build.sh. The build.sh script also performs "autogen/configure/make" and additionally defines some environment parameters.

Regards,

Adri
PM
Pedro Magaña, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 7 Join Date: 12/21/15 Recent Posts
Great! Thanks!

Regards,
Pedro
PM
Pedro Magaña, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 7 Join Date: 12/21/15 Recent Posts
I finally got nefis compiled in my cluster with the build.sh approach.

Thank you so much!

Regards,
Pedro
xia wei, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 16 Join Date: 10/24/16 Recent Posts
Hi Pedro,

Did you adopt the build.sh file to compile the nefis. When I execute the "./build.sh" command I always got the error

checking for X... no
./configure: line 25380: syntax error near unexpected token `enable_threads="pthread",enable_threads="no"'
./configure: line 25380: `ACX_PTHREAD(enable_threads="pthread",enable_threads="no")'
running make
cd ../.. && /bin/bash ./config.status Makefile
config.status: creating Makefile
cd ../.. && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make[1]: Entering directory '/home/xiawei/delft3dtrunk/src/utils_lgpl/nefis'
cd ../.. && /bin/bash ./config.status Makefile
config.status: creating Makefile
cd ../.. && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make[1]: Leaving directory '/home/xiawei/delft3dtrunk/src/utils_lgpl/nefis'
make all-recursive
make[1]: Entering directory '/home/xiawei/delft3dtrunk/src/utils_lgpl/nefis'
cd ../.. && /bin/bash ./config.status Makefile
config.status: creating Makefile
Making all in packages
make[2]: Entering directory '/home/xiawei/delft3dtrunk/src/utils_lgpl/nefis/packages'
cd ../../.. && /bin/bash ./config.status packages/Makefile
config.status: error: invalid argument: `packages/Makefile'
Makefile:371: recipe for target 'Makefile' failed
make[2]: *** [Makefile] Error 1
make[2]: Leaving directory '/home/xiawei/delft3dtrunk/src/utils_lgpl/nefis/packages'
Makefile:455: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/xiawei/delft3dtrunk/src/utils_lgpl/nefis'
Makefile:386: recipe for target 'all' failed
make: *** [all] Error 2
running make check, results into test/testresults.txt

Could you please give me some suggestions? I have already successfully compiled the delft3d open source on Ubuntu16.04LTS.

Thanks,
Xia Wei.
Adri Mourits, modified 3 Years ago.

RE: Compiling nefis in Linux/OSX (Answer)

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Xia Wei,

It looks as if you are using a too old Automake version. Please check, with the version numbers at the prerequisites.

Qinghua managed to get it compiled on a clean Ubuntu 16.04 machine. You can find his remarks and build-script-example in the two files with names starting with: https://svn.oss.deltares.nl/repos/delft3d/trunk/src/build_ubuntu16

Regards,

Adri
JL
Juan Liria Fernandez, modified 1 Year ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 2 Join Date: 10/22/15 Recent Posts

Hi I reopen this thread as I am having the same problem with revision 63481.

If I want to compile only the nefis library, and I go to the source code the configuration is fine but when I execute the "make" it looks like all the relative paths are messed up,

for example, lets supose I am in:

 

$D3D_ROOT/src/utils_lgpl/nefis/

being $D3D_ROOT the directory where you downloaded the trunk.

I execute configure and everything is fine, but when I execute the make the first thing it does 

cd $D3D_ROOT/src/utils_lgpl/nefis/packages/nefis/src

end then executes:

../../../scripts_lgpl/linux/update_version.sh ./../include/nefis_version.h . ../include/version_number.ini ../../..

that gives an error as it's looking in the wrong directory, file update_version.sh has a relative path of:

../../../../../scripts_lgpl/linux/update_version.sh

or an absolute path of:

$D3D_ROOT/src/scripts_lgpl/linux/update_version.sh

 

Looks like some variable is not well defined/placed any idea which?

Adri Mourits, modified 1 Year ago.

RE: Compiling nefis in Linux/OSX

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts

Hi Juan,

The compilation of nefis depends on the "version_number" tool in "third_party_open". When compiling on the main level, "$D3D_ROOT/src", the makefiles take care of the order. That doesn't work when you start the compilation in directory "$D3D_ROOT/src/utils_lgpl/nefis/packages/nefis".

Please execute configure/make in  "$D3D_ROOT/src". It will take much more time than needed when you just want to build nefis, but it will do everything in the right order.

Regards,

Adri

JL
Juan Liria Fernandez, modified 1 Year ago.

RE: Compiling nefis in Linux/OSX

Youngling Posts: 2 Join Date: 10/22/15 Recent Posts

Hi Again adri,

Thanks for the prompt reply, really apreciated. That's my problem, when I compile Delft3D (using intel 2018). I get an error right before the nefis compilation. Which I think is compiler related (see error below). So to get the library I need I need to fix a library I do not need and that has no dependences on it... and each try takes about 20 minutes, which is a lot of time if you have to do many tries. It's kind of frustrating.

mpiifort -DHAVE_CONFIG_H -I. -I../../..     -I../../../utils_lgpl/io_netcdf/packages/io_netcdf/src -I../../../utils_lgpl/deltares_common/packages/deltares_common/src -I../../../utils_lgpl/deltares_common/packages/deltares_common_mpi/src -I../../../third_party_open/FLAP/Test_Driver/mod -DWITH_DELFTONLINE  -I/share/apps/netcdf/4.3.3.1/intel/include    -g -fpp -recursive -reentrancy threaded -traceback -c -o dfmoutput_main.o dfmoutput_main.F90
dfmoutput_main.F90(43): error #7013: This module file was not generated by any release of this compiler.   [IR_PRECISION]
use IR_Precision                                                        ! Integers and reals precision definition.
----^
dfmoutput_main.F90(53): error #6457: This derived type name has not been declared.   [TYPE_COMMAND_LINE_INTERFACE]
type(Type_Command_Line_Interface) :: cli          !< Command Line Interface (CLI).
-----^
dfmoutput_main.F90(54): error #6683: A kind type parameter must be a compile-time constant.   [I4P]
integer(I4P)                      :: ierr         !< Error trapping flag.
--------^
dfmoutput_main.F90(68): error #6404: This name does not have a type, and must have an explicit type.   [CLI]
call cli%init(progname    = dfmoutput_basename,                                            &
-----^
dfmoutput_main.F90(68): error #6460: This is not a field name that is defined in the encompassing structure.   [INIT]
call cli%init(progname    = dfmoutput_basename,                                            &
---------^
dfmoutput_main.F90(75): error #6460: This is not a field name that is defined in the encompassing structure.   [ADD]
call cli%add(switch='--verbose',  switch_ab='-d', help='Print verbose diagnostics output.', required=.false., act='store_true', def='.false.')
---------^
dfmoutput_main.F90(78): error #6460: This is not a field name that is defined in the encompassing structure.   [ADD_GROUP]
call cli%add_group(group='mapmerge',description='Merge multiple map files from parallel run into one.')
---------^
dfmoutput_main.F90(106): error #6460: This is not a field name that is defined in the encompassing structure.   [PARSE]
call cli%parse(error=ierr)
---------^
dfmoutput_main.F90(110): error #6460: This is not a field name that is defined in the encompassing structure.   [GET]
call cli%get(switch='-d', val = verbose_mode, error=ierr)
---------^
dfmoutput_main.F90(111): error #6404: This name does not have a type, and must have an explicit type.   [VERBOSE_MODE]
if (verbose_mode) then
----^
dfmoutput_main.F90(111): error #6341: A logical data type is required in this context.   [VERBOSE_MODE]
if (verbose_mode) then
----^
dfmoutput_main.F90(119): error #6460: This is not a field name that is defined in the encompassing structure.   [RUN_COMMAND]
if (cli%run_command('mapmerge')) then
--------^
dfmoutput_main.F90(119): error #6341: A logical data type is required in this context.   [CLI]
if (cli%run_command('mapmerge')) then
----^
dfmoutput_main.F90(120): error #6341: A logical data type is required in this context.   [VERBOSE_MODE]
   if (verbose_mode) then
-------^
dfmoutput_main.F90(125): error #6460: This is not a field name that is defined in the encompassing structure.   [GET_VARYING]
   call cli%get_varying(group='mapmerge', switch='-i', val = infiles, error=ierr)
------------^
dfmoutput_main.F90(178): error #6404: This name does not have a type, and must have an explicit type.   [DFM_MERGE_MAPFILES]
   ierr = dfm_merge_mapfiles(infiles, ninfiles, outfiles(1), force)
----------^
dfmoutput_main.F90(181): error #6341: A logical data type is required in this context.   [CLI]
else if (cli%run_command('extract')) then
---------^
dfmoutput_main.F90(186): error #6341: A logical data type is required in this context.   [CLI]
else if (cli%run_command('convert')) then
---------^
dfmoutput_main.F90(194): error #6404: This name does not have a type, and must have an explicit type.   [STR]
   write (*,'(a)') 'Error code: '//trim(str(n=ierr))
----------------------------------------^
dfmoutput_main.F90(194): error #6362: The data types of the argument(s) are invalid.   [TRIM]
   write (*,'(a)') 'Error code: '//trim(str(n=ierr))
----------------------------------------^
dfmoutput_main.F90(44): error #6580: Name in only-list does not exist.   [TYPE_COMMAND_LINE_INTERFACE]
use Data_Type_Command_Line_Interface, only: Type_Command_Line_Interface ! Definition of Type_Command_Line_Interface.
--------------------------------------------^
dfmoutput_main.F90(55): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association.   [MAXNAMELEN]
character(len=MAXNAMELEN), allocatable :: infiles(:)  !< Input file name(s)
--------------^
dfmoutput_main.F90(55): error #6591: An automatic object is invalid in a main program.   [INFILES]
character(len=MAXNAMELEN), allocatable :: infiles(:)  !< Input file name(s)
------------------------------------------^
dfmoutput_main.F90(56): error #6591: An automatic object is invalid in a main program.   [LISTFILE]
character(len=MAXNAMELEN)              :: listfile    !< List file containing all input file name(s)
------------------------------------------^
dfmoutput_main.F90(57): error #6591: An automatic object is invalid in a main program.   [OUTFILES]
character(len=MAXNAMELEN), allocatable :: outfiles(:) !< Output file name(s)
------------------------------------------^
dfmoutput_main.F90(58): error #6591: An automatic object is invalid in a main program.   [REC]
character(len=MAXNAMELEN)              :: rec
------------------------------------------^
compilation aborted for dfmoutput_main.F90 (code 1)
make[4]: *** [dfmoutput_main.o] Error 1
make[4]: Leaving directory `/share/apps/vcs/svn/delft3d/src/tools_gpl/dfmoutput/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/share/apps/vcs/svn/delft3d/src/tools_gpl/dfmoutput'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/share/apps/vcs/svn/delft3d/src/tools_gpl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/share/apps/vcs/svn/delft3d/src'
make: *** [all] Error 2
Adri Mourits, modified 12 Months ago.

RE: Compiling nefis in Linux/OSX

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts

Hi Juan,

Yes, compiling on Linux is delicate. Compiling on Windows is much easier. The alternative is to buy a service package.

Your error message is related to "tools_gpl/dfmoutput". This normally means that you successfully build the structured engines (unless you skipped that) and that you should be able to run the related example testcases. dfmoutput is only needed when doing a parallel FM computation and needing to combine the subdomain output. So you might think about skipping the build of dfmoutput.

The IR_Precision module should be build when compiling "third_party_open\FLAP". Normally this is done at the beginning when executing the "make" statement on the top level in subdirectory. So either you executed "make" on the wrong level, or the logging of make contains information about what went wrong when compiling "third_party_open\FLAP".

In case your problems are not solved with this information: please redirect the full output of make to a file and attach it to a post on this forum. Example command line:

make ds-install &>make.log

Regards,

Adri