Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osc-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
mpcdf
obs
osc-plugins
Commits
44860d76
Commit
44860d76
authored
5 years ago
by
Lorenz Huedepohl
Browse files
Options
Downloads
Patches
Plain Diff
Macros %latest_intel and %latest_gcc in prjconf of software:dist
parent
ef6b515c
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#67006
passed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mpcdf_common.py
+8
-7
8 additions, 7 deletions
mpcdf_common.py
mpcdf_refresh_aggregates.py
+6
-0
6 additions, 0 deletions
mpcdf_refresh_aggregates.py
with
14 additions
and
7 deletions
mpcdf_common.py
+
8
−
7
View file @
44860d76
...
@@ -306,6 +306,12 @@ def get_microarchitecture(project):
...
@@ -306,6 +306,12 @@ def get_microarchitecture(project):
raise
Exception
(
"
Unknown micro-architecture
'
{0}
'"
.
format
(
microarch
))
raise
Exception
(
"
Unknown micro-architecture
'
{0}
'"
.
format
(
microarch
))
def
package_sort_key
(
string
):
name
,
version
=
string
.
split
(
"
_
"
,
1
)
version
=
version
.
split
(
"
_
"
)
return
(
name
,)
+
tuple
(
map
(
int
,
version
))
def
mpcdf_enable_repositories
(
api_url
,
project
,
package
,
verbose
=
False
,
filter_repos
=
None
):
def
mpcdf_enable_repositories
(
api_url
,
project
,
package
,
verbose
=
False
,
filter_repos
=
None
):
from
itertools
import
product
from
itertools
import
product
import
sys
import
sys
...
@@ -355,13 +361,8 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
...
@@ -355,13 +361,8 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
default_mpis
=
try_get_attribute
(
None
,
"
default_mpi
"
)
default_mpis
=
try_get_attribute
(
None
,
"
default_mpi
"
)
default_cudas
=
try_get_attribute
(
None
,
"
default_cuda
"
)
default_cudas
=
try_get_attribute
(
None
,
"
default_cuda
"
)
def
sort_key
(
string
):
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
intel
"
)),
key
=
package_sort_key
)[
-
1
]
name
,
version
=
string
.
split
(
"
_
"
,
1
)
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
gcc
"
)),
key
=
package_sort_key
)[
-
1
]
version
=
version
.
split
(
"
_
"
)
return
(
name
,)
+
tuple
(
map
(
int
,
version
))
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
intel
"
)),
key
=
sort_key
)[
-
1
]
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
gcc
"
)),
key
=
sort_key
)[
-
1
]
def
enable
(
name
):
def
enable
(
name
):
if
any
(
filtered_repo
in
name
for
filtered_repo
in
filter_repos
):
if
any
(
filtered_repo
in
name
for
filtered_repo
in
filter_repos
):
...
...
This diff is collapsed.
Click to expand it.
mpcdf_refresh_aggregates.py
+
6
−
0
View file @
44860d76
...
@@ -94,6 +94,12 @@ def do_mpcdf_refresh_aggregates(self, subcmd, opts, *args):
...
@@ -94,6 +94,12 @@ def do_mpcdf_refresh_aggregates(self, subcmd, opts, *args):
values
=
mpcdf_common
.
get_attribute_values
(
apiurl
,
project
,
None
,
attribute
)
values
=
mpcdf_common
.
get_attribute_values
(
apiurl
,
project
,
None
,
attribute
)
macros
[
target
].
append
(
"
%available_{0} {1}
"
.
format
(
name
,
"
,
"
.
join
(
sorted
(
values
))))
macros
[
target
].
append
(
"
%available_{0} {1}
"
.
format
(
name
,
"
,
"
.
join
(
sorted
(
values
))))
all_compilers
=
mpcdf_common
.
get_attribute_values
(
apiurl
,
project
,
None
,
"
MPCDF:compiler_modules
"
)
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
intel
"
)),
key
=
mpcdf_common
.
package_sort_key
)[
-
1
]
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
gcc
"
)),
key
=
mpcdf_common
.
package_sort_key
)[
-
1
]
macros
[
target
].
append
(
"
%latest_intel
"
+
latest_intel
)
macros
[
target
].
append
(
"
%latest_gcc
"
+
latest_gcc
)
for
repo
in
osc
.
core
.
get_repositories_of_project
(
apiurl
,
project
):
for
repo
in
osc
.
core
.
get_repositories_of_project
(
apiurl
,
project
):
aggregatename
=
"
zz_aggregate_
"
+
project
.
replace
(
"
:
"
,
"
-
"
)
+
"
_
"
+
repo
aggregatename
=
"
zz_aggregate_
"
+
project
.
replace
(
"
:
"
,
"
-
"
)
+
"
_
"
+
repo
refresh_aggregate
(
aggregatename
,
project
,
repo
,
target
)
refresh_aggregate
(
aggregatename
,
project
,
repo
,
target
)
...
...
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