r.terraflow error for ASTER DEM.

9 messages Options
Embed this post
Permalink
Milton Cezar Ribeiro

r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
Dear all,
 
I tryed to run the following over a ASTER GDEM elevation map:
 
r.terraflow elevation=ASTGTM_S25W049_dem filled=ASTGTM_S25W049_dem_terraflow_filled direction=ASTGTM_S25W049_dem_terraflow_direction swatershed=ASTGTM_S25W049_dem_terraflow_swatershed accumulation=ASTGTM_S25W049_dem_terraflow_accumulation tci=ASTGTM_S25W049_dem_terraflow_tci
 
But I got the following errors (which suggest me to contact support team :-)
 
MFD flow direction
D8CUT=999999986991104.000000
Memory size: 300.00M (314572800) bytes
Memory manager registering memory in MM_IGNORE_MEMORY_EXCEEDED mode.
raster FabioASTGTM_S25W049_dem is of type CELL_TYPE --you should use r.terraflow.short
STREAM temporary files in /var/tmp  (THESE INTERMEDIATE STREAMS WILL NOT BE DELETED IN CASE OF ABNORMAL TERMINATION OF THE PROGRAM. TO SAVE SPACE PLEASE DELETE THESE FILES MANUALLY!)
file stats.out exists - renaming.
ami_single_temp_name: mkstemp failed: : No such file or directory
Assertion failed: 0, file ami_stream.cc, line 75
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
By the way, I am running grass 64R4 under Vista 64 bits.
 
Bests
 
milton
brazil=toronto

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Markus Neteler

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
On Sun, Jul 5, 2009 at 8:07 AM, Milton Cezar
Ribeiro<[hidden email]> wrote:

> Dear all,
>
> I tryed to run the following over a ASTER GDEM elevation map:
>
> r.terraflow elevation=ASTGTM_S25W049_dem
> filled=ASTGTM_S25W049_dem_terraflow_filled
> direction=ASTGTM_S25W049_dem_terraflow_direction
> swatershed=ASTGTM_S25W049_dem_terraflow_swatershed
> accumulation=ASTGTM_S25W049_dem_terraflow_accumulation
> tci=ASTGTM_S25W049_dem_terraflow_tci
>
> But I got the following errors (which suggest me to contact support team :-)
>
> MFD flow direction
> D8CUT=999999986991104.000000
> Memory size: 300.00M (314572800) bytes
> Memory manager registering memory in MM_IGNORE_MEMORY_EXCEEDED mode.
> raster FabioASTGTM_S25W049_dem is of type CELL_TYPE --you should use
> r.terraflow.short
> STREAM temporary files in /var/tmp  (THESE INTERMEDIATE STREAMS WILL NOT BE
> DELETED IN CASE OF ABNORMAL TERMINATION OF THE PROGRAM. TO SAVE SPACE PLEASE
> DELETE THESE FILES MANUALLY!)
> file stats.out exists - renaming.
> ami_single_temp_name: mkstemp failed: : No such file or directory
> Assertion failed: 0, file ami_stream.cc, line 75
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> By the way, I am running grass 64R4 under Vista 64 bits.


I found this in the archive:

On Fri, Nov 7, 2008 at 2:14 AM, Glynn Clements<[hidden email]> wrote:

> Helena Mitasova wrote:
>> has anybody tried to run r.terraflow in winGRASS?
>>
>> It cannot find or create  the temp file?
>> ami_single_temp_name: mkstemp failed : No such file or directory
>> assertion failed: 0 file ami_stream.cc line 54
>> is it trying to write into /var/tmp which does not exist in windows?
>
> 1. The error message is inaccurate; it doesn't actually call mkstemp()
> on Windows, but mktemp().
>
> 2. The directory used for temporary files is controlled by the
> STREAM_DIR= option (renamed to stream_dir= in 7.0). /var/tmp is just
> the default setting.
>
> 3. The default value of /var/tmp is inappropriate for Windows. It
> should probably use the TMP or TEMP environment variables. There
> probably won't be a specific directory which will be writable by all
> users.
>
> --
> Glynn Clements <[hidden email]>
> _______________________________________________
> grass-windows mailing list


Would be good to get that fixed for 6.4.0.

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Markus Neteler

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
On Sun, Jul 5, 2009 at 10:16 AM, Markus Neteler<[hidden email]> wrote:
> On Sun, Jul 5, 2009 at 8:07 AM, Milton Cezar Ribeiro wrote:
...

>> STREAM temporary files in /var/tmp  (THESE INTERMEDIATE STREAMS WILL NOT BE
>> DELETED IN CASE OF ABNORMAL TERMINATION OF THE PROGRAM. TO SAVE SPACE PLEASE
>> DELETE THESE FILES MANUALLY!)
>> file stats.out exists - renaming.
>> ami_single_temp_name: mkstemp failed: : No such file or directory
>> Assertion failed: 0, file ami_stream.cc, line 75
>> This application has requested the Runtime to terminate it in an unusual
>> way.
>> Please contact the application's support team for more information.
>> By the way, I am running grass 64R4 under Vista 64 bits.

Glynn:
>> 1. The error message is inaccurate; it doesn't actually call mkstemp()
>> on Windows, but mktemp().

I have submitted a patch, now the error is reported correctly
on Windows.

Glynn:
>> 2. The directory used for temporary files is controlled by the
>> STREAM_DIR= option (renamed to stream_dir= in 7.0). /var/tmp is just
>> the default setting.

@Milton: please try this parameter to define a different directory.

Glynn:
>> 3. The default value of /var/tmp is inappropriate for Windows. It
>> should probably use the TMP or TEMP environment variables. There
>> probably won't be a specific directory which will be writable by all
>> users.

Ok, but the current default fails for sure. Personally I still think that
the current mapset is a more appropriate default.
We should change on Windows at least to a "more likely" directory.
Which?

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Glynn Clements

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink

Markus Neteler wrote:

> >> 3. The default value of /var/tmp is inappropriate for Windows. It
> >> should probably use the TMP or TEMP environment variables. There
> >> probably won't be a specific directory which will be writable by all
> >> users.
>
> Ok, but the current default fails for sure. Personally I still think that
> the current mapset is a more appropriate default.
> We should change on Windows at least to a "more likely" directory.
> Which?

        G_convert_dirseps_from_host(G_store(getenv("TEMP")));

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Markus Neteler

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
On Sun, Jul 5, 2009 at 3:35 PM, Glynn Clements<[hidden email]> wrote:

>
> Markus Neteler wrote:
>
>> >> 3. The default value of /var/tmp is inappropriate for Windows. It
>> >> should probably use the TMP or TEMP environment variables. There
>> >> probably won't be a specific directory which will be writable by all
>> >> users.
>>
>> Ok, but the current default fails for sure. Personally I still think that
>> the current mapset is a more appropriate default.
>> We should change on Windows at least to a "more likely" directory.
>> Which?
>
>        G_convert_dirseps_from_host(G_store(getenv("TEMP")));

done in

6.4.0svn: http://trac.osgeo.org/grass/changeset/38256
6.5.svn:  http://trac.osgeo.org/grass/changeset/38254

7.svn: http://trac.osgeo.org/grass/changeset/38253
          http://trac.osgeo.org/grass/changeset/38255

Windows testing welcome.

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Milton Cezar Ribeiro

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Markus Neteler
 

Glynn:
>> 2. The directory used for temporary files is controlled by the
>> STREAM_DIR= option (renamed to stream_dir= in 7.0). /var/tmp is just
>> the default setting.

@Milton: please try this parameter to define a different directory.

Hi Markys, Glynn
 
Just to you know, I tryed to set the STREAM_DIR=C:\\Data\\0temp\\0rterraflow
and get the same(?) error, see below:
----
stats.out: File exists
WARNING: raster FabioASTGTM_S25W049_dem is of type CELL_TYPE --you should
         use r.terraflow.short
STREAM temporary files in /var/tmp  (THESE INTERMEDIATE STREAMS WILL NOT BE DELETED IN CASE OF ABNORMAL TERMINATION OF THE PROGRAM. TO SAVE SPACE PLEASE DELETE THESE FILES MANUALLY!)
file stats.out exists - renaming.
GRASS 6.4.0RC4 (newLocation):c:/Users/famiglia >
----
 
I will try to compile the fixed version and report it to you.
 
Cheers, milton

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
hamish-2

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Milton Cezar Ribeiro

Markus wrote:
>  G_convert_dirseps_from_host(G_store(getenv("TEMP")));

is %TEMP% guaranteed to exist in Windows-land?
How does the module react if it is not set and the user stays
with the default or doesn't notice that the default is blank?


Hamish





_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Markus Neteler

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Milton Cezar Ribeiro
On Sun, Jul 5, 2009 at 5:33 PM, Milton Cezar
Ribeiro<[hidden email]> wrote:

>>
>> Glynn:
>> >> 2. The directory used for temporary files is controlled by the
>> >> STREAM_DIR= option (renamed to stream_dir= in 7.0). /var/tmp is just
>> >> the default setting.
>>
>> @Milton: please try this parameter to define a different directory.
>>
> Hi Markys, Glynn
>
> Just to you know, I tryed to set the STREAM_DIR=C:\\Data\\0temp\\0rterraflow
> and get the same(?) error, see below:

did you recompile?

> ----
> stats.out: File exists
> WARNING: raster FabioASTGTM_S25W049_dem is of type CELL_TYPE --you should
>          use r.terraflow.short
> STREAM temporary files in /var/tmp  (THESE INTERMEDIATE STREAMS WILL NOT BE
> DELETED IN CASE OF ABNORMAL TERMINATION OF THE PROGRAM. TO SAVE SPACE PLEASE
> DELETE THESE FILES MANUALLY!)
> file stats.out exists - renaming.
> GRASS 6.4.0RC4 (newLocation):c:/Users/famiglia >
> ----
>
> I will try to compile the fixed version and report it to you.

  /var/tmp/flowStream
was hardcoded, I have fixed that earlier today. So recompilation is
unavoidable for windows.

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Glynn Clements

Re: r.terraflow error for ASTER DEM.

Reply Threaded More More options
Print post
Permalink
In reply to this post by hamish-2

Hamish wrote:

> >  G_convert_dirseps_from_host(G_store(getenv("TEMP")));
>
> is %TEMP% guaranteed to exist in Windows-land?

AFAIK, the only way that it won't exist is if the user manually unsets
it. I wouldn't count upon the rest of Window working if you do that,
though; Windows doesn't have a global temporary directory along the
lines of /tmp or /var/tmp.

> How does the module react if it is not set and the user stays
> with the default or doesn't notice that the default is blank?

If it's not set, getenv() will return NULL and G_store() will
segfault. A check leading to G_fatal_error() can be added to G_store()
if desired (or to the above code).

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user