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
77fc0c2c
Commit
77fc0c2c
authored
5 years ago
by
Lorenz Huedepohl
Browse files
Options
Downloads
Patches
Plain Diff
Support 'latest_gcc', 'latest_intel' meta compilers
parent
f1ce5e94
No related branches found
No related tags found
No related merge requests found
Pipeline
#67015
failed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mpcdf_common.py
+12
-1
12 additions, 1 deletion
mpcdf_common.py
with
12 additions
and
1 deletion
mpcdf_common.py
+
12
−
1
View file @
77fc0c2c
...
@@ -294,6 +294,13 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
...
@@ -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_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
):
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
):
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
):
return
return
...
@@ -305,7 +312,7 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
...
@@ -305,7 +312,7 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
print
(
"
Enabling
"
,
name
)
print
(
"
Enabling
"
,
name
)
def
actual_compilers
():
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
"
:
if
compiler
==
"
intel
"
:
for
intel_compiler
in
[
cc
for
cc
in
all_compilers
if
cc
.
startswith
(
"
intel
"
)]:
for
intel_compiler
in
[
cc
for
cc
in
all_compilers
if
cc
.
startswith
(
"
intel
"
)]:
yield
intel_compiler
yield
intel_compiler
...
@@ -315,6 +322,10 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
...
@@ -315,6 +322,10 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, filter_r
elif
compiler
==
"
default_compiler
"
:
elif
compiler
==
"
default_compiler
"
:
for
default_compiler
in
default_compilers
:
for
default_compiler
in
default_compilers
:
yield
default_compiler
yield
default_compiler
elif
compiler
==
"
latest_intel
"
:
yield
latest_intel
elif
compiler
==
"
latest_gcc
"
:
yield
latest_gcc
else
:
else
:
yield
compiler
yield
compiler
...
...
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