slave {mspath}R Documentation

Prepare for Distributed Multi-State Path Model Computations on Slaves

Description

This function kicks off the main loop of distributed slave processes. The master process sends them work, and eventually an indication to shut down. At that point the function shuts down R.

Usage

slave(comm = 0)

Arguments

comm An MPI communicator to use to talk to the master process

Details

The slave's outer loop receives the arguments from which to construct a local calculator. It will exit if it gets NULL arguments. Once the calculator is set up, the slave recieves free parameters values. Finally, it repeatedly asks the master for cases to evaluate and returns the results of evaluating those cases to the master. Generally there will be many sets of cases evaluated for each set of parameters, and many sets of parameters for each set of arguments.

Value

Returns likelihoods to the master process. This function never returns, since it shuts down the R process when done.

Note

Usually invoked from runeverywhere. You must set up the necessary MPI environment for the slave to do useful work. Do not load the Rmpi library, but be sure that library(Rmpi) will be able to access the library.

Author(s)

Ross Boylan

See Also

runeverywhere, master, mspathDistributedCalculator, Rmpi


[Package mspath version 0.9-9 Index]