[GRASS-dev] Re: [GRASS GIS] #1006: r.terraflow fails to stat()
stream file on Windows
GRASS GIS
trac at osgeo.org
Fri Jul 9 08:28:41 EDT 2010
#1006: r.terraflow fails to stat() stream file on Windows
-----------------------------------+----------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: Raster | Version: svn-releasebranch64
Keywords: wingrass, r.terraflow | Platform: MSWindows Vista
Cpu: x86-32 |
-----------------------------------+----------------------------------------
Comment(by mmetz):
Replying to [comment:36 hamish]:
> Replying to [comment:35 mmetz]:
> > the ability to process large datasets is also covered by other
modules.
>
> I know that, but the (perhaps recently historic) way the modules are
presented in the menus does not make that clear to users.
Well, then we have to change the way modules are presented in the menus.
>
> from raster/r.terraflow/filldepr.cc
> {{{
> /*read next edge*/
> ae = boundaryStr->read_item(&nextedge);
> assert(ae == AMI_ERROR_NO_ERROR);
> }}}
>
> which calls include/iostream/mem_stream.h
> {{{
> template<class T>
> AMI_err MEM_STREAM<T>::read_item(T **elt) {
>
> assert(data);
>
> if(curr == dataend) {
> return AMI_ERROR_END_OF_STREAM;
> }
> *elt = curr;
> curr++;
> return AMI_ERROR_NO_ERROR;
> };
> }}}
>
> so it seems that it is prematurely reaching the end of the stream?
I never thought I would agree to fix depression filling... The mingw32
version of stream_len() does not work 100%, workaround in r42734 and
r42735. Worksforme now on Windows. On Linux, no difference in results. Can
I now put warning messages in r.terraflow that its hydrological algorithms
from the late 80ies and early 90ies do not produce very accurate results
(its emphasis is on the computational complexity of the algorithms, rather
than on modeling realistic flow)?
> > r.terraflow and iostream is written for Linux, as also previous
tickets have
> > shown, no reason to expect that this is the last problem with Windows.
> > Please leave it for 6.5 or 7.0.
>
> we could easily say the same for all of GRASS.
Most parts of grass are not giving problems with mingw32, maybe because
these adhere to C89? C++ doesn't, so problems might be expected here.
> [snip] even if it is crippled due to LFS (you might say 32bit XP is too
with its 3.2gb RAM limit),
You might say that mingw32 is the problem (apart from the msys problems).
IIUC, stuff compiled on e.g. Windows7 64bit with mingw32 is still 32bit
and has all the 32bit limits, even if the OS is 64bit. Plus other
annoyances like sizeof(long) = 4 on Windows 64bit.
>
> in pursuit of a technical fix I will add debug messages to mem_stream.h.
(r42731)
IMHO, the debug messages can be removed now, then the fix can be
backported to 6.4.1 ;-)
Markus M
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1006#comment:37>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list