master {mspath} | R Documentation |
This is the top-level function for the master (rank 0) process in a
distributed computation. It does any necessary setup, and then
executes the R commands given in the channel
argument.
After executing the commands it shuts down the slaves and itself,
exiting R.
master(channel = "kickStart.R", comm = 0)
channel |
A source of R commands to execute within the
distributed environment. They should create and use a
mspathDistributedCalculator . Invoking
mspath with the optional comm argument will
satisfy that requirement. |
comm |
The MPI communicator to use. Usually the default will suffice. |
Before invoking this command you must establish the necessary MPI environment and launch appropriate slave processes. This routine does not spawn slave processes, in part so it's useful on systems without that capability.
The code you provide by the channel
should not attempt to shut
things down itself; master
always does so at the end.
The return value of the final mpi.exit
.
Requires package Rmpi exist and be loadable via
library(Rmpi)
. It will be loaded automatically; you should not
load it yourself.
See the details section for more about the necessary setup.
Since the function exits R without saving, you will need to arrange to store or display your results.
Ross Boylan
Rmpi,
mspathDistributedCalculator
,
mspath