#2356: r.stream.basisns uses more memory than given in memory option
--------------------------------------+-------------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Raster | Version: svn-trunk
Keywords: r.stream.basisns, memory | Platform: Linux
Cpu: x86-64 |
--------------------------------------+-------------------------------------
I tried to run r.stream.basins on using large flow direction / stream maps
generated with r.watershed.
With m-flag and memory option set to 35GB (~2/3 of the RAM of my system)
the process got killed (by out-of-mmemory-killer) after input maps were
read.
So, I re-ran the module with a smaller amount of memory allocated (20 and
10 GB) in the memory option and monitored memory usage (UNIX top command).
There I found that r.stream.basisns used 2x the amount of RAM allowed, on
each input map. In other words, with memory=10000, it used
20GB for reading flow direction map, plus
20GB for reading streams map (40GB in total).
Finally, the process gets killed when it starts finding nodes.
I am using Ubuntu 12.04 LTS 64bit and GRASS 7.0 (revision 58620).
#2356: r.stream.basisns uses more memory than given in memory option
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Addons | Version: svn-trunk
Keywords: r.stream.basins, memory | Platform: Linux
Cpu: x86-64 |
-------------------------------------+--------------------------------------
Comment(by sbl):
Both input maps had:
Rows: 180752
Columns: 141312
The region followed exactly those maps (it was not changed after maps were
generated with r.watershed).
#2356: r.stream.basisns uses more memory than given in memory option
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Addons | Version: svn-trunk
Keywords: r.stream.basins, memory | Platform: Linux
Cpu: x86-64 |
-------------------------------------+--------------------------------------
Comment(by sbl):
FYI, 20.8GB is exactly the amount of memory consumption for reading the
input maps reported by the top command, when I ran r.stream.basins with
memory=10000.
#2356: r.stream.basisns uses more memory than given in memory option
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Addons | Version: svn-trunk
Keywords: r.stream.basins, memory | Platform: Linux
Cpu: x86-64 |
-------------------------------------+--------------------------------------
Comment(by hamish):
Replying to [comment:7 sbl]:
> FYI, 20.8GB is exactly the amount of memory consumption for reading
> the input maps reported by the top command, when I ran
> r.stream.basins with memory=10000.
ok, then the math works.
can someone familiar with this module give a 3rd party confirmation that
the memory= option is now properly respected?
#2356: r.stream.basisns uses more memory than given in memory option
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Addons | Version: svn-trunk
Keywords: r.stream.basins, memory | Platform: Linux
Cpu: x86-64 |
-------------------------------------+--------------------------------------
Comment(by neteler):
TODO for all r.stream.* modules (reported by mmetz in grass-dev):
Most importantly it is the NULL handling that needs to be fixed, and
synced between the ram and disk modes. More generally, the ram and
disk modes need to be synced and validated. For ease of maintenance,
the ram mode could be removed.