Skip to content

Handling of multi-threaded computations on multiple nodes #7

Closed
@felixcremer

Description

@felixcremer

In my use case I would like to mix multi threaded and distributed computing on multiple nodes with these slurm allocations:

#SBATCH --nodes=6         
#SBATCH --ntasks=6        
#SBATCH --cpus-per-task=20

Currently I am adding process with the following to enable multi threading on the different nodes:

using SlurmClusterManager
addprocs(SlurmManager(), env=["JULIA_NUM_THREADS"=>ENV["SLURM_CPUS_PER_TASK"]])

This works and I am wondering, whether this is a general enough use case that it should be incorporated into SlurmClusterManager?
We could start the different julia processes with the number of threads set to SLURM_CPUS_PER_TASK.
So that the user doesnt have to specify the use of multi threading in the slurm file and in the julia script.
If you think, that this is a useful contribution to this package, I could prepare a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions