[R-sig-hpc] unstable repeated spawning with Rmpi under Windows 7

Hao Yu hyu at stats.uwo.ca
Thu Dec 13 16:48:16 CET 2012


Windows always behaves different, in particular memory allocation and
release. I don't think repeated spawning is good even for MPI itself. Why
don't you keep the session and continue your computation?

One possible solution is to add a sleep period before next spawning. Try
Sys.sleep(5)
(sleep 5 sec) before next spawning.

Hao

Till Francke wrote:
> Dear list,
> I observed irregular hang-ups when repeatedly performing this code (R
> 2.15.0, Windows 7 64, MPICH-II, Rmpi_0.6-2):
>
> <code>
>
> library(Rmpi)
> mpi.spawn.Rslaves(nslaves=8)
> mpi.close.Rslaves()
>
> </code>
>
> When I repeatedly call this code, my system hangs at
> "mpi.spawn.Rslaves(nslaves=8)" - sometimes at the second, sometimes at the
> third try. Then, killing R remains the only option.
> When I use the program "Process Explorer" to see what is happening I
> observed that mpi.spawn.Rslaves() creates mpiexec.exe and a service
> smpd.exe, comprising a tree of 8 consoles (cmd.exe) each holding an
> instance of R (Rterm.exe). Apparently, mpi.close.Rslaves() is supposed to
> close these. However, evidently this sometimes fails and the subsequent
> call of mpi.spawn.Rslaves() stalls the system. If I remove the consoles
> (but not the parent smpd.exe) manually, the next call works as supposed.
> Is there anything I can do about it (except switching to Linux)?
>
> Thanks for your advice,
>
> Till
>
>> sessionInfo()
>
> R version 2.15.0 (2012-03-30)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252
> LC_MONETARY=German_Germany.1252
> [4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] Rmpi_0.6-2
>
> _______________________________________________
> 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
Office Phone#:(519)-661-3622
Fax Phone#:(519)-661-3813
The University of Western Ontario
London, Ontario N6A 5B7
http://www.stats.uwo.ca/yu



More information about the R-sig-hpc mailing list