We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9966ed9 commit 004ce7aCopy full SHA for 004ce7a
test/runtests.jl
@@ -15,13 +15,16 @@ end
15
println("jobid = $jobid")
16
17
# get job state from jobid
18
-getjobstate = jobid -> read(`sacct -j $jobid --format=state --noheader`, String)
+getjobstate = jobid -> begin
19
+ info = read(`scontrol show $jobid`, String)
20
+ state = match(r"JobState=(\S*)", info)
21
+ return state
22
+end
23
24
# wait for job to complete
25
status = timedwait(60.0, pollint=1.0) do
26
state = getjobstate(jobid)
- state == "" && return false
- state = first(split(state)) # don't care about jobsteps
27
+ state == nothing && return false
28
println("jobstate = $state")
29
return state == "COMPLETED" || state == "FAILED"
30
end
0 commit comments