From 5d57c7e115722b69d0c8c085ddc9be19768576d3 Mon Sep 17 00:00:00 2001 From: Graham Smith Date: Tue, 29 Sep 2020 13:29:01 -0500 Subject: [PATCH] Added comments --- src/slurm.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/slurm.jl b/src/slurm.jl index a6da015..fb0f4ae 100644 --- a/src/slurm.jl +++ b/src/slurm.jl @@ -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