User Tools

Site Tools


howto:r

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
howto:r [2016/04/05 14:23]
wikiadmin [Parallel R]
howto:r [2016/06/17 09:29]
dane Add pdb example
Line 9: Line 9:
  
  
-=====Parallel R=====+===== Parallel R =====
  
 The ''​Rmpi'',​ ''​doMPI''​ and other packages are already installed to allow R to use MPI to distribute its work across multiple nodes of the cluster. **Please submit a request to helpdesk should you need any other packages installed.** The ''​Rmpi'',​ ''​doMPI''​ and other packages are already installed to allow R to use MPI to distribute its work across multiple nodes of the cluster. **Please submit a request to helpdesk should you need any other packages installed.**
Line 59: Line 59:
 qstat -w qstat -w
 </​code>​ </​code>​
 +
 +==== R/​bioconductor ====
 +
 +Here is a more complete example
 +
 +=== pbdR example ===
 +== Job scripts ==
 +<file bash pbdtest.qsub>​
 +#PBS -l select=2:​ncpus=8:​mpiprocs=8:​jobtype=nehalem,​place=excl
 +#PBS -l walltime=00:​01:​00
 +#PBS -q normal
 +#PBS -P SHORTNAME
 +#PBS -M YOUREMAILADDRESS
 +#PBS -m be
 +#PBS -e /​mnt/​luster/​users/​USERNAME/​pbdR_test/​std_err.txt
 +#PBS -o /​mnt/​lustre/​users/​USERNAME/​pbdR_test/​std_out.txt
 +#PBS -N PBDR_TEST
 +#PBS -mb
 +
 +module add chpc/​R/​3.2.3-gcc5.1.0
 +
 +NP=`cat ${PBS_NODEFILE} | wc -l`
 +
 +cd /​mnt/​lustre/​users/​USERNAME/​pbdR_test/​
 +mpirun -np ${NP} -machinefile ${PBS_NODEFILE} Rscript test_script.R
 +
 +</​file>​
 +Note: __USERNAME__ should contain your actual user name!
 +
 +<file R test_script.R>​
 +library(pbdMPI,​ quiet=TRUE)
 +init()
 +my.rank <- comm.rank()
 +comm.print(my.rank,​ all.rank=TRUE)
 +
 +finalize()
 +</​file>​
 +
 +== Submit your job ==
 +Finally submit your job using:<​code bash>​user@login01:​~ $ qsub pbdtest.qsub</​code>​
  
/var/www/wiki/data/pages/howto/r.txt · Last modified: 2020/07/06 14:03 by kevin