Skip to content

using future on a computing cluster with slurm #518

@ktyssowski

Description

@ktyssowski

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions