Migration status

  • Home Page: Activity map.

DELWAQ

DELWAQ is the engine of the D-Water Quality and D-Ecology programmes of the Delft3D suite. It is based on a rich library from which relevant substances and processes can be selected to quickly put water and sediment quality models together.

The processes library covers many aspects of water quality and ecology, from basic tracers, dissolved oxygen, nutrients, organic matter, inorganic suspended matter, heavy metals, bacteria and organic micro-pollutants, to complex algae and macrophyte dynamics. High performance solvers enable the simulation of long periods, often required to capture the full cycles of the processes being modelled.

The finite volume approach underlying DELWAQ allows it to be coupled to both the structured grid hydrodynamics of the current Delft3D-FLOW engine and the upcoming D-Flow Flexible Mesh engine (1D-2D-3D) of the Delft3D Flexible Mesh Suite (or even other models such as TELEMAC).

'DELWAQ in open source' is our invitation to all leading experts to collaborate in further development and research in the field of water quality, ecology and morphology using Delft3D. Feel free to post your DELWAQ related questions or comments in this dedicated forum space. If you are new to DELWAQ, the tutorial (in the user manual) is a good place to start. A list of DELWAQ related publications is available here.

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ

Cohesive sediments & muddy systems

 


Back

Error in running delwaq2

YZ
Yongbo Zhou, modified 3 Months ago.

Error in running delwaq2

Youngling Posts: 5 Join Date: 4/3/19 Recent Posts

Hi there,

I have compiled the delft3d codes (7545) on my computer, with the OS being fedora 16 x86_64 and the GNU 7.4.0 compiler for c, c++, and fortran. I was trying to run all the test cases in delft3d_repository/examples, and an error occured when I was runing the 06_delwaq. To be specific, when I was running the run_delwaq.sh (under the path delft3d_repository/examples/06_delwaq/), an error occured and the message went like:

 -------------------------------------------------------------------------------------------------- 
 -------------------------------------------------------------------------------------------------- 
 -----------------------------   D e l f t 3 D - D E L W A Q   -----------------------------  
 -------------------------------------------------------------------------------------------------- 
 ---------------------  D-Water Quality      -------  D-Ecology            ----------------- 
 -------------------------------------------------------------------------------------------------- 
 - Deltares, DELWAQ Version 5.06.00.63565, Apr  5 2019, 22:24:47          -  
 - Deltares, P.O. Box 177, 2600 MH Delft, The Netherlands                        -  
 - Sales          : sales@deltaressystems.nl     tel: +31 (0)88 335 8188         -  
 - Support options: support@deltaressystems.nl   tel: +31 (0)88 335 8100 -  
 - Open source website and forum: http://oss.delft3d.nl/                              -  
 - Copyright (c) 1993-2017 Deltares                                                             -  
 --------------------------------------------------------------------------------------------------  
  runid: /home/jonus/delft3d_repository/examples/06_delwaq/com-tut_fti_waq
  Number of WARNINGS            :     0
  Number of ERRORS during input :     0
 
  Normal end
Delwaq1 did run without errors.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0  0x3c4043631f in ???
#1  0x7f29d07a2953 in ???
#2  0x7f29d0612a09 in ???
#3  0x7f29d0612e3a in ???
#4  0x401c3a in ???
#5  0x40199e in ???
#6  0x3c4042169c in ???
#7  0x4019d0 in ???
run_delwaq.sh: line 61: 14915 Segmentation fault      (core dumped) $exedir/delwaq2 $argfile
Delwaq2 did not run correctly.

The input file is "com-tut_fti_waq.inp" . To fix this, should I just edit the "com-tut_fti_waq.inp" file? or do I have to re-compile all the delft3d codes? Could anyone please help me?

delwaq
AM
Arjen Markus, modified 3 Months ago.

RE: Error in running delwaq2

Jedi Knight Posts: 235 Join Date: 1/26/11 Recent Posts

The odd thing is that that example runs fine on our machines - using the GNU compilers. The message does not include much information on where in the program things went awry, but it does say that the core was dumped. Do you have a file called "core"? What happens if you run delwaq2 via the debugger (gdb)? In case you do not know how to do this:

go to the directory where you ran the calculation

start the command "gdb delwaq2". delwaq2 will either start and ask for the name of the input or gdb will show that it crashed before - using the core file - and should then be able to show a bit more on the cause of the crash. The command "where" will then list in detail (if we are lucky ;)) where in the program the problem occurred/was detected.

