Learn R Programming

future (version 0.8.2)

availableCores: Get number of available cores on current machine

Description

Get number of available cores on current machine

Usage

availableCores(methods = getOption("availableCoresMethods", c("PBS",
  "mc.cores", "system")))

Arguments

methods
A character vector specifying how to infer the number of available cores (and in what order).

Value

  • Return a positive integer equal or greater to one. If multicore processing is not supported, then one is returned.

Details

The following methods for inferring the number of cores are supported:
  • "PBS"- Query Torque/PBS environment variablePBS_NUM_PPN. Depending on PBS system configuration, thisresourceparameter may or may not default to one. It can be specified when submitting a job as in, for instance,qsub -l nodes=4:ppn=2, which requests four nodes each with two cores.
  • "mc.cores"- Query optionmc.cores, cf.mclapply().
  • "system"- QuerydetectCores().

See Also

detectCores()