Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
load_leveller
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Weber
load_leveller
Commits
a4216e44
Commit
a4216e44
authored
Apr 09, 2019
by
Lukas Weber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
job status fix
parent
390ffb98
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
python/loadleveller/jobstatus.py
python/loadleveller/jobstatus.py
+6
-7
python/ydelete
python/ydelete
+1
-1
src/runner.cpp
src/runner.cpp
+1
-1
No files found.
python/loadleveller/jobstatus.py
View file @
a4216e44
...
...
@@ -16,13 +16,12 @@ class JobProgress:
def
__init__
(
self
,
jobfile
):
self
.
jobfile
=
jobfile
with
open
(
jobfile
,
'r'
)
as
f
:
jobfile
=
yaml
.
load
(
f
)
jobfile
=
yaml
.
safe_
load
(
f
)
self
.
tasks
=
jobfile
[
'tasks'
].
keys
()
self
.
restart
=
False
self
.
progress
=
[]
for
task
in
self
.
tasks
:
tp
=
TaskProgress
()
...
...
@@ -42,18 +41,18 @@ class JobProgress:
tp
.
therm_sweeps
+=
f
[
'/thermalization_sweeps'
][
0
]
if
sweeps
<
target_sweeps
+
target_therm
:
if
tp
.
sweeps
<
tp
.
target_sweeps
+
tp
.
target_therm
:
self
.
restart
=
True
self
.
progress
.
append
(
tp
)
def
needs_restart
():
def
needs_restart
(
self
):
return
self
.
restart
def
needs_merge
():
def
needs_merge
(
self
):
result_mtime
=
0
try
:
result_mtime
=
os
.
path
.
getmtime
(
args
.
jobfile
+
'.results.yml'
)
result_mtime
=
os
.
path
.
getmtime
(
self
.
jobfile
+
'.results.yml'
)
except
FileNotFoundError
:
return
True
...
...
@@ -98,7 +97,7 @@ def ystatus():
return
False
for
task
,
tp
in
zip
(
job_prog
.
tasks
,
job_prog
.
progress
):
print
(
'{t}: {tp.
run_count
} runs, {tp.sweeps}/{tp.target_sweeps} sweeps, {tp.therm_sweeps}/{tp.target_therm} thermalization'
.
format
(
t
=
task
,
tp
=
tp
))
print
(
'{t}: {tp.
num_runs
} runs, {tp.sweeps}/{tp.target_sweeps} sweeps, {tp.therm_sweeps}/{tp.target_therm} thermalization'
.
format
(
t
=
task
,
tp
=
tp
))
except
FileNotFoundError
as
e
:
print
(
"Error: jobfile '{}' not found."
.
format
(
args
.
jobfile
))
python/ydelete
View file @
a4216e44
...
...
@@ -11,7 +11,7 @@ args = parser.parse_args()
with
open
(
args
.
jobfile
,
'r'
)
as
f
:
jobfile
=
yaml
.
load
(
f
)
jobfile
=
yaml
.
safe_
load
(
f
)
try
:
shutil
.
rmtree
(
'{}.data'
.
format
(
args
.
jobfile
))
# adjust this if you adjust the task dir format in load-leveller
...
...
src/runner.cpp
View file @
a4216e44
...
...
@@ -50,7 +50,7 @@ static double parse_duration(std::string str) {
}
else
{
throw
std
::
runtime_error
{
"seconds"
};
}
}
catch
(
std
::
exception
e
)
{
}
catch
(
std
::
exception
&
e
)
{
throw
std
::
runtime_error
{
fmt
::
format
(
"'{}' does not fit time format [[hours:]minutes:]seconds: {}"
,
str
,
e
.
what
())};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment