[GRASS-dev] r.in.gdal and xargs

Vincent Bain bain at toraval.fr
Mon Mar 6 04:53:29 PST 2017


Hello Stefan,

just a suggestion, inspired from how I usually use xargs:

did you try to put the arguments list in a file (say
my_ringdal_args.txt), then run :
xargs -a my_ringdal_args.txt -P10 -n 3 r.in.gdal

(-n 3 indicating xargs to read 3 arguments for each call to r.in.gdal,
i.e. input= output= title=)

Hope this helps!
Vincent.

Le lundi 06 mars 2017 à 11:02 +0000, Blumentrath, Stefan a écrit :
> Dear all,
> 
>  
> 
> I am trying to import time series data using a combination of xargs an
> r.in gdal:
> 
> cat current_datasets_age.txt | awk -v U="myunits" -v N="name" '{ print
> "r.in.gdal input=$1 ".bil output=" $2 "_tmp title=\"" N " in " U " at
> " $3 "\" --o --q -o\0"}' | xargs -P 10 -I {} -0 bash -c {}
> 
>  
> 
> In some cases (5 out of ~20k) I get:
> 
> ERROR: Unable to make mapset element .tmp/HOST
> (/grassdata/ETRS_33N/timseries/.tmp): File exists
> 
>  
> 
> It does not happen regularly. Can there be race conditions?
> 
> I am using GRASS 7.2 (r70188) on Ubuntu 14.04 LTS.
> 
>  
> 
> I am grateful for any hint.
> 
>  
> 
> Kind regards,
> 
> Stefan
> 
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev




More information about the grass-dev mailing list