See newer (better) version at https://github.com/magerton/FARMTest.jl which uses SlurmClusterManager.jl
Simple example scripts for running Julia on a SLURM
These scripts are based on examples in the ACCRE/SLURM repo
When running Julia on a cluster using SLURM, we have to do 2 things
- Run Julia through a SLURM
sbatch
script - Tell Julia to use ClusterManagers.jl and the appropriate
addprocs
functionWe can also keep compatibility with non-SLURM parallel computing by doing something likeusing ClusterManagers addprocs_slurm(np::Int) # or addprocs(SlurmManager(np::Int))
const IN_SLURM = "SLURM_JOBID" in keys(ENV) IN_SLURM && using ClusterManagers if IN_SLURM pids = addprocs_slurm(parse(Int, ENV["SLURM_NTASKS"])) print("\n") else pids = addprocs() end
- JuliaParallel/ClusterManagers.jl#84 (comment)
- http://www.stochasticlifestyle.com/multi-node-parallelism-in-julia-on-an-hpc/
- https://stackoverflow.com/questions/48631411/julia-and-slurm-setup
- https://discourse.julialang.org/t/issues-with-machinefile-and-slurm/7882/3
- https://wiki.cse.ucdavis.edu/support/hpc/software/slurm