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
mpcdf
obs
osc-plugins
Commits
77fc0c2c
Commit
77fc0c2c
authored
Oct 23, 2019
by
Lorenz Huedepohl
Browse files
Support 'latest_gcc', 'latest_intel' meta compilers
parent
f1ce5e94
Pipeline
#67015
failed with stage
in 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mpcdf_common.py
View file @
77fc0c2c
...
...
@@ -294,6 +294,13 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
default_mpis
=
try_get_attribute
(
None
,
"default_mpi"
)
default_cudas
=
try_get_attribute
(
None
,
"default_cuda"
)
def
sort_key
(
string
):
name
,
*
version
=
string
.
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
):
if
any
(
filtered_repo
in
name
for
filtered_repo
in
filter_repos
):
return
...
...
@@ -305,7 +312,7 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
print
(
"Enabling"
,
name
)
def
actual_compilers
():
for
compiler
in
(
c
for
c
in
compilers
if
c
in
all_compilers
+
[
"default_compiler"
,
"intel"
,
"gcc"
]):
for
compiler
in
(
c
for
c
in
compilers
if
c
in
all_compilers
+
[
"default_compiler"
,
"intel"
,
"gcc"
,
"latest_intel"
,
"latest_gcc"
]):
if
compiler
==
"intel"
:
for
intel_compiler
in
[
cc
for
cc
in
all_compilers
if
cc
.
startswith
(
"intel"
)]:
yield
intel_compiler
...
...
@@ -315,6 +322,10 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
elif
compiler
==
"default_compiler"
:
for
default_compiler
in
default_compilers
:
yield
default_compiler
elif
compiler
==
"latest_intel"
:
yield
latest_intel
elif
compiler
==
"latest_gcc"
:
yield
latest_gcc
else
:
yield
compiler
...
...
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