[R-sig-hpc] Basic PBS question
Brian Smith
bsmith030465 at gmail.com
Sun Nov 16 20:48:05 CET 2014
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')
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]]
More information about the R-sig-hpc
mailing list