StartWorker {taskPR}R Documentation

Start Parallel-R Worker Process

Description

Attempts to connect to the given host and establish itself as a worker process. This function is called automatically when worker processes are spawned by the main process.

Usage

StartWorker(host = "localhost", port=32000, retries=2, sleeptime=1, quiet=TRUE)

Arguments

host name of the machine that the main/controller process is on
port the (TCP/IP) port number to connect to
retries the number of times to retry making the connection
sleeptime how long (in seconds) to sleep between connection tries
quiet should the worker process supress most logging messages?

Details

The only time a user should call this function is when they started the parallel engine on the main process using the spawn=FALSE option to StartPE. In that case, the main process will block waiting for the worker processes to connect. The user must run the appropriate number of worker processes and have them call this function.

See Also

StartPE For enabling the parallel engine. PE For running parallel jobs. POBJ For returning background jobs to the main process.

Examples

## Not run: 
# If you have MPI running
StartPE(2)

x = matrix(rnorm(128 * 128), 128, 128)

PE( a <- svd(x) )
PE( b <- solve(x) )
PE( y <- b %*% a$u )
POBJ( y )
str(y)
StopPE()
## End(Not run)

[Package taskPR version 0.30 Index]