Opened 5 years ago

Closed 5 years ago

#2404 closed defect (fixed)

winGRASS: G_calloc error in v.to.rast

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-trunk
Keywords: v.to.rast Cc:
CPU: Unspecified Platform: MSWindows 7

Description

winGRASS (32bit binaries):

v.rast.stats --> which calls v.to.rast:

ERROR: G_calloc: unable to allocate 236326912 * 1 bytes of memory at raster.c:83
ERROR: An error occurred while converting vector to raster

Computational region:

g.region rast=somemap@LANDCOVER -p
projection: 99 (Lambert Azimuthal Equal Area)
zone:       0
datum:      etrs89
ellipsoid:  grs80
north:      5416100
south:      941500
west:       1547000
east:       7316700
nsres:      100
ewres:      100
rows:       44746
cols:       57697
cells:      2581709962

g.region vect=othermap@LANDCOVER -p
projection: 99 (Lambert Azimuthal Equal Area)
zone:       0
datum:      etrs89
ellipsoid:  grs80
north:      5310000
south:      940000
west:       1540000
east:       6530000
nsres:      100
ewres:      100
rows:       43700
cols:       49900
cells:      2180630000

System:

  • winGRASS 7.1
  • RAM 32 GB

Also reported here:

The issue might be the row cache in v.to.rast:

with rows=4096 (Number of rows to hold in memory by default).

According to the latter email, the memory consumption would be (in GB, plus overhead):

> 4096 * 44746 rows * 8 bytes /1024 /1024 /1024 
[1] 1.36554

Given the 32GB of RAM, that should be ok (but even for winGRASS 7 32bit?).

Maybe the row cache in v.to.rast should be "auto" according to the amount of pixels in a row?

BTW: seen again here:

Change History (2)

comment:1 in reply to:  description ; Changed 5 years ago by mmetz

I have changed the 'rows' option to a 'memory' option in trunk r61909, default is 300 MB.

comment:2 in reply to:  1 Changed 5 years ago by neteler

Resolution: fixed
Status: newclosed

Replying to mmetz:

I have changed the 'rows' option to a 'memory' option in trunk r61909, default is 300 MB.

Backported to relbr7 in r62227. Closing.

Note: See TracTickets for help on using tickets.