[GRASS-user] r.patch: GRASS-6.5svn
Glynn Clements
glynn at gclements.plus.com
Fri Jan 22 22:59:43 EST 2010
Rich Shepard wrote:
> > Can you revert the previous patch with:
> > patch -R -p0 < write_errno.patch
> > then apply the attached patch with:
> > patch -R -p0 < write_errors.patch
> > and re-compile.
> > That should cause it to print more than one error.
>
>
> GRASS 6.5.svn (Oregon):/usr4/grassbase > r.patch in=$MAPS out=demOR --o
> WARNING: map [demOR] - unable to write row 24578 (No such file or directory)
> WARNING: map [demOR] - unable to write row 24578 (File too large)
> WARNING: map [demOR] - unable to write row 24578 (File too large)
> 100%
> Creating support files for raster map <demOR>
>
> I've not before encountered 'file too large' ...
The code is EFBIG.
EFBIG An attempt was made to write a file that exceeds the implementa-
tion-defined maximum file size or the process's file size limit,
or to write at a position past the maximum allowed offset.
That rules out disk full (which fails with ENOSPC).
> > Also, can you provide the output from:
> > ls -l /usr4/grassbase/Oregon/PERMANENT/cell/demOR
>
> But this explains it:
>
> 2147483647 Jan 22 07:39 /usr4/grassbase/Oregon/PERMANENT/cell/demOR
Yep, that's the 2GiB limit.
> That's a 2G file size for 10m resolution DEM of the entire state. Wow!
>
> What's the best strategy for decreasing file size? Do I not make a
> state-wide DEM but make 2 or three instead? Should I keep the 9 separate
> maps and concatenate as necessary for specific projects?
Actually, I want to know why the 2GiB limit is there.
1. Can you confirm that include/Make/Platform.make contains:
#Large File Support (LFS)
USE_LARGEFILES = 1
2. Can you re-compile lib/gis and check that the compilation commands
include the flag -D_FILE_OFFSET_BITS=64.
[r.patch shouldn't need any particular compilation flags, as the file
in question is created and written by lib/gis.]
3. Can you provide the files produced by the following commands (run
from within a GRASS session):
ldd $GIBASE/bin/r.patch > ldd.txt
nm -D $GISBASE/lib/libgrass_gis.so > nm.txt
> This has been a _very_ useful lesson.
>
> > BTW, do you get similar errors with other commands using the same
> > region, e.g.:
> > r.mapcalc 'test = rand(9999)'
>
> GRASS 6.5.svn (Oregon):/usr4/grassbase > r.mapcalc 'test = rand(9999)'
> Too few arguments (1) to function rand()
> Parse error
Oops; that should have been rand(0,9999). But I think I already know
how that would have turned out.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list