'less /proc/meminfo' shows:
MemTotal: 3874108 kB
MemFree: 2977416 kB
MemAvailable: 2972780 kB
top tells me that firefox is using ~14% of that. Nothing else is using
more than ~1.2%
In ~/.bash_profile I 'export GRASS_VECTOR_LOWMEM=1'.
When I run r.contour it cannot allocate 671472 bytes of memory. This seems
to me to be an amount well within the free or available memory. What can I
do to ensure sufficient RAM to run the module?
The error (which appears after ~8% of the file has been read) is:
Current region rows: 47371, cols: 83934
ERROR: G_malloc: unable to allocate 671472 bytes of memory at
raster/r.contour/main.c:240
Rich
That means that each raster will have about 4 billion cells. A raster with integer values takes 32 bits per pixel, (double precision about the same, float about 1/2 of that), so if the whole raster needs to be kept in memory, you would require some 16GB of RAM…
···
On 07/16/2018 09:53 PM, Rich Shepard wrote:
‘less /proc/meminfo’ shows:
MemTotal: 3874108 kB
MemFree: 2977416 kB
MemAvailable: 2972780 kB
top tells me that firefox is using ~14% of that. Nothing else is using
more than ~1.2%
In ~/.bash_profile I ‘export GRASS_VECTOR_LOWMEM=1’.
When I run r.contour it cannot allocate 671472 bytes of memory. This seems
to me to be an amount well within the free or available memory. What can I
do to ensure sufficient RAM to run the module?
The error (which appears after ~8% of the file has been read) is:
Current region rows: 47371, cols: 83934
ERROR: G_malloc: unable to allocate 671472 bytes of memory at
raster/r.contour/main.c:240
Rich
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user
--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
On Mon, 16 Jul 2018, Micha Silver wrote:
Current region rows: 47371, cols: 83934
That means that each raster will have about 4 billion cells. A raster with
integer values takes 32 bits per pixel, (double precision about the same,
float about 1/2 of that), so if the whole raster needs to be kept in
memory, you would require some 16GB of RAM....
Micha,
So when creating vector contours grass7 needs to keep all raster cells in
memory while it's processing.
This suggests that the solution is to create a mask and generate the
contours only within that area.
Thanks,
Rich
A single contour line could possibly begin at one side of the raster, and end at the other side. So, without knowing any better, I would guess that the whole raster needs to be kept in memory. or create a lower resolution version of the DEM, if you can live with the reduced accuracy.
···
On 07/17/2018 12:09 AM, Rich Shepard wrote:
On Mon, 16 Jul 2018, Micha Silver wrote:
Current region rows: 47371, cols: 83934
That means that each raster will have about 4 billion cells. A raster with
integer values takes 32 bits per pixel, (double precision about the same,
float about 1/2 of that), so if the whole raster needs to be kept in
memory, you would require some 16GB of RAM…
Micha,
So when creating vector contours grass7 needs to keep all raster cells in
memory while it’s processing.
This suggests that the solution is to create a mask and generate the
contours only within that area.
Thanks,
Rich
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user
--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
On Tue, 17 Jul 2018, Micha Silver wrote:
A single contour line could possibly begin at one side of the raster, and
end at the other side. So, without knowing any better, I would guess that
the whole raster needs to be kept in memory.
Micha,
This makes sense.
This suggests that the solution is to create a mask and generate the
contours only within that area.
or create a lower resolution version of the DEM, if you can live with the
reduced accuracy.
The area is small enough that I need the highest available resolution (45
cm horizontal, IIRC) for hydrological modeling.
Thanks,
Rich