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
1a91e33a
Commit
1a91e33a
authored
Nov 05, 2020
by
Lorenz Hüdepohl
Browse files
Support for new attribute 'MPCDF:openmpi_flavors'
parent
5724de66
Pipeline
#85855
passed with stage
in 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mpcdf_common.py
View file @
1a91e33a
...
...
@@ -20,7 +20,7 @@ else:
known_microarchs
=
{
"sandybridge"
,
"haswell"
,
"skylake"
}
package_attributes
=
[
"MPCDF:enable_repositories"
]
config_attributes
=
[
"MPCDF:compiler_modules"
,
"MPCDF:cuda_modules"
,
"MPCDF:mpi_modules"
,
"MPCDF:pgi_modules"
]
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
=
{
...
...
@@ -456,11 +456,13 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
mpis
=
overloaded_package_attribute
(
api_url
,
project
,
package
,
"MPCDF:mpi_modules"
)
cudas
=
overloaded_package_attribute
(
api_url
,
project
,
package
,
"MPCDF:cuda_modules"
)
pgis
=
overloaded_package_attribute
(
api_url
,
project
,
package
,
"MPCDF:pgi_modules"
)
openmpi_flavors
=
overloaded_package_attribute
(
api_url
,
project
,
package
,
"MPCDF:openmpi_flavors"
)
all_compilers
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:compiler_modules"
)
all_mpis
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:mpi_modules"
)
all_cudas
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:cuda_modules"
)
all_pgis
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:pgi_modules"
)
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"
)
...
...
@@ -522,6 +524,10 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
for
pgi
in
(
p
for
p
in
pgis
if
p
in
all_pgis
):
yield
pgi
def
actual_openmpi_flavors
():
for
of
in
(
f
for
f
in
openmpi_flavors
if
f
in
all_openmpi_flavors
):
yield
of
for
flag
in
enable_repos
:
if
flag
==
"system"
:
if
project
==
"software"
:
...
...
@@ -540,6 +546,12 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
if
valid_mpi
(
compiler
,
mpi
):
enable
(
mpi
+
"_"
+
compiler
)
if
flag
==
"openmpi_flavors"
:
for
mpi
,
compiler
in
product
(
actual_mpis
(),
actual_compilers
()):
if
"openmpi"
in
mpi
and
valid_mpi
(
compiler
,
mpi
):
for
of
in
actual_openmpi_flavors
():
enable
(
mpi
+
"_"
+
compiler
+
"_"
+
of
)
if
flag
==
"cuda"
:
for
cuda
,
compiler
in
product
(
actual_cudas
(),
all_compilers
):
if
valid_cuda
(
cuda
,
compiler
):
...
...
@@ -744,11 +756,13 @@ Macros:
mpis
=
list
(
filter
(
actual_mpi
,
get_allowed_attribute_values
(
api_url
,
"MPCDF:mpi_modules"
)))
cudas
=
list
(
filter
(
actual_cuda
,
get_allowed_attribute_values
(
api_url
,
"MPCDF:cuda_modules"
)))
pgis
=
get_allowed_attribute_values
(
api_url
,
"MPCDF:pgi_modules"
)
openmpi_flavors
=
get_allowed_attribute_values
(
api_url
,
"MPCDF:openmpi_flavors"
)
else
:
compilers
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:compiler_modules"
)
mpis
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:mpi_modules"
)
cudas
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:cuda_modules"
)
pgis
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:pgi_modules"
)
openmpi_flavors
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:openmpi_flavors"
)
if
parent
:
repo
(
"System"
,
((
"software"
,
distribution
),))
...
...
@@ -768,6 +782,16 @@ Macros:
repo
(
mpi
+
"_"
+
compiler
,
((
project
,
compiler
),),
mpi
=
True
,
mpi_repository
=
mpi
,
mpi_module
=
mpi_module
(
mpi
))
if
"openmpi"
in
mpi
:
for
of
in
openmpi_flavors
:
dependencies
=
((
project
,
compiler
),)
if
"mofed"
in
of
:
dependencies
=
((
"extern:"
+
of
,
distribution
),)
+
dependencies
repo
(
mpi
+
"_"
+
compiler
+
"_"
+
of
,
dependencies
,
mpi
=
True
,
mpi_repository
=
mpi
,
mpi_module
=
mpi_module
(
mpi
),
openmpi_flavor
=
of
)
for
cuda
in
cudas
:
for
compiler
in
filter
(
partial
(
valid_cuda
,
cuda
),
compilers
):
repo
(
cuda
+
"_"
+
compiler
,
((
project
,
compiler
),),
cuda
=
True
,
cuda_repository
=
cuda
,
...
...
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