bin.nchar {Rmpi}R Documentation

Internal functions

Description

Internal functions used by other MPI functions.

bin.nchar is used to find the number of char in a binary character vector (length 1) produced by serialize.

getpid is used to get R process id which then is used for setting R slave log files.

mpi.comm.is.null is used to test if a comm is MPI_COMM_NULL (empty members).

mpi.remote.fun is used by mpi.remote.exec for preparing a remote function with master variables.

mpi.wrap.fun is used by mpi.parallel.sim for preparing a wrap function.

mpi.remote.slave is executed on R slaves by mpi.remote.exec (to carry out a remote command).

mpi.parallel.slave is executed on R slaves by mpi.parallel.sim (to carry out parallel Monto Carlo simulation).

string create a string (empty space character) buffer.

typeindex checks an R object mode (integer, double, char, or others).

Usage

bin.nchar(x)
getpid()
mpi.comm.is.null(comm)
mpi.remote.fun(cmd, ..., needsub = TRUE, width.cutoff = 500)
mpi.wrap.fun(cmd,arg,cmd.name=substitute(cmd))
mpi.remote.slave(cmd, tag, ret)
mpi.parallel.slave()
string(length)
typeindex(x)

Arguments

comm a communicator number.
cmd a function name.
arg optional argument list to cmd.
cmd.name a function name as a string.
... argument lists to be passed to cmd.
needsub logical.
width.cutoff an option used by deparse.
tag a tag number
ret logical.
x an R object.
length length of a string.

Value

bin.nchar returns the length of a binary char vector.
getpid returns an integer (process id).
mpi.remote.fun returns a string (a function with string quotation).
mpi.wrap.fun returns a function with argument values replaced from arg. If there is no ... argument in cmd, the original function is returned. Otherwise a wrap function is returned (it is a wrap to the function cmd.)
string returns an empty character string.
typeindex returns c(1, length(x)) if x is an integer vector; c(2,length(x)) if x is a double vector; and -1 for other objects.

Author(s)

Hao Yu

See Also

mpi.spawn.Rslaves, mpi.remote.exec. mpi.parallel.sim.


[Package Contents]