MESH-Model / MESH-Dev

This repository contains the official MESH development code, which is the basis for the 'tags' listed under the MESH-Releases repository. The same tags are listed under this repository. Legacy branches and utilities have also been ported from the former SVN (Subversion) repository. Future developments must create 'forks' from this repository.
Other
2 stars 3 forks source link

to_map SHDFILEFLAG option not working #11

Open mee067 opened 1 year ago

mee067 commented 1 year ago

Activating the "to_map" option of the SHDFILEFLAG causes a crash (irrespective of the SUBBASINFLAG value):

Number of land-based tiles: 82907
[gra825:23055:0:23055] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x4)
==== backtrace ====
 0 0x0000000000010e90 __funlockfile()  ???:0
 1 0x00000000009bbbf3 read_initial_inputs_()  /home/melshamy/MESH/02_MESH_Code_EXE/r1860_ME.SUBBASINFLAG/./Driver/MESH_Driver/read_initial_inputs.f90:639
 2 0x0000000000b0ddcb MAIN__()  /home/melshamy/MESH/02_MESH_Code_EXE/r1860_ME.SUBBASINFLAG/./Driver/MESH_Driver/MESH_driver.f90:243
 3 0x000000000040c08e main()  ???:0
 4 0x00000000000202e0 __libc_start_main()  ???:0
 5 0x000000000040bfaa _start()  /tmp/nix-build-glibc-2.24.drv-0/glibc-2.24/csu/../sysdeps/x86_64/start.S:120
===================
srun: error: gra825: task 0: Segmentation fault (core dumped)
srun: launch/slurm: _step_signal: Terminating StepId=7558262.0

The map file is partially produced - line 639 of read_initial_inputs.f90 reads:

637        do y = 1, shd%yCount
638            do x = 1, shd%xCount
639                if (shd%RNKGRD(y, x) > 0) then
640                    if (shd%NEXT(shd%RNKGRD(y, x)) > 0) then

seems shd%RNKGRD is not declared/allocated, maybe replaced by another variable.

dprincz commented 1 month ago

Also ties to #39 in the context of domain variables.