[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:
#!/bin/bash
#PBS -o 'qsub.out'
#PBS -e 'qsub.err'
#PBS -l nodes=4:ppn=1
#PBS -m bea
cat $PBS_NODEFILE
hostname
cd $PBS_O_WORKDIR
# Run an R script
mpirun -hostfile $PBS_NODEFILE -np 1 R --slave -f
/nfs/user08/bw4sz/Files/Seawulf.R
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