YZ
Yongbo Zhou, modified 3 Months ago.

RE: Error in running delwaq2

Youngling Posts: 5 Join Date: 4/3/19 Recent Posts
Dear Arjen Markus,

Thank you very much for your timely reply.

I tried to debug the delwaq2 following the method you suggeted. No progress is achieved yet, mainly because I am not familiar with the GDB tool. I will keep trying. Once I solve the problem, I would like to let you know.

I really appreciate your help.

Best Regards,

Yongbo

AM
Arjen Markus, modified 3 Months ago.

RE: Error in running delwaq2

Jedi Knight Posts: 235 Join Date: 1/26/11 Recent Posts

It should be simple: instead of starting "delwaq2" via the script, you start "gdb delwaq2" - but of course, I have a few years' experience with such stuff. I have adjusted the run script a bit - see attachment to give you some more instructions. However, when I tried this myself, there still was not much more information in the traceback. If that is the case for you as well, we will have to take more drastic measures, I am afraid.

YZ
Yongbo Zhou, modified 3 Months ago.

RE: Error in running delwaq2

Youngling Posts: 5 Join Date: 4/3/19 Recent Posts

Thank you for the detailed instruction. I ran the bash script you sent me, and the debuging information is below (start at the line 47 of the script):

Type: run
Type: name of argument - /home/jonus/delft3d_repository/examples/06_delwaq/com-tut_fti_waq.inp
On crash type: where
GNU gdb (GDB) Fedora (7.3.50.20110722-9.fc16)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/jonus/delft3d_repository/bin/lnx64/waq/bin/delwaq2...done.
(gdb) run
Starting program: /home/jonus/delft3d_repository/bin/lnx64/waq/bin/delwaq2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
  Name of the model files ?
  DELWAQ will provide the extensions.

/home/jonus/delft3d_repository/examples/06_delwaq/com-tut_fti_waq.inp

 ERROR opening file number:  1 on unit:914
 Filename is: /home/jonus/delft3d_repository/examples/06_delwaq/com-tut_fti_waq.inp-delwaq03.wrk
 Stopped with error code :           1
STOP 1
[Inferior 1 (process 16484) exited with code 01]
Missing separate debuginfos, use: debuginfo-install expat-2.0.1-11.fc15.x86_64 glibc-2.14.90-14.x86_64

(gdb) where
 

No stack.

(gdb)

 

I don't know how to fix this according to these information. Maybe I should learn more about the GDB tool. Given that the delft3d model works well on your PC with GNU compilers, what if I install all the binaries and compilers, with all the version numbers being same with yours? Currently, the version number of all the binaries and GNU compilers on my PC are:

(1) for gcc installation

     gcc-7.4.0.tar.gz, gmp-4.3.2.tar.bz2, mpc-0.8.1.tar.gz, mpfr-2.4.2.tar.bz2

(2) for expat-devel installation

     expat_2.0.1.orig.tar.gz

(3) for netcdf installation

     netcdf-c-4.6.2.tar.gz, netcdf-fortran-4.2.tar.gz, zlib-1.2.8.tar.gz, hdf5-1.8.14.tar.gz

(4) for mpich installation

     mpich-3.3.tar.gz

(5) for uuid-dev installation

     e2fsprogs-1.45.0.tar.gz

 

If possible, could you please provide the version numbers of all the binaries and compilers you used?

Thanks a lot!

AM
Arjen Markus, modified 3 Months ago.

RE: Error in running delwaq2

Jedi Knight Posts: 235 Join Date: 1/26/11 Recent Posts

It took me a while to realise what was happening. Okay, the script first runs delwaq1 to process the input. Then - via  the debugger - it runs delwaq2. Because it got no argument, it will ask about the name of the input file and you gave it a name. Apparently there was something wrong with that name and therefore the program stopped. That is also why there is no trace - there is no process (program) to examine.

Be sure to give it the same name as for the run script itself. In the meantime I am trying to assemble the information about the compiler we normally use. That may take a while and tomorrow I have no oppportunity to try and work out any answers.

AM
Arjen Markus, modified 3 Months ago.

RE: Error in running delwaq2

Jedi Knight Posts: 235 Join Date: 1/26/11 Recent Posts

