Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.44 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.44 KB

DEPRECATED!!!!

See newer (better) version at https://github.com/magerton/FARMTest.jl which uses SlurmClusterManager.jl

Old README.md

Simple example scripts for running Julia on a SLURM

These scripts are based on examples in the ACCRE/SLURM repo

About

When running Julia on a cluster using SLURM, we have to do 2 things

  1. Run Julia through a SLURM sbatch script
  2. Tell Julia to use ClusterManagers.jl and the appropriate addprocs function
    using ClusterManagers
    
    addprocs_slurm(np::Int)
    # or
    addprocs(SlurmManager(np::Int))
    We can also keep compatibility with non-SLURM parallel computing by doing something like
    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

Some Julia/SLURM info