[R-sig-Geo] rgrass7 and snow
Dr Didier G. Leibovici
didier.leibovici at nottingham.ac.uk
Fri Apr 22 16:22:25 CEST 2016
Hi,
we are trying to use 'grass' in parallel programming with 'snow'
The code does multiple simulations of a r.viewshed resampling the points
generating the viewshed.
(I guess the other solution would be to have an equivalent of r.viewshed
in an R library or script) ...
I think the problems are to do with the gisDbase ...
Testing with 2 clusters we start with:
> clusterCall(cl,initGRASS,"/usr/lib/grass70",home=getwd(),
gisDbase="GRASS_TEMP", override=TRUE )
[[1]]
gisdbase GRASS_TEMP
location file5edb6bf06d70
mapset file5edb4b0cda81
rows 1
columns 1
north 1
south 0
west 0
east 1
nsres 1
ewres 1
projection NA
[[2]]
gisdbase GRASS_TEMP
location file5edb6bf06d70
mapset file5edb4b0cda81
then read a DEM
clusterCall(cl,execGRASS,"r.in.gdal", flags="o",
parameters=list(input=baseDemFilename, output="DEM"))
clusterCall(cl,execGRASS, "g.region", parameters=list(raster="DEM"))
and then loop on the sampled points ... involving
execGRASS("r.viewshed", parameters = list(input = "DEM", output =
"cumulativeViewshed", max_distance=maxDistance, coordinates =
as.integer(coords[i,])), flags = c("overwrite" , "b","quiet"))
and cumulating the viewshed (reading the ouput using
readRAST("cumulativeViewshed")), all this (loop over the points)within a
function simul() called
by a
parSapply(cl,1:nDsimul,simul)
Here is the error
Error in checkForRemoteErrors(val) :
2 nodes produced errors; first error: no such file:
GRASS_TEMP/file5edb6bf06d70/file5edb4b0cda81/.tmp/geoprocessing/cumulativeViewshed
Calls: parSapply ... clusterApply -> staticClusterApply ->
checkForRemoteErrors
any idea?
thanks,
DIdier
--
Dr Didier G. Leibovici
d-d'ye ley-bow-v-c
Senior Research Fellow
Geocomputational Modelling & Geospatial Statistics
Nottingham Geospatial Institute
University of Nottingham, UK
+44 (0)115 84 13924
http://www.nottingham.ac.uk/ngi/people/didier.leibovici
Google+ didier.leibovici at gmail.com
Skype didierleibovici
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list