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
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
grid5000
reference-repository
Commits
c3c4516e
Commit
c3c4516e
authored
5 years ago
by
LOUP David
Browse files
Options
Downloads
Patches
Plain Diff
Check new core numbering scheme (pyxis) in valid:oar-properties
parent
e5b0d590
No related branches found
No related tags found
No related merge requests found
Pipeline
#138476
passed
5 years ago
Stage: validate
Stage: generate
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/valid/oar-properties.rb
+16
-1
16 additions, 1 deletion
lib/refrepo/valid/oar-properties.rb
with
16 additions
and
1 deletion
lib/refrepo/valid/oar-properties.rb
+
16
−
1
View file @
c3c4516e
# coding: utf-8
require
'refrepo/data_loader'
require
'net/ssh'
require
'hashdiff'
...
...
@@ -13,6 +14,7 @@ G5K_PROPERTIES=%w{api_timestamp available_upto besteffort chassis chunks cluster
module
RefRepo::Valid::OarProperties
def
self
.
check
(
options
)
ret
=
true
refapi
=
load_data_hierarchy
options
[
:sites
].
each
do
|
site
|
puts
"Checking site
#{
site
}
..."
resources
=
RefRepo
::
Utils
::
get_api
(
"sites/
#{
site
}
/internal/oarapi/resources/details.json?limit=1000000"
)[
'items'
]
...
...
@@ -77,6 +79,7 @@ module RefRepo::Valid::OarProperties
raise
"Invalid: varying nbcores inside cluster!"
end
nbcores
=
nbcores
.
first
refapi_host
=
refapi
[
'sites'
][
site
][
'clusters'
][
cluster
][
'nodes'
][
host
.
split
(
'.'
)[
0
]]
if
host_resources
.
length
!=
nbcores
puts
"ERROR: invalid number of resources for
#{
host
}
. should be nbcores."
...
...
@@ -100,10 +103,22 @@ module RefRepo::Valid::OarProperties
ret
=
false
end
# the last cpuset should be nbcores-1
if
host_cpusets_max
-
host_cpusets_min
+
1
!=
nbcores
if
host_cpusets_max
-
host_cpusets_min
+
1
!=
nbcores
and
refapi_host
[
'architecture'
][
'cpu_core_numbering'
]
!=
'contiguous-including-threads'
puts
"ERROR: cpuset values for
#{
host
}
are not sequential"
ret
=
false
end
# Core numbering is different with contiguous-including-threads
if
refapi_host
[
'architecture'
][
'cpu_core_numbering'
]
==
'contiguous-including-threads'
cpu_num_max
=
refapi_host
[
'architecture'
][
'nb_procs'
]
-
1
thread_per_cpu
=
refapi_host
[
'architecture'
][
'nb_threads'
]
/
refapi_host
[
'architecture'
][
'nb_procs'
]
core_per_cpu
=
nbcores
/
refapi_host
[
'architecture'
][
'nb_procs'
]
if
host_cpusets_max
!=
cpu_num_max
*
thread_per_cpu
+
core_per_cpu
-
1
puts
"ERROR: cpuset values for
#{
host
}
do not match contiguous-including-threads core numbering"
ret
=
false
end
end
if
options
[
:verbose
]
and
(
host_cpusets_max
-
host_cpusets_min
+
1
!=
nbcores
or
host_cores_max
-
host_cores_min
+
1
!=
nbcores
)
puts
"id cpu core cpuset"
pp
(
host_resources
.
map
{
|
e
|
[
e
[
'id'
],
e
[
'cpu'
],
e
[
'core'
],
e
[
'cpuset'
]
]
})
...
...
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