ParallelParam-classes: Classes to configure parallel evaluation

Description Usage Arguments Constructors Methods Internal Class Fields and Methods Author(s) See Also Examples

Description

Configure and register parallel calculations, e.g., for Team evaluation.

Usage

1
2
3
MulticoreParam(size = getOption("mc.cores", 2L),
    mc.set.seed = TRUE, ...)
register(param)

Arguments

size

The number of members in the parallel cluster.

mc.set.seed

logical(1); see ?mcparallel on unix platforms.

param

A ParallelParam instance, such as generated by MulticoreParam().

...

Additional arguments, e.g., verbose, passed to the Streamer class.

Constructors

Use MulticoreParam to construct instances of this class.

Methods

register

Invoked with an argument param stores the param for use in subsequent parallel computation. Use NULL to clear the register. The function returns, invisibly, the previously registered parameter instance, if any.

Internal Class Fields and Methods

Internal fields of this class are are described with, e.g., getRefClass("MulticoreParam")$fields.

Internal methods of this class are described with getRefClass("MulticoreParam")$methods() and getRefClass("MulticoreParam")$help().

Author(s)

Martin Morgan mtmorgan@fhcrc.org

See Also

Team to apply one function in parallel, DAGTeam to evaluate functions whose dependencies are represented as directed acyclic graphs.

Examples

1
2
3
4
5
6
if (.Platform$OS.type != "windows") {
    oparam <- register()       ## previous setting
    param <- MulticoreParam()  ## default multicore settings
    register(param)            ## register for future use, e.g,. Team
    register(oparam)           ## reset original
}

Streamer documentation built on Nov. 8, 2020, 5:53 p.m.