File: bpoptions.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 (99 lines) | stat: -rw-r--r-- 3,025 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
\name{bpoptions}

\alias{bpoptions}

\title{Additional options to parallel evaluation}

\description{
  This function is used to pass additional options to \code{bplapply()}
  and other functions function. One use case is to use the argument
  \code{BPOPTIONS} to temporarily change the parameter of \code{BPPARAM}
  (e.g. enabling the progressbar). A second use case is to change the
  behavior of the parallel evaluation (e.g. manually exporting some
  variables to the worker)
}
\usage{
bpoptions(
    workers, tasks, jobname, log, logdir, threshold, resultdir,
    stop.on.error, timeout, exportglobals, exportvariables, progressbar,
    RNGseed, force.GC, fallback, exports, packages, ...
)
}

\arguments{
  \item{workers}{integer(1) or character() parameter for \code{BPPARAM};
    see \code{\link{bpnworkers}}.}

  \item{tasks}{integer(1) parameter for \code{BPPARAM}; see
    \code{\link{bptasks}}.}

  \item{jobname}{character(1) parameter for \code{BPPARAM}; see
    \code{\link{bpjobname}}.}

  \item{log}{logical(1) parameter for \code{BPPARAM}; see
    \code{\link{bplog}}.}

  \item{logdir}{character(1) parameter for \code{BPPARAM}; see
    \code{\link{bplogdir}}.}

  \item{threshold}{ A parameter for \code{BPPARAM}; see
    \code{\link{bpthreshold}}.}

  \item{resultdir}{character(1) parameter for \code{BPPARAM}; see
    \code{\link{bpresultdir}}.}

  \item{stop.on.error}{logical(1) parameter for \code{BPPARAM}; see
    \code{\link{bpstopOnError}}.}

  \item{timeout}{integer(1) parameter for \code{BPPARAM}; see
    \code{\link{bptimeout}}.}

  \item{exportglobals}{logical(1) parameter for \code{BPPARAM}; see
    \code{\link{bpexportglobals}}.}

  \item{exportvariables}{A parameter for \code{BPPARAM}; see
    \code{\link{bpexportvariables}}.}

  \item{progressbar}{logical(1) parameter for \code{BPPARAM}; see
    \code{\link{bpprogressbar}}.}

  \item{RNGseed}{integer(1) parameter for \code{BPPARAM}; see
    \code{\link{bpRNGseed}}.}

  \item{force.GC}{logical(1) parameter for \code{BPPARAM}; see
    \code{\link{bpforceGC}}.}

  \item{fallback}{logical(1) parameter for \code{BPPARAM}; see
    \code{\link{bpfallback}}.}

  \item{exports}{character() The names of the variables in the global
    environment which need to be exported to the global environment of
    the worker. This option works independently of the option
    \code{exportvariables}.}

  \item{packages}{character() The packages that needs to be attached by
    the worker prior to the evaluation of the task. This option works
    independently of the option \code{exportvariables}.}

  \item{...}{
    Additional arguments which may(or may not) work for some specific
    type of \code{BPPARAM}.
  }
}

\value{
  A list of options
}

\author{Jiefei Wang}

\seealso{
  \code{\link{BiocParallelParam}}, \code{\link{bplapply}}, \code{\link{bpiterate}}.
}
\examples{
  p <- SerialParam()
  bplapply(1:5, function(x) Sys.sleep(1), BPPARAM = p,
         BPOPTIONS = bpoptions(progressbar = TRUE, tasks = 5L))
}

\keyword{manip}