Application Guide: R¶
This page contains information on how to use certain features of R, specifically in relation to how they function on BlueBEAR.
See the R page on the BEAR Apps website for information on available versions.
Accurate Detection of Cores¶
For certain parallel tasks you may want to dynamically determine the number of cores that are available.
BlueBEAR uses cgroups to allocate resources to jobs and the method
for accurately retrieving this value is therefore as follows:
> library(parallelly)
> availableCores()
cgroups.cpuset
8
Warning
The more common detectCores()
function does not work correctly on BlueBEAR as it returns the
total cores for the node, rather than what is actually available to the job:
> library(parallel)
> detectCores()
[1] 72