Last data update: 2014.03.03

R: Classes to configure parallel evaluation
ParallelParamR Documentation

Classes to configure parallel evaluation

Description

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

Usage

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

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
}

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Streamer)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Streamer/ParallelParam-classes.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ParallelParam
> ### Title: Classes to configure parallel evaluation
> ### Aliases: ParallelParam-class ParallelParam ParallelRegister-class
> ###   MulticoreParam-class MulticoreParam register
> ### Keywords: classes
> 
> ### ** Examples
> 
> 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
+ }
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>