Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamas committed Sep 29, 2020
1 parent ea0219b commit 5d57c7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/slurm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,20 @@ function launch(manager::SlurmManager, params::Dict, instances_arr::Array,
fn = make_job_output_path(lpad(i, 4, "0"))
t0 = time()
while true
# Wait for output log to be created and populated, then parse
if isfile(fn) && filesize(fn) > 0
slurm_spec_match = open(fn) do f
# Due to error and warning messages, the specification
# may not appear on the file's first line
for line in eachline(f)
re_match = match(slurm_spec_regex, line)
if re_match !== nothing
return re_match
return re_match # only returns from do-block
end
end
end
if slurm_spec_match !== nothing
break
break # break if specification found
end
end
end
Expand Down

0 comments on commit 5d57c7e

Please sign in to comment.