[R-sig-hpc] unusual results with Rmpi

Hao Yu hyu at stats.uwo.ca
Thu Dec 9 19:00:42 CET 2010


I don't think
>   mpi.bcast.Robj2slave(sim.dat$bsiaic.dat)
will work because R cannot name sim.dat$bsiaic.dat as an object on slaves.

I don't know what exactly your functions do on slaves. Be aware that all
slaves are likely to have the same random seed unless parallel rng is
used. Install rlecuyer and use mpi.setup.rngstream() to initiate parallel
rng.

Hao

Maas James Dr (MED) wrote:
> I'm running a small programme as a test and to learn how to use Rmpi.
>
> I send a data set and routine to two slave nodes, and then get the answers
> back in an object.  The routines executed are Bayesian Gibbs sampling
> routines so I would expect slightly different answers back from the two
> nodes but I get identical answers back from both nodes.
>
> I'm under the impression that each node does the complete routine from
> start to finish before returning answers but this may be my
> misunderstanding.  Should the answers in fact be identical because mpi has
> split the job up between the two nodes and both contributed to the
> calculations, therefore both end up with the same answer?
>
> mpi code that gives me these results is :
>
>   ## send the data to slaves
>   mpi.bcast.Robj2slave(sim.dat$bsiaic.dat)
>   mpi.bcast.Robj2slave(sim.dat$bsdaic.dat)
>
>   ## send the jags fitting functions to slaves
>   mpi.bcast.Robj2slave(bsiaicresults)
>   mpi.bcast.Robj2slave(bsdaicresults)
>
>   ## execute the fitting functions on slaves and
>   ## get results back
>   bsiaictot <- mpi.remote.exec(bsiaicresults())
>   bsdaictot <- mpi.remote.exec(bsdaicresults())
>
>
> Any suggestions?
>
> Thanks
>
> J
>
> ===============================
> Dr. Jim Maas
> University of East Anglia
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>


-- 
Department of Statistics & Actuarial Sciences
Fax Phone#:(519)-661-3813
The University of Western Ontario
Office Phone#:(519)-661-3622
London, Ontario N6A 5B7
http://www.stats.uwo.ca/faculty/yu



More information about the R-sig-hpc mailing list