[R-sig-hpc] Rmpi working with OpenMPI and PBSPro but snow fails
Huw Lynes
lynesh at cardiff.ac.uk
Thu Mar 5 15:01:06 CET 2009
On Thu, 2009-03-05 at 07:45 -0600, luke at stat.uiowa.edu wrote:
> On Thu, 5 Mar 2009, Huw Lynes wrote:
>
> You must be doing something differently than I am. I have Rmpi and
> pvm installed, but when I ask for a SOCK cluster in a standard R
> session that is what I get, even if I load Rmpi first (and it is what
> I would expect based on the code). Whe I try to run your example I do
> get an error, but that is because you are passing a string to
> makeCluster rather than an number. If I use the file
>
> -------------------------------(snow-err.R)-----------------------------------
> library(snow)
>
> ncpus <- as.numeric(Sys.getenv("NCPUS"))
> cl <- makeCluster(ncpus, type = "SOCK")
> clusterCall(cl, function() Sys.info()[c("nodename","machine")])
> stopCluster(cl)
> ------------------------------------------------------------------------------
>
> with
>
> env NCPUS=2 R -f snow-err.R
>
Right I worked out what I was doing wrong. I was still pointing to the
mpi script in my PBS script. I fixed the SOCK script based on your
advice and it's now working.
> ncpus <- as.numeric(Sys.getenv("NCPUS"))
> cl <- makeCluster(2, type = "SOCK")
> clusterCall(cl, function() Sys.info()[c("nodename","machine")])
[[1]]
nodename machine
"arccacluster268" "x86_64"
[[2]]
nodename machine
"arccacluster268" "x86_64"
> stopCluster(cl)
Just need to do some more de-bugging on the MPI side of it.
Thanks,
Huw
--
Huw Lynes | Advanced Research Computing
HEC Sysadmin | Cardiff University
| Redwood Building,
Tel: +44 (0) 29208 70626 | King Edward VII Avenue, CF10 3NB
More information about the R-sig-hpc
mailing list