[R-sig-hpc] mpi.gather.Robj for raster data.

Hariom Singh hariom.cs1 at gmail.com
Thu May 11 07:21:19 CEST 2017


Hi list,

This is my PBS script to run the Rmpi code in multi-node environment.

#!/bin/bash

#PBS -N sbm
#PBS -m abe
#PBS -q medium
#PBS -l nodes=1:ppn=12
#PBS -V

cd $PBS_O_WORKDIR

cp /UHOME/hariodce/R/x86_64-unknown-linux-gnu-library/3.2/Rmpi/Rprofile
./.Rprofile

cat $PBS_NODEFILE > pbsnodes

mpirun -machinefile $PBS_NODEFILE -np 12 R CMD BATCH fragmentation.r


#########fragmentation.r


library(Rmpi)
library(raster)
library(rgdal)
map <- raster("/UHOME/hariodce/uk/bis.tif")
mat <-as.matrix(map)
smat <- lapply(.splitIndices(nrow(mat),11),function(i) mat[i,])
mpi.scatter.Robj2slave(smat)
mpi.bcast.cmd(library(raster))
mpi.remote.exec(r <- raster(smat))

*mpi.bcast.cmd(an <- mpi.gather.Robj(r))mpi.remote.exec(an)*
mpi.close.Rslaves()
mpi.quit()

I am getting difficulty in gathering scattered raster data set. It is not
executing at all. Kindly suggest any method to merge the scattered raster
data sets. I would highly appreciate for your time and concern.

Hariom

Ph.D. Research Scholar, IIT Roorkee, INDIA

	[[alternative HTML version deleted]]



More information about the R-sig-hpc mailing list