Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ProfiT-HPC
aggregator
Commits
70b1e1ce
Commit
70b1e1ce
authored
Dec 21, 2018
by
Azat Khuziyakhmetov
Browse files
added non standart formatting of allocated cu
parent
b133e0d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
format/format.py
View file @
70b1e1ce
...
...
@@ -58,8 +58,7 @@ def format_scheme(agg, sstruc, path="", **ids):
for
fkey
,
_
in
enumerate
(
get_value
(
agg
,
build_path
(
path
,
sstruc
[
"path"
]),
**
ids
)):
ids
=
{
sstruc
[
"path"
]:
fkey
}
fres
=
fill_scheme
(
agg
,
sstruc
[
"scheme"
],
build_path
(
path
,
sstruc
[
"path"
]),
**
ids
)
result
.
append
(
fres
)
result
.
append
(
fres
)
return
result
...
...
@@ -85,5 +84,11 @@ def format(agg, type="ascii"):
def
format_acsii_nonstd
(
agg
,
result
):
# TODO: format alloc_cu
cus
=
{}
for
alloc_info
in
agg
.
job
.
alloc_cu
:
cus
[
alloc_info
.
node_id
]
=
alloc_info
.
cu_count
for
i
,
_
in
enumerate
(
result
[
"nodes"
]):
result
[
"nodes"
][
i
][
"num_cores"
]
=
cus
[
result
[
"nodes"
][
i
][
"node_name"
]]
return
result
format/formats_json.py
View file @
70b1e1ce
...
...
@@ -36,8 +36,8 @@ class OutputSchemes:
"cpu_model"
:
"cpu_model"
,
"sockets"
:
"sockets"
,
"cores_per_socket"
:
"cores_per_socket"
,
"phys_threads_per_core"
:
None
,
"virt_threads_per_core"
:
None
,
"phys_threads_per_core"
:
"phys_thr_core"
,
"virt_threads_per_core"
:
"virt_thr_core"
,
"available_main_mem"
:
"main_mem"
,
"num_cores"
:
None
,
}
...
...
test_format.py
100644 → 100755
View file @
70b1e1ce
#! /usr/bin/env python3
from
pprint
import
pprint
from
db
import
data
...
...
@@ -13,7 +15,9 @@ agg.job = data.JobData()
for
f
in
dir
(
agg
.
job
):
if
not
f
.
startswith
(
'__'
)
and
not
callable
(
getattr
(
agg
.
job
,
f
)):
setattr
(
agg
.
job
,
f
,
"job_field_"
+
f
+
"_value"
)
agg
.
job
.
alloc_cu
=
[
data
.
AllocCUData
(
"node_0_name_value"
,
1
),
data
.
AllocCUData
(
"node_1_name_value"
,
4
)
]
agg
.
nodes
=
[
data
.
NodeData
(),
data
.
NodeData
()]
for
i
,
_
in
enumerate
(
agg
.
nodes
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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