Skip to content

DEPRECATED - see github.com/magerton/FARMTest.jl Example for running Julia with SLURM

Notifications You must be signed in to change notification settings

magerton/julia-slurm-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

DEPRECATED - see github.com/magerton/FARMTest.jl Example for running Julia with SLURM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published