I was assured that this testcase/demo worked fine, but now that I try it myself, I get a crash in delwaq1. So there definitely is something strange going on. I will have a closer look - this was a red herring, it seems.

AM
Arjen Markus, modified 3 Months ago.

RE: Error in running delwaq2

Jedi Knight Posts: 235 Join Date: 1/26/11 Recent Posts

Okay, I found the culprit - if you do an update of your source code and re-build Delft3D, it should now work

YZ
Yongbo Zhou, modified 2 Months ago.

RE: Error in running delwaq2

Youngling Posts: 5 Join Date: 4/3/19 Recent Posts

Dear Arjen Markus,

I was few days off these days, and I feel sorry for not replying you during these days. Your replies are very informative. However, I am still confused, below is my point-by-point response to your replies.

Your reply 1:

“It took me a while to realise what was happening. Okay, the script first runs delwaq1 to process the input. Then - via the debugger - it runs delwaq2. Because it got no argument, it will ask about the name of the input file and you gave it a name. Apparently there was something wrong with that name and therefore the program stopped. That is also why there is no trace - there is no process (program) to examine.
Be sure to give it the same name as for the run script itself. In the meantime I am trying to assemble the information about the compiler we normally use. That may take a while and tomorrow I have no oppportunity to try and work out any answers.”

My response 1: In my understanding, it seems that the input files of both delwaq1 and delwaq2 are the file named “com-tut_fti_waq.inp”, based on the "run_delwaq.sh"  script. To be specific, there is a line in "run_delwaq.sh" which goes like:

$exedir/delwaq1 $argfile -p "$procfile"

where the $argfile in my computer is “/home/jonus/delft3d_repository/examples/06_delwaq/com-tut_fti_waq.inp”. If the "com-tut_fti_waq.inp" was created by delwaq1, the removal of "com-tut_fti_waq.inp" from current directory should not prohibit the execution of delwaq1. However, when the "com-tut_fti_waq.inp" was removed from the current directory, running of the run_delwaq.sh would be accompanied by the errors below:

Stopped with error code :           1
STOP 1
ls: cannot access /home/jonus/delft3d_repository/examples/06_delwaq/com-tut_fti_waq.inp: No such file or directory
Delwaq1 did not run correctly, ending calculation

Therefore. I do not think the input of delwaq2 was created by delwaq1. Otherwise, an odd thing would occur, that is, based on the exactly same input file ( com-tut_fti_waq.inp), delwaq1 ran well while delwaq2 did not. So I guess the error lies in the progress when compiling the delwaq2.

Your reply 2: I was assured that this testcase/demo worked fine, but now that I try it myself, I get a crash in delwaq1. So there definitely is something strange going on. I will have a closer look - this was a red herring, it seems.

My response 2: I do not know why a crash occurred when you were running delwaq1. In my computer, I ran delwaq1 well. The real problem lies in the delwaq2. This is quite strange.

Your reply 3: Okay, I found the culprit - if you do an update of your source code and re-build Delft3D, it should now work

My response 3: do you mean that you have found source of the errors in delwaq2? You suggested that I should update my delft3d source code. The current version I am using is 7545, which is the newest version at the URL: https://svn.oss.deltares.nl/repos/delft3d/tags/delft3d4/. I am confused, which version should I use? Could you please tell me the exact delft3d version you are using to avoid the delwaq2 error?

 

Best Regards!

Yongbo

AM
Arjen Markus, modified 2 Months ago.

RE: Error in running delwaq2

Jedi Knight Posts: 235 Join Date: 1/26/11 Recent Posts

The first part of my reply had to do with running delwaq2 via the debugger. There is no need anymore to do that - I have been able to run the programs via the debugger myself, after building with gfortran.

When I did this, I found a mistake in the code which caused the behaviour. It was however in the first part, delwaq1, that things went wrong on my machine. I see that your situation is slightly different: delwaq1 runs fine, but delwaq2 crashes. I suspect they have to do with the same thing, but as the behaviour was different between our machines, I cannot be sure.

The code you are using is from a specific tag. You can also update the code to the trunk - that is where I put the improvement.

Please let me know if with this updated code (from the trunk, not the tag) solves the problem.

 

YZ
Yongbo Zhou, modified 2 Months ago.

RE: Error in running delwaq2

Youngling Posts: 5 Join Date: 4/3/19 Recent Posts

Thanks a lot!

I will try to update the code from the trunk. I would like to let you know if any progress is achieved.