[R] mpirun question with Rmpi
Martin Morgan
mtmorgan at fhcrc.org
Sun Jul 13 19:44:45 CEST 2008
"Erin Hodgess" <erinm.hodgess at gmail.com> writes:
> Dear R People:
>
> I'm running Rmpi on a single machine and I have the following
> statement from the command line:
>
> mpirun -np 3 ./R --no-save < eek1.in >stuff4.out
All three versions of eek1.in write to the same location, over-writing
one another. You happen to see the results of the third process; some
other time you might see the three outputs intermingled.
The solutions are to have eek1.in create an appropriate output file
(e.g., using mpi.comm.rank() to uniquify a base name) or to design
eek1.in so that one of the nodes collates and outputs the results from
all the others (i.e., only one node writes; a typical solution might
include mpi.gather.Robj followed by a conditional based on
mpi.comm.rank).
Hope that helps.
Martin
> The stuff4.out file only contains the third result. Is there a way to
> fix this such that it shows all 3 sets, please
>
> Thanks in advance,
> Erin
>
> --
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: erinm.hodgess at gmail.com
>
> ______________________________________________
> 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