File: DoparParam-class.Rd

package info (click to toggle)
r-bioc-biocparallel 1.40.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,768 kB
  • sloc: cpp: 139; sh: 14; makefile: 8
file content (113 lines) | stat: -rw-r--r-- 3,121 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
\name{DoparParam-class}
\Rdversion{1.1}
\docType{class}

\alias{DoparParam-class}
\alias{DoparParam}
\alias{coerce,SOCKcluster,DoparParam-method}

\alias{bpbackend,DoparParam-method}
\alias{bpbackend<-,DoparParam,SOCKcluster-method}

\alias{bpisup,DoparParam-method}
\alias{bpstart,DoparParam-method}
\alias{bpstop,DoparParam-method}
\alias{bpworkers,DoparParam-method}


\alias{show,DoparParam-method}

\title{Enable parallel evaluation using registered dopar backend}

\description{

  This class is used to dispatch parallel operations to the dopar
  backend registered with the foreach package.

}

\usage{
DoparParam(stop.on.error=TRUE,
           RNGseed = NULL)
}

\details{

  \code{DoparParam} can be used for shared or non-shared memory computing
  depending on what backend is loaded. The \code{doSNOW} package supports
  non-shared memory, \code{doParallel} supports both shared and non-shared.
  When not specified, the default number of workers in \code{DoparParam}
  is determined by \code{getDoParWorkers()}. See the \code{foreach} package
  vignette for details using the different backends:

  \url{http://cran.r-project.org/web/packages/foreach/vignettes/foreach.pdf}

}

\arguments{
    \item{stop.on.error}{\code{logical(1)}} Stop all jobs as soon as one
        jobs fails (\code{stop.on.error == TRUE}) or wait for all jobs
        to terminate.  Default is \code{TRUE}.
      \item{RNGseed}{
        \code{integer(1)} Seed for random number generation. The seed is
        used to set a new, independent random number stream for each
        element of \code{X}. The ith element recieves the same stream seed,
        regardless of use of \code{SerialParam()}, \code{SnowParam()}, or
        \code{MulticoreParam()}, and regardless of worker or task
        number. When \code{RNGseed = NULL}, a random seed is used.
      }
}

\section{DoparParam constructor}{

  Return a proxy object that dispatches parallel evaluation to the
  registered foreach parallel backend.

  There are no options to the constructor. All configuration should be
  done through the normal interface to the foreach parallel backends.

}

\section{Methods}{

  The following generics are implemented and perform as documented on
  the corresponding help page (e.g., \code{?bpisup}):
  \code{\link{bpworkers}}, \code{\link{bpnworkers}},
  \code{\link{bpstart}}, \code{\link{bpstop}}, \code{\link{bpisup}},
  \code{\link{bpbackend}}, \code{\link{bpbackend<-}},
  \code{\link{bpvec}}.

}


\author{Martin Morgan \url{mailto:mtmorgan@fhcrc.org}}

\seealso{

  \code{getClass("BiocParallelParam")} for additional parameter classes.

  \code{register} for registering parameter classes for use in parallel
  evaluation.

  \code{foreach-package} for the parallel backend infrastructure
  used by this param class.

}

\examples{

\dontrun{
# First register a parallel backend with foreach
library(doParallel)
registerDoParallel(2)

p <- DoparParam()
bplapply(1:10, sqrt, BPPARAM=p)
bpvec(1:10, sqrt, BPPARAM=p)

## set DoparParam() as the default for BiocParallel
## register(DoparParam(), default=TRUE)
}
}

\keyword{classes}