[R-sig-hpc] Some hpc problems with doMPI and runmpi

André Ziervogel Andre.Ziervogel at psychol.uni-giessen.de
Thu Aug 7 12:21:51 CEST 2014


Dear R people,

I’ve been doing some hpc using R and openmpi. Unfortunately I’ve encoutred a major problem and it’s nature is hard to pin down:

Essentially I call mpirun Rscipt … as soon as the script reaches a foreach()%dopar% it halts indefinitely. I’ve attached the qsub script:

#!/bin/bash
#$ -S /bin/bash
#$ -N test_14
#$ -cwd
    
#$ -V  
#$ -o "/fhgfs/g61570/Spectral Databases/log/test_14_"$JOB_ID             
#$ -j y
#$ -q regular
#$ -pe openmpi 8
#$ -l h_rt=00:15:00
#$ -l h_vmem=1.9G  
#$ -m eas          
#$ -M andre.ziervogel at psychol.uni-giessen.de

module add gcc     
module add openmpi/gcc/64/1.6.5
module add R/gcc/3.0.1

date                       #log start time

echo "Number of slots " . $NSLOTS

mpirun Rscript /fhgfs/g61570/Spectral\ Databases/test_10.r > /fhgfs/g61570/Spectral\ Databases/log/test_14.Rout

date

exit

and the R file:

suppressMessages(library('doMPI'))

skylla.cluster <- startMPIcluster()
registerDoMPI(skylla.cluster)

cat(paste("COMM SIZE: ", mpi.comm.size(0), " cluster size: ", clusterSize(skylla.cluster), "\n",sep = ""))

tmp.time <- proc.time()
sample <- foreach(i=seq(from=0, to=1000, by =1),.combine='c',.inorder=TRUE) %do%
{
	r <- sqrt(i^2 + i^2) + .Machine$double.eps  * factorial(i)
  	sin(r) / r
}
cat(paste("Processing seriell time: ", "\n", sep = "  "))
print(proc.time() - tmp.time)
#print(sample)

tmp.time <- proc.time()
sample <- foreach(i=seq(from=0, to=1000, by =1),.combine='c',.inorder=TRUE) %dopar%
{
	r <- sqrt(i^2 + i^2) + .Machine$double.eps  * factorial(i)
  	sin(r) / r
}
cat(paste("Processing parallel time: ", "\n", sep = "  "))
print(proc.time() - tmp.time)
#print(sample)

closeCluster(skylla.cluster)
# mpi.close.Rslaves()
# mpi.exit()
mpi.quit(save='no‘) 

Any suggestions would be highly appreciated! Thanks!

Best

André

------------------------------------------------------
Dipl. Psych André Ziervogel
andre.ziervogel at psychol.uni-giessen.de
------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://stat.ethz.ch/pipermail/r-sig-hpc/attachments/20140807/90d4b356/attachment.bin>


More information about the R-sig-hpc mailing list