Opened 8 years ago

Last modified 4 years ago

#1786 new defect

r.resamp.rst fails with message "split_and_interpolate() failed"

Reported by: bko Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Raster Version: 6.4.1
Keywords: r.resamp.rst Cc:
CPU: x86-64 Platform: Linux

Description

The following command fails on my computer:
r.resamp.rst input=nearest_hydro_permanent_all_200@PERMANENT ew_res=10 ns_res=10 elev=nearest_hydro_permanent_all_200_10m overlap=3 zmult=1.0 tension=40.

Here is the output from the command:

65910784 bytes of disk space for temp files. Temporarily changing the region to desired resolution ... Changing back to the original region ... Percent complete: Cannot fseek elev offset2=-2147383136 Cannot fseek elev offset2=-2147382860 Cannot fseek elev offset2=-2147382584 Cannot fseek elev offset2=-2147382308 Cannot fseek elev offset2=-2147382032 Cannot fseek elev offset2=-2147381756 Cannot fseek elev offset2=-2147381480 Cannot fseek elev offset2=-2147381204 Cannot fseek elev offset2=-2147380928 Cannot fseek elev offset2=-2147380652 Cannot fseek elev offset2=-2147380376 Cannot fseek elev offset2=-2147380100 Cannot fseek elev offset2=-2147379824 Cannot fseek elev offset2=-2147379548 Cannot fseek elev offset2=-2147379272 Cannot fseek elev offset2=-2147378996 Cannot fseek elev offset2=-2147378720 Cannot fseek elev offset2=-2147378444 Cannot fseek elev offset2=-2147378168 Cannot fseek elev offset2=-2147377892 Cannot fseek elev offset2=-2147377616 Cannot fseek elev offset2=-2147377340 Cannot fseek elev offset2=-2147377064 Cannot fseek elev offset2=-2147376788 Cannot fseek elev offset2=-2147376512 Cannot fseek elev offset2=-2147376236 Cannot fseek elev offset2=-2147375960 Cannot fseek elev offset2=-2147375684 Cannot fseek elev offset2=-2147375408 Cannot fseek elev offset2=-2147375132 Cannot fseek elev offset2=-2147374856 Cannot fseek elev offset2=-2147374576 interpolate() failed dnorm in mainc after grid before out1= 1249.036216 split_and_interpolate() failed

The command fails in exactly the same way on two different systems:

  1. Ubuntu 10.04 with grass 6.4 RC with amd64 processor and 64 bit OS
  2. Ubuntu 10.04 with grass 6.4.1 with amd64 processor and 64 bit OS

This exact command does work on a project that is about 1/10th the size of the one on which the command failed.

I looked at the code and wonder if I had an integer overflow (possibly on the variable sdisk). My region is huge and my resolution is high.

Region:

projection: 1 (UTM) zone: 12 datum: nad83 ellipsoid: grs80 north: 6399780 south: 6058660 west: 243410 east: 563010 nsres: 10 ewres: 10 rows: 34112 cols: 31960 cells: 1090219520

I find it strange that the 65910784 bytes of disk space for temp files. didn't format to 65.91 MB ....

Makes me think overflow but I my C knowledge is just about nonexistent.

Cheers!

Change History (10)

comment:1 Changed 8 years ago by bko

Component: DefaultRaster

comment:2 in reply to:  description ; Changed 8 years ago by neteler

Replying to bko:

The following command fails on my computer:
r.resamp.rst

...

Cannot fseek elev offset2=-2147383136

It will be an overflow of 231, i.e. the 2GB limit.

..

The command fails in exactly the same way on two different systems:

  1. Ubuntu 10.04 with grass 6.4 RC with amd64 processor and 64 bit OS
  2. Ubuntu 10.04 with grass 6.4.1 with amd64 processor and 64 bit OS

Have these versions been compiled with --enable-largefile?

If yes, can you try GRASS 7 instead which has improved Large File support?

comment:3 Changed 8 years ago by martinl

Keywords: r.resamp.rst added

comment:4 Changed 8 years ago by bko

I have no idea whether large file support is enabled. I installed via apt-get.

I'm in the middle of a project and worry about installing from source because it might fail or break code I've written to talk to grass or otherwise slow me down. I'll find a work-around. Thanks for the prompt reply.

Let me know if there is anything else I can do to help you on your end.

comment:5 in reply to:  4 Changed 8 years ago by neteler

Replying to bko:

I have no idea whether large file support is enabled. I installed via apt-get.

If you got it from unstable, it seems to be enabled (if that's the right log file):

https://launchpadlibrarian.net/107513186/buildlog_ubuntu-precise-amd64.grass_6.4.2~upstream2-3~precise3_BUILDING.txt.gz

I'm in the middle of a project and worry about installing from source because it might fail or break code I've written to talk to grass or otherwise slow me down.

Well, this is fairly unlikely :) This page has just been updated:

grass.osgeo.org/wiki/Compile_and_Install_Ubuntu

comment:6 Changed 8 years ago by neteler

I just see that you use 6.4.1? That's fairly outdated, so no surprise...

comment:7 in reply to:  2 ; Changed 8 years ago by glynn

Replying to neteler:

Have these versions been compiled with --enable-largefile?

It doesn't matter. lib/rst/interp_float is limited to 32 bits in all 6.x versions (including 6.5 svn), regardless of configure options.

7.0 doesn't have this limitation, provided that GRASS was built with LFS enabled.

comment:8 Changed 8 years ago by bko

Summary: r.resamp.rst fails with message "split_and_interpolate() failedr.resamp.rst fails with message "split_and_interpolate() failed"

I was able to work around the problem by getting creative with how I produced the layer.

I'll take your word for the fact that upgrading is unlikely to produce problems for me but I think its good policy not to fiddle with my configuration in the middle of a project unless it's absolutely critical.

Grass is amazing software and I look forward to running 7.0 in the near future.

Thanks.

comment:9 in reply to:  7 Changed 6 years ago by neteler

Replying to glynn:

lib/rst/interp_float is limited to 32 bits in all 6.x versions (including 6.5 svn), regardless of configure options.

7.0 doesn't have this limitation, provided that GRASS was built with LFS enabled.

... for the record, this ticket is a mixture of wontfix-in-GRASS6 (too complicated) and already fixed-in-GRASS7 time ago.

comment:10 Changed 4 years ago by neteler

Milestone: 6.4.36.4.6
Note: See TracTickets for help on using tickets.