Created
July 25, 2015 18:51
-
-
Save klainfo/c7604f059f45af494298 to your computer and use it in GitHub Desktop.
How many cpus are available for parallel jobs?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(parallel) | |
cores <- detectCores() | |
load <- read.table("/proc/loadavg",sep=" ")$V1 | |
cores*.8 - load |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment