[R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()
Martin Morgan
mtmorgan at fhcrc.org
Mon Sep 29 00:19:12 CEST 2008
"Rainer M Krug" <r.m.krug at gmail.com> writes:
> Hi
>
> I am trying to utilize my dual core processor (and later a
> High-performance clusters (HPC) ) by using the Rmpi, snow, snowfall,
> ... packages, but I am struggling at the beginning, i.e. to initialise
> the "cluster" on my dual core computer. Whenever I try to initialize
> it (via sfInit(parallel=TRUE, cpus=2) or mpi.spawn.Rslaves(nslaves=2)
> ), I get an error message:
>
>> sfInit(parallel=TRUE, cpus=2)
> Forced parallel. Using session: XXXXXXXXR_rkrug_143706_092708
>
> Error in mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count, :
> MPI_Comm_spawn is not supported.
> Error in sfInit(parallel = TRUE, cpus = 2) :
> Starting of snow cluster failed! Error in mpi.comm.spawn(slave =
> mpitask, slavearg = args, nslaves = count, :
> MPI_Comm_spawn is not supported.
>
> and
>
>> mpi.spawn.Rslaves(nslaves=2)
> Error in mpi.spawn.Rslaves(nslaves = 2) :
> You cannot use MPI_Comm_spawn API
This error comes from Rmpi,
> head(mpi.spawn.Rslaves, 6)
1 function (Rscript = system.file("slavedaemon.R", package = "Rmpi"),
2 nslaves = mpi.universe.size(), root = 0, intercomm = 2, comm = 1,
3 hosts = NULL, needlog = TRUE, mapdrive = TRUE)
4 {
5 if (!is.loaded("mpi_comm_spawn"))
6 stop("You cannot use MPI_Comm_spawn API")
and occurs when the compiler variable MPI2 is undefined when your
package is installed. Likely this means that your mpi installation is
either old (unlikely?) or that your Rmpi installation failed to
properly detect the installed mpi version. It's difficult to know
which, without more information on how the mpi and Rmpi installations
went, at a minimum the result of R's sessionInfo() command and mpirun
--version but likely including the output of Rmpi's installation.
Dirk Eddelbuettel
(https://stat.ethz.ch/pipermail/r-devel/2008-September/050665.html)
suggested that snow's makeSOCKcluster is an easier starting point for
single computer 'clusters' or other configurations where significant
system administration is not desired -- these should work without
additional software on most systems, even if more limiting in the long
term (in my opinion). See, e.g., the examples on the help page for
clusterApply for basic operation. A bit oddly, apparently the
'snowfall' package restricts snow's functionality to mpi clusters. So
you might start with snow directly.
Martin
>
> I followed the pdf "Developing parallel programs using snowfall" by
> Jochen Knaus,. installed the relevant libraries and programs, but it
> does not work.
>
> I am stuck.
>
> Any help appreciated,
>
> Rainer
>
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Faculty of Science
> Natural Sciences Building
> Private Bag X1
> University of Stellenbosch
> Matieland 7602
> South Africa
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M2 B169
Phone: (206) 667-2793
More information about the R-help
mailing list