Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
grid5000
reference-repository
Commits
89da8cb6
Commit
89da8cb6
authored
5 years ago
by
Pierre Neyron
Committed by
Pierre Neyron
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[gen] oar-properties: rework variables
parent
27f6d19a
Branches
Branches containing commit
No related tags found
1 merge request
!90
Oar properties pyxis
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/gen/oar-properties.rb
+12
-11
12 additions, 11 deletions
lib/refrepo/gen/oar-properties.rb
with
12 additions
and
11 deletions
lib/refrepo/gen/oar-properties.rb
+
12
−
11
View file @
89da8cb6
...
...
@@ -1232,7 +1232,8 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
cpu_count
=
first_node
[
'architecture'
][
'nb_procs'
]
core_count
=
first_node
[
'architecture'
][
'nb_cores'
]
/
cpu_count
cpu_core_count
=
first_node
[
'architecture'
][
'nb_cores'
]
/
cpu_count
cpu_thread_count
=
first_node
[
'architecture'
][
'nb_threads'
]
/
cpu_count
gpu_count
=
first_node
.
key?
(
"gpu_devices"
)
?
first_node
[
"gpu_devices"
].
length
:
0
cpu_model
=
"
#{
first_node
[
'processor'
][
'model'
]
}
#{
first_node
[
'processor'
][
'version'
]
}
"
...
...
@@ -1251,17 +1252,17 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
phys_rsc_map
=
{
"cpu"
=>
{
:current_ids
=>
[],
:per_server_count
=>
first_node
[
'architecture'
][
'nb_procs'
]
,
:per_server_count
=>
cpu_count
,
:per_cluster_count
=>
node_count
*
cpu_count
},
"core"
=>
{
:current_ids
=>
[],
:per_server_count
=>
first_node
[
'architecture'
][
'nb_cores'
]
/
cpu
_count
,
:per_cluster_count
=>
node_count
*
cpu_count
*
core_count
:per_server_count
=>
cpu_core
_count
,
:per_cluster_count
=>
node_count
*
cpu_count
*
cpu_
core_count
},
"gpu"
=>
{
:current_ids
=>
[],
:per_server_count
=>
first_node
.
key?
(
"gpu_devices"
)
?
first_node
[
"gpu_devices"
].
length
:
0
,
:per_server_count
=>
gpu_count
,
:per_cluster_count
=>
node_count
*
gpu_count
},
}
...
...
@@ -1346,13 +1347,13 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
############################################
# Suite of (2-a): Iterate over CPUs of the server. (rest: cores)
############################################
(
0
...
phys_rsc_map
[
"cpu"
][
:per_server
_count
]
).
each
do
|
cpu_num
|
(
0
...
cpu
_count
).
each
do
|
cpu_num
|
############################################
# Suite of (2-a): Iterate over CORES of the CPU
############################################
(
0
...
phys_rsc_map
[
"core"
][
:per_server
_count
]
).
each
do
|
core_num
|
(
0
...
cpu_core
_count
).
each
do
|
core_num
|
# Compute cpu and core ID
oar_resource_id
=
oar_resource_ids
[
core_idx
]
...
...
@@ -1387,9 +1388,9 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
# (2-d) Associate a cpuset to each core
############################################
if
core_numbering
==
'contiguous'
row
[
:cpuset
]
=
cpu_num
*
phys_rsc_map
[
"core"
][
:per_server
_count
]
+
core_num
row
[
:cpuset
]
=
cpu_num
*
cpu_core
_count
+
core_num
elsif
core_numbering
==
'round-robin'
row
[
:cpuset
]
=
cpu_num
+
core_num
*
phys_rsc_map
[
"cpu"
][
:per_server
_count
]
row
[
:cpuset
]
=
cpu_num
+
core_num
*
cpu
_count
else
raise
end
...
...
@@ -1412,13 +1413,13 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
raise
"Could not find a GPU on CPU
#{
cpu_num
}
for core
#{
row
[
:cpuset
]
}
"
end
else
gpu_idx
=
core_num
/
(
phys_rsc_map
[
"core"
][
:per_server
_count
]
/
numa_gpus
.
length
)
gpu_idx
=
core_num
/
(
cpu_core
_count
/
numa_gpus
.
length
)
selected_gpu
=
numa_gpus
[
gpu_idx
]
end
# id of the selected GPU in the node
local_id
=
node_description
[
"gpu_devices"
].
values
.
index
(
selected_gpu
)
row
[
:gpu
]
=
phys_rsc_map
[
"gpu"
][
:current_ids
][
node_index0
*
phys_rsc_map
[
"gpu"
][
:per_server
_count
]
+
local_id
]
row
[
:gpu
]
=
phys_rsc_map
[
"gpu"
][
:current_ids
][
node_index0
*
gpu
_count
+
local_id
]
row
[
:gpudevice
]
=
local_id
row
[
:gpudevicepath
]
=
selected_gpu
[
'device'
]
row
[
:gpumodel
]
=
selected_gpu
[
'model'
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment