master {mspath}R Documentation

Start Multi-State Path Model Distributed Calculations on Master Node

Description

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.

Usage

master(channel = "kickStart.R", comm = 0)

Arguments

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.

Details

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.

Value

The return value of the final mpi.exit.

Note

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.

Author(s)

Ross Boylan

See Also

Rmpi, mspathDistributedCalculator, mspath


[Package mspath version 0.9-9 Index]