Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SlurmClusterManager"
uuid = "c82cd089-7bf7-41d7-976b-6b5d413cbe0a"
authors = ["Joseph Kleinhenz <[email protected]>"]
version = "0.1.5"
version = "1.0.0"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
7 changes: 3 additions & 4 deletions src/slurmmanager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ The environment variables `SLURM_JOB_ID` or `SLURM_JOBID` and `SLURM_NTASKS` mus
mutable struct SlurmManager <: ClusterManager
jobid::Int
ntasks::Int
verbose::Bool
launch_timeout::Float64
srun_post_exit_sleep::Float64
srun_proc

function SlurmManager(;verbose=false, launch_timeout=60.0, srun_post_exit_sleep=0.01)
function SlurmManager(; launch_timeout=60.0, srun_post_exit_sleep=0.01)

jobid =
if "SLURM_JOB_ID" in keys(ENV)
Expand All @@ -39,7 +38,7 @@ mutable struct SlurmManager <: ClusterManager
jobid = parse(Int, jobid)
ntasks = parse(Int, ntasks)

new(jobid, ntasks, verbose, launch_timeout, srun_post_exit_sleep, nothing)
new(jobid, ntasks, launch_timeout, srun_post_exit_sleep, nothing)
end
end

Expand Down Expand Up @@ -201,7 +200,7 @@ function Distributed.launch(manager::SlurmManager, params::Dict, instances_arr::
write(manager.srun_proc, "\n")

t = @async for i in 1:manager.ntasks
manager.verbose && println("connecting to worker $i out of $(manager.ntasks)")
@debug "connecting to worker $i out of $(manager.ntasks)"

line = readline(manager.srun_proc)
m = match(r".*:(\d*)#(.*)", line)
Expand Down