I'm trying to use future (with Seurat) on a university computing cluster with slurm. I'm requesting 4-8 cores using the -c flag in my SBATCH script, so they should all be on the same node. However, it does not seem to be able to fork to more than one core. When I run the following:
library(future)
numCores = as.integer(Sys.getenv("SLURM_CPUS_ON_NODE"))
plan(multicore, workers=8)
print(availableCores(methods='mc.cores'))
print(numCores)
print(availableCores("multicore") > 1L)
I get:
current
1
[1] 8
nproc
FALSE
so it seems like it's unable to find the correct number of available cores -- is there some reason I should expect this configuration to be incompatible with multicore mode? -- it's not Windows and I'm not using RStudio. Any ideas how to fix it?
I'm trying to use future (with Seurat) on a university computing cluster with slurm. I'm requesting 4-8 cores using the -c flag in my SBATCH script, so they should all be on the same node. However, it does not seem to be able to fork to more than one core. When I run the following:
I get:
so it seems like it's unable to find the correct number of available cores -- is there some reason I should expect this configuration to be incompatible with multicore mode? -- it's not Windows and I'm not using RStudio. Any ideas how to fix it?