Forum_general

General

At this page you can post questions or start discussions on general topics related to Delft3D Flexible Mesh.

Please select a proper category below (if possible), to post your message or reply to an existing post. Please add tags to your posts to simplify searching.

 

** PLEASE TAG YOUR POST! **

 

 

 

 


Message Boards

segfault related to initialization and m_sediment

RH
Rusty Holleman, modified 4 Years ago.

segfault related to initialization and m_sediment

Youngling Posts: 4 Join Date: 8/3/15 Recent Posts
I'm trying to run a 2D temperature model (developed and run on an earlier DFM version by Deltares staff). During initialization I get a segfault, which I traced to src/unstruc_model.f90, where it calls

          call prop_set(prop_ptr, 'sediment', 'D50'       ,              D50,   'Mean Sandgrain diameter (m), e.g. 0.0001')


This fails because mxgr==0, and allocgrains thus does not allocate D50. I was able to get around the problem by the NEW edits below. Still, is this an actual bug, or an issue in my input files or compilation process? This model was working with an earlier version of DFM run by our collaborators at Deltares.


       if ( mxgr > 0 ) then  ! NEW
          call prop_set(prop_ptr, 'sediment', 'D50'       ,              D50,   'Mean Sandgrain diameter (m), e.g. 0.0001')
          call prop_set(prop_ptr, 'sediment', 'Rhosed'    ,           rhosed,   'Mean Sandgrain rho (kg/m3) , e.g. 2650')

          if (MxgrKrone > 0) then
             call prop_set(prop_ptr, 'sediment', 'Ws'         ,             Ws(1:mxgrKrone),   'Fall velocity (m/s), e.g. 0.0005 m/s')
             call prop_set(prop_ptr, 'sediment', 'Erosionpar' ,     erosionpar(1:mxgrKrone),   'Krone Partheniades erosion parameter, e.g. 0.0001  (kg/(m2s)')
             call prop_set(prop_ptr, 'sediment', 'Taucre'     ,rhomean*Ustcre2(1:mxgrKrone),   'Critical shear stress for erosion    (N/m2), e.g. 0.3')
          endif
    
          call prop_set(prop_ptr, 'sediment', 'InitialSedimentConcentration', sedini,               'Initial sediment concentration (kg /m3)')
          call prop_set(prop_ptr, 'sediment', 'Uniformerodablethickness',Uniformerodablethickness,  'Uniform erodable layer thickness (m) ')
       endif ! NEW


Other info:
rusty@hpc:~/code/unstruc$ ~/code/dfm/bin/dflowfm --version
Deltares, D-Flow FM Version 1.1.189.46768M, Jul 20 2016, 09:08:55
Compiled with support for:
IntGUI: no
OpenGL: no
OpenMP: yes
MPI : yes
PETSc : no
METIS : no

Compiler: gcc 5.3.1 (also tested with 4.9)
MPI: openmpi
MK
Michal Kleczek, modified 4 Years ago.

RE: segfault related to initialization and m_sediment (Answer)

Padawan Posts: 53 Join Date: 10/23/14 Recent Posts
Dear Rusty,

The reported by you issue was indeed a problem that was in a meantime solved in our trunk and will be included in the upcoming (in about 2 weeks) 1.1.6 release. To acquire more information concerning this issue you can refer to the issue number: UNST-1249.

The problem was indeed that some sediment variables were allocated only when mxgr>0, however, this check was omitted when writing the MDU. Well spotted and sorry for the inconvenience. Problem appeared likely due to fact we try to write all options to our diagnostic file for debugging purposes.

Once the release is clear we will certainly contact you. I hope that is not too much of the inconvenience, otherwise please let us know.

Kind regards,
Michal
RH
Rusty Holleman, modified 4 Years ago.

RE: segfault related to initialization and m_sediment

Youngling Posts: 4 Join Date: 8/3/15 Recent Posts
Will do. Thank you for the update.

Best,
Rusty