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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpcdf
obs
osc-plugins
Commits
0267c7fc
Commit
0267c7fc
authored
3 years ago
by
Lorenz Hüdepohl
Browse files
Options
Downloads
Patches
Plain Diff
Remove remaining usage of 'default_*' attributes
parent
25c54774
No related branches found
No related tags found
No related merge requests found
Pipeline
#110720
passed
3 years ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
mpcdf_common.py
+5
-26
5 additions, 26 deletions
mpcdf_common.py
mpcdf_info.py
+0
-3
0 additions, 3 deletions
mpcdf_info.py
mpcdf_setup_clusters_project.py
+1
-1
1 addition, 1 deletion
mpcdf_setup_clusters_project.py
with
6 additions
and
30 deletions
mpcdf_common.py
+
5
−
26
View file @
0267c7fc
...
@@ -21,7 +21,6 @@ known_microarchs = {"sandybridge", "haswell", "skylake"}
...
@@ -21,7 +21,6 @@ known_microarchs = {"sandybridge", "haswell", "skylake"}
package_attributes
=
[
"
MPCDF:enable_repositories
"
]
package_attributes
=
[
"
MPCDF:enable_repositories
"
]
config_attributes
=
[
"
MPCDF:compiler_modules
"
,
"
MPCDF:cuda_modules
"
,
"
MPCDF:mpi_modules
"
,
"
MPCDF:pgi_modules
"
,
"
MPCDF:openmpi_flavors
"
]
config_attributes
=
[
"
MPCDF:compiler_modules
"
,
"
MPCDF:cuda_modules
"
,
"
MPCDF:mpi_modules
"
,
"
MPCDF:pgi_modules
"
,
"
MPCDF:openmpi_flavors
"
]
default_attributes
=
[
"
MPCDF:default_compiler
"
,
"
MPCDF:default_cuda
"
,
"
MPCDF:default_mpi
"
]
intel_parallel_studio
=
{
intel_parallel_studio
=
{
"
mpcdf_intel_parallel_studio_2017_7
"
:
{
"
compiler
"
:
"
intel_17_0_7
"
,
"
impi
"
:
"
impi_2017_4
"
,
"
mkl
"
:
"
mkl_2017_4-module
"
,
},
"
mpcdf_intel_parallel_studio_2017_7
"
:
{
"
compiler
"
:
"
intel_17_0_7
"
,
"
impi
"
:
"
impi_2017_4
"
,
"
mkl
"
:
"
mkl_2017_4-module
"
,
},
...
@@ -476,10 +475,6 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
...
@@ -476,10 +475,6 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
all_pgis
=
overloaded_project_attribute
(
api_url
,
project
,
"
MPCDF:pgi_modules
"
)
all_pgis
=
overloaded_project_attribute
(
api_url
,
project
,
"
MPCDF:pgi_modules
"
)
all_openmpi_flavors
=
overloaded_project_attribute
(
api_url
,
project
,
"
MPCDF:openmpi_flavors
"
)
all_openmpi_flavors
=
overloaded_project_attribute
(
api_url
,
project
,
"
MPCDF:openmpi_flavors
"
)
default_compilers
=
overloaded_project_attribute
(
api_url
,
project
,
"
MPCDF:default_compiler
"
)
default_mpis
=
overloaded_project_attribute
(
api_url
,
project
,
"
MPCDF:default_mpi
"
)
default_cudas
=
overloaded_project_attribute
(
api_url
,
project
,
"
MPCDF:default_cuda
"
)
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
intel
"
)),
key
=
package_sort_key
)[
-
1
]
latest_intel
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
intel
"
)),
key
=
package_sort_key
)[
-
1
]
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
gcc
"
)),
key
=
package_sort_key
)[
-
1
]
latest_gcc
=
sorted
((
c
for
c
in
all_compilers
if
c
.
startswith
(
"
gcc
"
)),
key
=
package_sort_key
)[
-
1
]
...
@@ -496,16 +491,13 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
...
@@ -496,16 +491,13 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
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
"
,
"
latest_intel
"
,
"
latest_gcc
"
]):
for
compiler
in
(
c
for
c
in
compilers
if
c
in
all_compilers
+
[
"
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
elif
compiler
==
"
gcc
"
:
elif
compiler
==
"
gcc
"
:
for
gcc_compiler
in
[
cc
for
cc
in
all_compilers
if
cc
.
startswith
(
"
gcc
"
)]:
for
gcc_compiler
in
[
cc
for
cc
in
all_compilers
if
cc
.
startswith
(
"
gcc
"
)]:
yield
gcc_compiler
yield
gcc_compiler
elif
compiler
==
"
default_compiler
"
:
for
default_compiler
in
default_compilers
:
yield
default_compiler
elif
compiler
==
"
latest_intel
"
:
elif
compiler
==
"
latest_intel
"
:
yield
latest_intel
yield
latest_intel
elif
compiler
==
"
latest_gcc
"
:
elif
compiler
==
"
latest_gcc
"
:
...
@@ -514,22 +506,15 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
...
@@ -514,22 +506,15 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
yield
compiler
yield
compiler
def
actual_mpis
():
def
actual_mpis
():
for
mpi
in
(
m
for
m
in
mpis
if
m
in
all_mpis
+
[
"
default_mpi
"
,
"
impi
"
]):
for
mpi
in
(
m
for
m
in
mpis
if
m
in
all_mpis
+
[
"
impi
"
]):
if
mpi
==
"
impi
"
:
if
mpi
==
"
impi
"
:
for
impi
in
[
mpi
for
mpi
in
all_mpis
if
mpi
.
startswith
(
"
impi
"
)]:
for
impi
in
[
mpi
for
mpi
in
all_mpis
if
mpi
.
startswith
(
"
impi
"
)]:
yield
impi
yield
impi
elif
mpi
==
"
default_mpi
"
:
for
default_mpi
in
default_mpis
:
yield
default_mpi
else
:
else
:
yield
mpi
yield
mpi
def
actual_cudas
():
def
actual_cudas
():
for
cuda
in
(
c
for
c
in
cudas
if
c
in
all_cudas
+
[
"
default_cuda
"
]):
for
cuda
in
(
c
for
c
in
cudas
if
c
in
all_cudas
):
if
cuda
==
"
default_cuda
"
:
for
default_cuda
in
default_cudas
:
yield
default_cuda
else
:
yield
cuda
yield
cuda
def
actual_pgis
():
def
actual_pgis
():
...
@@ -629,7 +614,7 @@ def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
...
@@ -629,7 +614,7 @@ def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
parent
=
None
,
dry_run
=
False
,
diff
=
False
,
remove_old
=
False
,
all_possible
=
False
,
only_project
=
False
):
parent
=
None
,
dry_run
=
False
,
diff
=
False
,
remove_old
=
False
,
all_possible
=
False
,
only_project
=
False
):
if
parent
and
not
dry_run
:
if
parent
and
not
dry_run
:
for
attribute
in
config_attributes
+
default_attributes
:
for
attribute
in
config_attributes
:
print
(
"
Copying attribute
'
{0}
'
from parent project
"
.
format
(
attribute
))
print
(
"
Copying attribute
'
{0}
'
from parent project
"
.
format
(
attribute
))
set_attribute_values
(
api_url
,
project
,
None
,
attribute
,
overloaded_project_attribute
(
api_url
,
parent
,
attribute
))
set_attribute_values
(
api_url
,
project
,
None
,
attribute
,
overloaded_project_attribute
(
api_url
,
parent
,
attribute
))
...
@@ -755,8 +740,6 @@ Macros:
...
@@ -755,8 +740,6 @@ Macros:
def
actual_compiler
(
c
):
def
actual_compiler
(
c
):
if
c
.
startswith
(
"
latest
"
):
if
c
.
startswith
(
"
latest
"
):
return
False
return
False
if
c
==
"
default_compiler
"
:
return
False
if
c
==
"
intel
"
:
if
c
==
"
intel
"
:
return
False
return
False
if
c
==
"
gcc
"
:
if
c
==
"
gcc
"
:
...
@@ -764,15 +747,11 @@ Macros:
...
@@ -764,15 +747,11 @@ Macros:
return
True
return
True
def
actual_mpi
(
m
):
def
actual_mpi
(
m
):
if
m
==
"
default_mpi
"
:
return
False
if
m
==
"
impi
"
:
if
m
==
"
impi
"
:
return
False
return
False
return
True
return
True
def
actual_cuda
(
c
):
def
actual_cuda
(
c
):
if
c
==
"
default_cuda
"
:
return
False
return
True
return
True
if
all_possible
:
if
all_possible
:
...
...
This diff is collapsed.
Click to expand it.
mpcdf_info.py
+
0
−
3
View file @
0267c7fc
...
@@ -43,11 +43,8 @@ def do_mpcdf_info(self, subcmd, opts, *args):
...
@@ -43,11 +43,8 @@ def do_mpcdf_info(self, subcmd, opts, *args):
print
()
print
()
print_attribute
(
"
Compilers
"
,
"
MPCDF:compiler_modules
"
)
print_attribute
(
"
Compilers
"
,
"
MPCDF:compiler_modules
"
)
print_attribute
(
"
Default Compiler
"
,
"
MPCDF:default_compiler
"
)
print_attribute
(
"
MPI libraries
"
,
"
MPCDF:mpi_modules
"
)
print_attribute
(
"
MPI libraries
"
,
"
MPCDF:mpi_modules
"
)
print_attribute
(
"
Default MPI
"
,
"
MPCDF:default_mpi
"
)
print_attribute
(
"
CUDA versions
"
,
"
MPCDF:cuda_modules
"
)
print_attribute
(
"
CUDA versions
"
,
"
MPCDF:cuda_modules
"
)
print_attribute
(
"
Default CUDA
"
,
"
MPCDF:default_cuda
"
)
print_attribute
(
"
PGI compilers
"
,
"
MPCDF:pgi_modules
"
)
print_attribute
(
"
PGI compilers
"
,
"
MPCDF:pgi_modules
"
)
unmanaged
=
[]
unmanaged
=
[]
...
...
This diff is collapsed.
Click to expand it.
mpcdf_setup_clusters_project.py
+
1
−
1
View file @
0267c7fc
...
@@ -41,7 +41,7 @@ def do_mpcdf_setup_cluster_project(self, subcmd, opts, *args):
...
@@ -41,7 +41,7 @@ def do_mpcdf_setup_cluster_project(self, subcmd, opts, *args):
raise
Exception
(
"
Internal error
"
)
raise
Exception
(
"
Internal error
"
)
macros
[
target
]
=
[]
macros
[
target
]
=
[]
for
attribute
in
mpcdf_common
.
config_attributes
+
mpcdf_common
.
default_attributes
:
for
attribute
in
mpcdf_common
.
config_attributes
:
_
,
name
=
attribute
.
split
(
"
:
"
)
_
,
name
=
attribute
.
split
(
"
:
"
)
values
=
mpcdf_common
.
overloaded_project_attribute
(
api_url
,
subproject
,
attribute
)
values
=
mpcdf_common
.
overloaded_project_attribute
(
api_url
,
subproject
,
attribute
)
macros
[
target
].
append
(
"
%available_{0} {1}
"
.
format
(
name
,
"
,
"
.
join
(
sorted
(
values
))))
macros
[
target
].
append
(
"
%available_{0} {1}
"
.
format
(
name
,
"
,
"
.
join
(
sorted
(
values
))))
...
...
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