[R-sig-hpc] Rmpi spawning across nodes.

Stephen Weston stephen.b.weston at gmail.com
Thu Mar 29 20:56:55 CEST 2012

Hi Ben,

You have to run R via mpirun, otherwise all of the workers start
on the one node.

> I have tried using mpirun -np 4 in front of the R - call, but this just
> fails without message.

You have to use '-np 1', otherwise your script will be executed
by mpirun four times, each trying to spawn four workers.
I'm not sure if that explains failing without a message, however.

Try something like this:

#PBS -o 'qsub.out'
#PBS -e 'qsub.err'
#PBS -l nodes=4:ppn=1
#PBS -m bea


# Run an R script
mpirun -hostfile $PBS_NODEFILE -np 1 R --slave -f

You may not need to use '-hostfile $PBS_NODEFILE', depending on
how your Open MPI was built, but I don't think if ever hurts, and
it may be required for your installation.

- Steve

More information about the R-sig-hpc mailing list