22# '
33# ' @inheritParams future::FutureBackend
44# '
5- # ' @param resources (optional) A named list passed to the \pkg{batchtools}
6- # ' template (available as variable `resources`). See Section 'Resources'
7- # ' in [batchtools::submitJobs()] more details.
8- # '
95# ' @param workers (optional) The maximum number of workers the batchtools
106# ' backend may use at any time. Interactive and "local" backends can only
117# ' process one future at the time (`workers = 1L`), whereas HPC backends,
1511# ' \code{getOption("\link{future.batchtools.workers}")}.
1612# ' If neither are specified, then the default is `100`.
1713# '
18- # ' @param finalize If TRUE, any underlying registries are
19- # ' deleted when this object is garbage collected, otherwise not.
14+ # ' @param finalize If TRUE, a future's \pkg{batchtools}
15+ # ' \link[batchtools:makeRegistry]{Registry} is automatically deleted when
16+ # ' the future is garbage collected, otherwise not.
2017# '
21- # ' @param conf.file (optional) A batchtools configuration file.
18+ # ' @param cluster.functions (optional) Assigned as-is to the each future's
19+ # ' \pkg{batchtools} \link[batchtools:makeRegistry]{Registry}.
2220# '
23- # ' @param cluster.functions (optional) A batchtools
24- # ' [ClusterFunctions][batchtools::ClusterFunctions] object.
21+ # ' @param registry (optional) A named list of settings applied to each
22+ # ' future's \pkg{batchtools} \link[batchtools:makeRegistry]{Registry}.
23+ # ' This is a more convenient alternative to using argument `conf.file`.
2524# '
26- # ' @param registry (optional) A named list of settings to control the setup
27- # ' of the batchtools registry.
25+ # ' @param conf.file (optional) A "batchtools-configuration" R script, which
26+ # ' is sourced when each future's \pkg{batchtools}
27+ # ' \link[batchtools:makeRegistry]{Registry} is created. Any variables
28+ # ' created by this script is assigned to the registry.
29+ # ' The default file is the one found by [batchtools::findConfFile()], if any.
30+ # '
31+ # ' @param resources (optional) A named list passed to the \pkg{batchtools}
32+ # ' job-script template as variable `resources`. See Section 'Resources'
33+ # ' in [batchtools::submitJobs()] more details.
2834# '
2935# ' @param \ldots Not used.
3036# '
3137# ' @return A [future::FutureBackend] object of class BatchtoolsFutureBackend
3238# '
3339# ' @aliases BatchtoolsUniprocessFutureBackend BatchtoolsMultiprocessFutureBackend
34- # ' @rdname BatchtoolsFuture
3540# ' @importFrom utils file_test
3641# ' @importFrom future FutureBackend
3742# ' @keywords internal
3843# ' @export
39- BatchtoolsFutureBackend <- function (workers = NULL , resources = list (),
44+ BatchtoolsFutureBackend <- function (
45+ workers = NULL , resources = list (),
4046 finalize = getOption(" future.finalize" , TRUE ),
41- conf.file = findConfFile(),
4247 cluster.functions = NULL ,
4348 registry = list (),
49+ conf.file = findConfFile(),
4450 interrupts = TRUE ,
4551 ... ) {
4652 assert_no_positional_args_but_first()
@@ -103,6 +109,8 @@ BatchtoolsFutureBackend <- function(workers = NULL, resources = list(),
103109}
104110
105111
112+ # ' @inheritParams BatchtoolsFutureBackend
113+ # '
106114# ' @export
107115BatchtoolsUniprocessFutureBackend <- function (workers = 1L , ... ) {
108116 assert_no_positional_args_but_first()
@@ -111,6 +119,8 @@ BatchtoolsUniprocessFutureBackend <- function(workers = 1L, ...) {
111119 core
112120}
113121
122+ # ' @inheritParams BatchtoolsFutureBackend
123+ # '
114124# ' @export
115125BatchtoolsMultiprocessFutureBackend <- function (... ) {
116126 assert_no_positional_args_but_first()
0 commit comments