Utilities and Extensions for Foreach Loops
registerDoBackend
is a unified register function
for foreach backends.
getDoBackend
returns the internal data of the
currently registered foreach %dopar% backend.
setDoBackend
is identical to
setDoPar
, but returns the internal
of the previously registered backend.
register
is a generic function that register
objects. It is used to as a unified interface to register
foreach backends.
ForeachBackend
is a factory method for foreach
backend objects.
getDoParHosts
is a generic function that returns
the hostname of the worker nodes used by a backend.
getDoParNHosts
returns the number of hosts used by
a backend.
registerDoBackend(object, ...) getDoBackend() setDoBackend(data, cleanup = FALSE) register(x, ...) ForeachBackend(object, ...) ## S4 method for signature 'doParallel_backend' ForeachBackend(object, cl, type = NULL) ## S4 method for signature 'doPSOCK_backend' ForeachBackend(object, cl) ## S4 method for signature 'doMPI_backend' ForeachBackend(object, cl) getDoParHosts(object, ...) getDoParNHosts(object)
object |
specification of a foreach backend, e.g. ‘SEQ’, ‘PAR’ (for doParallel), ‘MPI’, etc... |
... |
extra arguments passed to the backend own registration function. |
data |
internal data of a foreach %dopar% backend. |
cleanup |
logical that indicates if the previous backend's cleanup procedure should be run, before setting the new backend. |
x |
specification of a foreach backend |
cl |
cluster specification: a cluster object or a numeric that indicates the number of nodes to use. |
type |
type of cluster, See
|
signature(object = "ANY")
:
Default method defined to throw an informative error
message, when no other method was found.
signature(object =
"character")
: Creates a foreach backend object based on
its name.
signature(object =
"missing")
: Creates a foreach backend object for the
currently registered backend.
signature(object = "NULL")
:
Dummy method that returns NULL
, defined for
correct dispatch.
signature(object =
"cluster")
: Creates a doParallel foreach backend that
uses the cluster described in object
.
signature(object =
"numeric")
: Creates a doParallel foreach backend with
object
processes.
signature(object =
"doParallel_backend")
: doParallel-specific backend
factory
signature(object =
"doParallelMC_backend")
: doParallel-specific backend
factory for multicore (fork) clusters
This method is needed since version 1.0.7 of
doParallel, which removed internal function
info
and defined separate backend names for mc and
snow clusters.
signature(object =
"doParallelSNOW_backend")
: doParallel-specific backend
factory for SNOW clusters.
This method is needed since version 1.0.7 of
doParallel, which removed internal function
info
and defined separate backend names for mc and
snow clusters.
signature(object =
"doPSOCK_backend")
: doSNOW-specific backend factory
signature(object =
"mpicluster")
: Creates a doMPI foreach backend that uses
the MPI cluster described in object
.
signature(object =
"doMPI_backend")
: doMPI-specific backend factory
signature(object = "ANY")
:
Default method that tries to heuristaically infer the
number of hosts and in last resort temporarly register
the backend and performs a foreach loop, to retrieve the
nodename from each worker.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.