parallelly (version 1.21.0)

parallelly.options: Options Used by the 'parallelly' Package

Description

Below are the R options and environment variables that are used by the parallelly package and packages enhancing it.

WARNING: Note that the names and the default values of these options may change in future versions of the package. Please use with care until further notice.

Arguments

Backward compatibility with the <span class="pkg">future</span> package

The functions in the parallelly package originates from the future package. Because they are widely used within the future ecosystem, we need to keep them backward compatible for quite a long time, in order for all existing packages and R scripts to have time to adjust. This also goes for the R options and the environment variables used to configure these functions. All options and environment variables used here have prefixes parallelly. and R_PARALLELLY_, respectively. Because of the backward compatibility with the future package, the same settings can also be controlled by options and environment variables with prefixes future. and R_FUTURE_ until further notice.

Options for debugging

parallelly.debug:

(logical) If TRUE, extensive debug messages are generated. (Default: FALSE)

Options for configuring low-level system behaviors

parallelly.availableCores.methods / future.availableCores.methods:

(character vector) Default lookup methods for availableCores(). (Default: c("system", "mc.cores", "_R_CHECK_LIMIT_CORES_", "PBS", "SGE", "Slurm", "LSF", "custom", "fallback"))

parallelly.availableCores.custom / future.availableCores.custom:

(function) If set and a function, then this function will be called (without arguments) by availableCores() where its value, coerced to an integer, is interpreted as a number of cores.

parallelly.availableCores.fallback / future.availableCores.fallback:

(integer) Number of cores to use when no core-specifying settings are detected other than "system". If not specified, this option is set according to system environment variable R_FUTURE_AVAILABLECORES_FALLBACK when the parallelly package is loaded. This options makes it possible to set the default number of cores returned by availableCores() / availableWorkers() yet allow users and schedulers to override it. In multi-tenant environment, such as HPC clusters, it is useful to set R_FUTURE_AVAILABLECORES_FALLBACK to 1.

parallelly.availableCores.system / future.availableCores.system:

(integer) Number of "system" cores used instead of what is reported by availableCores(which = "system"). If not specified, this option is set according to system environment variable R_FUTURE_AVAILABLECORES_SYSTEM when the parallelly package is loaded. This option allows you to effectively override what parallel::detectCores() reports the system has.

parallelly.availableWorkers.methods / future.availableWorkers.methods:

(character vector) Default lookup methods for availableWorkers(). (Default: c("mc.cores", "_R_CHECK_LIMIT_CORES_", "PBS", "SGE", "Slurm", "LSF", "custom", "system", "fallback"))

parallelly.availableWorkers.custom / future.availableWorkers.custom:

(function) If set and a function, then this function will be called (without arguments) by availableWorkers() where its value, coerced to a character vector, is interpreted as hostnames of available workers.

parallelly.fork.enable / future.fork.enable:

(logical) Enable or disable forked processing. If FALSE, multicore futures becomes sequential futures. If not specified, this option is set according to environment variable R_FUTURE_FORK_ENABLE. If NA, or not set (the default), the a set of best-practices rules decide whether should be supported or not. See supportsMulticore() for more details.

parallelly.supportsMulticore.unstable / future.supportsMulticore.unstable:

(character) Controls whether a warning should be produced or not whenever multicore processing is automatically disabled because the environment in which R runs is considered unstable for forked processing, e.g. in the RStudio environment. If "warning" (default), then an informative warning is produces the first time 'multicore' or 'multiprocess' futures are used. If "quiet", no warning is produced. If not specified, this option is set according to environment variable R_FUTURE_SUPPORTSMULTICORE_UNSTABLE. See supportsMulticore() for more details.

See Also

To set R options when R starts (even before the parallelly package is loaded), see the Startup help page. The startup package provides a friendly mechanism for configuring R's startup process.

Examples

Run this code
# NOT RUN {
# Set an R option:
options(parallelly.availableCores.fallback = 1L)

# Set an environment variable:
Sys.setenv(R_PARALLELLY_AVAILABLECORES_FALLBACK = "1")


# }

Run the code above in your browser using DataLab