Basic PBS question
Thanks Sean. I run into trouble when installing the packages. After invoking R, I try to install the packages - with mixed success:
install.packages("parallel")
Installing package into ?/nv/dom/R/x86_64-unknown-linux-gnu-library/3.1? (as ?lib? is unspecified) Warning message: package ?parallel? is not available (for R version 3.1.0)
install.packages("Rmpi")
Installing package into ?/nv/dom/R/x86_64-unknown-linux-gnu-library/3.1? (as ?lib? is unspecified) trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/Rmpi_0.6-5.tar.gz' Content type 'application/x-gzip' length 102182 bytes (99 Kb) opened URL ================================================== downloaded 99 Kb * installing *source* package ?Rmpi? ... ** package ?Rmpi? successfully unpacked and MD5 sums checked checking for gcc... gcc -std=gnu99 checking whether the C compiler works... yes checking for C compiler default output file name... a.out . . checking for mpi.h... yes Trying to find libmpi.so or libmpich.a ... checking for main in -lmpi... no libmpi not found. exiting... ERROR: configuration failed for package ?Rmpi? * removing ?/nv/dom/R/x86_64-unknown-linux-gnu-library/3.1/Rmpi? The downloaded source packages are in ?/tmp/RtmpSGvCff/downloaded_packages? Warning message: In install.packages("Rmpi") : installation of package ?Rmpi? had non-zero exit status The packages ?foreach? and ?snow? installed ok, although i?m not sure how well snow will do, given that I get errors on trying to install Rmpi. Any suggestions for these? Or where I should go from here? thanks!
On Sun, Nov 16, 2014 at 2:54 PM, Sean Davis <seandavi at gmail.com> wrote:
On Sun, Nov 16, 2014 at 2:48 PM, Brian Smith <bsmith030465 at gmail.com> wrote:
Hi,
I am trying to get started on our Moab cluster. My pbs script looks like:
======= test.pbs ============
#!/bin/sh
#PBS -N job_name
#PBS -l nodes=1:ppn=3
#PBS -q debugq
module load R
cd $PBS_O_WORKDIR
mpirun -rmk pbs R --slave CMD BATCH ./test.r
======== test.r ============
print('hello world')
You'll need to change "test.R" to use something like the parallel, foreach, BiocParallel, or other parallel processing package. Just running using MPI will not help you here. Sean
To submit my job, I use:
msub test.pbs
When I execute this, the .Rout file contains 'hello world' and everything
looks ok. However, how can I get each processor to write out something
like:
'hello world from 1'
'hello world from 2'
'hello world from 3'
How can I get the processor number as an input to the r script?
many thanks!
[[alternative HTML version deleted]]
_______________________________________________ R-sig-hpc mailing list R-sig-hpc at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-hpc