Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
eic_tools
Spack
Commits
b09bee81
Commit
b09bee81
authored
9 years ago
by
Massimiliano Culpo
Browse files
Options
Downloads
Patches
Plain Diff
qa : fixed flake8 issues
parent
b59d4f24
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
var/spack/repos/builtin/packages/mpich/package.py
+18
-14
18 additions, 14 deletions
var/spack/repos/builtin/packages/mpich/package.py
var/spack/repos/builtin/packages/openmpi/package.py
+21
-14
21 additions, 14 deletions
var/spack/repos/builtin/packages/openmpi/package.py
with
39 additions
and
28 deletions
var/spack/repos/builtin/packages/mpich/package.py
+
18
−
14
View file @
b09bee81
...
@@ -29,8 +29,8 @@ class Mpich(Package):
...
@@ -29,8 +29,8 @@ class Mpich(Package):
"""
MPICH is a high performance and widely portable implementation of
"""
MPICH is a high performance and widely portable implementation of
the Message Passing Interface (MPI) standard.
"""
the Message Passing Interface (MPI) standard.
"""
homepage
=
"
http://www.mpich.org
"
homepage
=
"
http://www.mpich.org
"
url
=
"
http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz
"
url
=
"
http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz
"
list_url
=
"
http://www.mpich.org/static/downloads/
"
list_url
=
"
http://www.mpich.org/static/downloads/
"
list_depth
=
2
list_depth
=
2
version
(
'
3.2
'
,
'
f414cfa77099cd1fa1a5ae4e22db508a
'
)
version
(
'
3.2
'
,
'
f414cfa77099cd1fa1a5ae4e22db508a
'
)
...
@@ -41,7 +41,8 @@ class Mpich(Package):
...
@@ -41,7 +41,8 @@ class Mpich(Package):
version
(
'
3.1
'
,
'
5643dd176499bfb7d25079aaff25f2ec
'
)
version
(
'
3.1
'
,
'
5643dd176499bfb7d25079aaff25f2ec
'
)
version
(
'
3.0.4
'
,
'
9c5d5d4fe1e17dd12153f40bc5b6dbc0
'
)
version
(
'
3.0.4
'
,
'
9c5d5d4fe1e17dd12153f40bc5b6dbc0
'
)
variant
(
'
verbs
'
,
default
=
False
,
description
=
'
Build support for OpenFabrics verbs.
'
)
variant
(
'
verbs
'
,
default
=
False
,
description
=
'
Build support for OpenFabrics verbs.
'
)
variant
(
'
pmi
'
,
default
=
True
,
description
=
'
Build with PMI support
'
)
variant
(
'
pmi
'
,
default
=
True
,
description
=
'
Build with PMI support
'
)
variant
(
'
hydra
'
,
default
=
True
,
description
=
'
Build the hydra process manager
'
)
variant
(
'
hydra
'
,
default
=
True
,
description
=
'
Build the hydra process manager
'
)
...
@@ -56,9 +57,9 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
...
@@ -56,9 +57,9 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env
.
set
(
'
MPICH_FC
'
,
spack_fc
)
spack_env
.
set
(
'
MPICH_FC
'
,
spack_fc
)
def
setup_dependent_package
(
self
,
module
,
dep_spec
):
def
setup_dependent_package
(
self
,
module
,
dep_spec
):
self
.
spec
.
mpicc
=
join_path
(
self
.
prefix
.
bin
,
'
mpicc
'
)
self
.
spec
.
mpicc
=
join_path
(
self
.
prefix
.
bin
,
'
mpicc
'
)
self
.
spec
.
mpicxx
=
join_path
(
self
.
prefix
.
bin
,
'
mpic++
'
)
self
.
spec
.
mpicxx
=
join_path
(
self
.
prefix
.
bin
,
'
mpic++
'
)
self
.
spec
.
mpifc
=
join_path
(
self
.
prefix
.
bin
,
'
mpif90
'
)
self
.
spec
.
mpifc
=
join_path
(
self
.
prefix
.
bin
,
'
mpif90
'
)
self
.
spec
.
mpif77
=
join_path
(
self
.
prefix
.
bin
,
'
mpif77
'
)
self
.
spec
.
mpif77
=
join_path
(
self
.
prefix
.
bin
,
'
mpif77
'
)
def
install
(
self
,
spec
,
prefix
):
def
install
(
self
,
spec
,
prefix
):
...
@@ -91,7 +92,6 @@ def install(self, spec, prefix):
...
@@ -91,7 +92,6 @@ def install(self, spec, prefix):
self
.
filter_compilers
()
self
.
filter_compilers
()
def
filter_compilers
(
self
):
def
filter_compilers
(
self
):
"""
Run after install to make the MPI compilers use the
"""
Run after install to make the MPI compilers use the
compilers that Spack built the package with.
compilers that Spack built the package with.
...
@@ -101,23 +101,27 @@ def filter_compilers(self):
...
@@ -101,23 +101,27 @@ def filter_compilers(self):
be bound to whatever compiler they were built with.
be bound to whatever compiler they were built with.
"""
"""
bin
=
self
.
prefix
.
bin
bin
=
self
.
prefix
.
bin
mpicc
=
join_path
(
bin
,
'
mpicc
'
)
mpicc
=
join_path
(
bin
,
'
mpicc
'
)
mpicxx
=
join_path
(
bin
,
'
mpicxx
'
)
mpicxx
=
join_path
(
bin
,
'
mpicxx
'
)
mpif77
=
join_path
(
bin
,
'
mpif77
'
)
mpif77
=
join_path
(
bin
,
'
mpif77
'
)
mpif90
=
join_path
(
bin
,
'
mpif90
'
)
mpif90
=
join_path
(
bin
,
'
mpif90
'
)
spack_cc
=
env
[
'
CC
'
]
spack_cc
=
env
[
'
CC
'
]
spack_cxx
=
env
[
'
CXX
'
]
spack_cxx
=
env
[
'
CXX
'
]
spack_f77
=
env
[
'
F77
'
]
spack_f77
=
env
[
'
F77
'
]
spack_fc
=
env
[
'
FC
'
]
spack_fc
=
env
[
'
FC
'
]
# Substitute Spack compile wrappers for the real
# Substitute Spack compile wrappers for the real
# underlying compiler
# underlying compiler
kwargs
=
{
'
ignore_absent
'
:
True
,
'
backup
'
:
False
,
'
string
'
:
True
}
kwargs
=
{
'
ignore_absent
'
:
True
,
'
backup
'
:
False
,
'
string
'
:
True
}
filter_file
(
'
CC=
"
%s
"'
%
spack_cc
,
'
CC=
"
%s
"'
%
self
.
compiler
.
cc
,
mpicc
,
**
kwargs
)
filter_file
(
'
CC=
"
%s
"'
%
spack_cc
,
filter_file
(
'
CXX=
"
%s
"'
%
spack_cxx
,
'
CXX=
"
%s
"'
%
self
.
compiler
.
cxx
,
mpicxx
,
**
kwargs
)
'
CC=
"
%s
"'
%
self
.
compiler
.
cc
,
mpicc
,
**
kwargs
)
filter_file
(
'
F77=
"
%s
"'
%
spack_f77
,
'
F77=
"
%s
"'
%
self
.
compiler
.
f77
,
mpif77
,
**
kwargs
)
filter_file
(
'
CXX=
"
%s
"'
%
spack_cxx
,
filter_file
(
'
FC=
"
%s
"'
%
spack_fc
,
'
FC=
"
%s
"'
%
self
.
compiler
.
fc
,
mpif90
,
**
kwargs
)
'
CXX=
"
%s
"'
%
self
.
compiler
.
cxx
,
mpicxx
,
**
kwargs
)
filter_file
(
'
F77=
"
%s
"'
%
spack_f77
,
'
F77=
"
%s
"'
%
self
.
compiler
.
f77
,
mpif77
,
**
kwargs
)
filter_file
(
'
FC=
"
%s
"'
%
spack_fc
,
'
FC=
"
%s
"'
%
self
.
compiler
.
fc
,
mpif90
,
**
kwargs
)
# Remove this linking flag if present
# Remove this linking flag if present
# (it turns RPATH into RUNPATH)
# (it turns RPATH into RUNPATH)
...
...
This diff is collapsed.
Click to expand it.
var/spack/repos/builtin/packages/openmpi/package.py
+
21
−
14
View file @
b09bee81
...
@@ -72,20 +72,27 @@ class Openmpi(Package):
...
@@ -72,20 +72,27 @@ class Openmpi(Package):
patch
(
'
configure.patch
'
,
when
=
"
@1.10.0:1.10.1
"
)
patch
(
'
configure.patch
'
,
when
=
"
@1.10.0:1.10.1
"
)
variant
(
'
psm
'
,
default
=
False
,
description
=
'
Build support for the PSM library.
'
)
variant
(
'
psm
'
,
default
=
False
,
description
=
'
Build support for the PSM library.
'
)
variant
(
'
psm2
'
,
default
=
False
,
description
=
'
Build support for the Intel PSM2 library.
'
)
variant
(
'
psm2
'
,
default
=
False
,
variant
(
'
pmi
'
,
default
=
False
,
description
=
'
Build support for PMI-based launchers
'
)
description
=
'
Build support for the Intel PSM2 library.
'
)
variant
(
'
verbs
'
,
default
=
_verbs_dir
()
is
not
None
,
description
=
'
Build support for OpenFabrics verbs.
'
)
variant
(
'
pmi
'
,
default
=
False
,
description
=
'
Build support for PMI-based launchers
'
)
variant
(
'
verbs
'
,
default
=
_verbs_dir
()
is
not
None
,
description
=
'
Build support for OpenFabrics verbs.
'
)
variant
(
'
mxm
'
,
default
=
False
,
description
=
'
Build Mellanox Messaging support
'
)
variant
(
'
mxm
'
,
default
=
False
,
description
=
'
Build Mellanox Messaging support
'
)
variant
(
'
thread_multiple
'
,
default
=
False
,
description
=
'
Enable MPI_THREAD_MULTIPLE support
'
)
variant
(
'
thread_multiple
'
,
default
=
False
,
description
=
'
Enable MPI_THREAD_MULTIPLE support
'
)
# TODO : variant support for alps, loadleveler is missing
# TODO : variant support for alps, loadleveler is missing
variant
(
'
tm
'
,
default
=
False
,
description
=
'
Build TM (Torque, PBSPro, and compatible) support
'
)
variant
(
'
tm
'
,
default
=
False
,
variant
(
'
slurm
'
,
default
=
False
,
description
=
'
Build SLURM scheduler component
'
)
description
=
'
Build TM (Torque, PBSPro, and compatible) support
'
)
variant
(
'
slurm
'
,
default
=
False
,
description
=
'
Build SLURM scheduler component
'
)
variant
(
'
sqlite3
'
,
default
=
False
,
description
=
'
Build sqlite3 support
'
)
variant
(
'
sqlite3
'
,
default
=
False
,
description
=
'
Build sqlite3 support
'
)
variant
(
'
vt
'
,
default
=
True
,
description
=
'
Build support for contributed package vt
'
)
variant
(
'
vt
'
,
default
=
True
,
description
=
'
Build support for contributed package vt
'
)
# TODO : support for CUDA is missing
# TODO : support for CUDA is missing
...
@@ -96,8 +103,7 @@ class Openmpi(Package):
...
@@ -96,8 +103,7 @@ class Openmpi(Package):
depends_on
(
'
sqlite
'
,
when
=
'
+sqlite3
'
)
depends_on
(
'
sqlite
'
,
when
=
'
+sqlite3
'
)
def
url_for_version
(
self
,
version
):
def
url_for_version
(
self
,
version
):
return
"
http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2
"
%
(
version
.
up_to
(
2
),
version
)
return
"
http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2
"
%
(
version
.
up_to
(
2
),
version
)
# NOQA: ignore=E501
def
setup_dependent_environment
(
self
,
spack_env
,
run_env
,
dependent_spec
):
def
setup_dependent_environment
(
self
,
spack_env
,
run_env
,
dependent_spec
):
spack_env
.
set
(
'
OMPI_CC
'
,
spack_cc
)
spack_env
.
set
(
'
OMPI_CC
'
,
spack_cc
)
...
@@ -106,14 +112,15 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
...
@@ -106,14 +112,15 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env
.
set
(
'
OMPI_F77
'
,
spack_f77
)
spack_env
.
set
(
'
OMPI_F77
'
,
spack_f77
)
def
setup_dependent_package
(
self
,
module
,
dep_spec
):
def
setup_dependent_package
(
self
,
module
,
dep_spec
):
self
.
spec
.
mpicc
=
join_path
(
self
.
prefix
.
bin
,
'
mpicc
'
)
self
.
spec
.
mpicc
=
join_path
(
self
.
prefix
.
bin
,
'
mpicc
'
)
self
.
spec
.
mpicxx
=
join_path
(
self
.
prefix
.
bin
,
'
mpic++
'
)
self
.
spec
.
mpicxx
=
join_path
(
self
.
prefix
.
bin
,
'
mpic++
'
)
self
.
spec
.
mpifc
=
join_path
(
self
.
prefix
.
bin
,
'
mpif90
'
)
self
.
spec
.
mpifc
=
join_path
(
self
.
prefix
.
bin
,
'
mpif90
'
)
self
.
spec
.
mpif77
=
join_path
(
self
.
prefix
.
bin
,
'
mpif77
'
)
self
.
spec
.
mpif77
=
join_path
(
self
.
prefix
.
bin
,
'
mpif77
'
)
@property
@property
def
verbs
(
self
):
def
verbs
(
self
):
# Up through version 1.6, this option was previously named --with-openib
# Up through version 1.6, this option was previously named
# --with-openib
if
self
.
spec
.
satisfies
(
'
@:1.6
'
):
if
self
.
spec
.
satisfies
(
'
@:1.6
'
):
return
'
openib
'
return
'
openib
'
# In version 1.7, it was renamed to be --with-verbs
# In version 1.7, it was renamed to be --with-verbs
...
@@ -135,7 +142,7 @@ def install(self, spec, prefix):
...
@@ -135,7 +142,7 @@ def install(self, spec, prefix):
'
--with-psm2
'
if
'
+psm2
'
in
spec
else
'
--without-psm2
'
,
'
--with-psm2
'
if
'
+psm2
'
in
spec
else
'
--without-psm2
'
,
'
--with-mxm
'
if
'
+mxm
'
in
spec
else
'
--without-mxm
'
,
'
--with-mxm
'
if
'
+mxm
'
in
spec
else
'
--without-mxm
'
,
# Other options
# Other options
'
--enable-mpi-thread-multiple
'
if
'
+thread_multiple
'
in
spec
else
'
--disable-mpi-thread-multiple
'
,
'
--enable-mpi-thread-multiple
'
if
'
+thread_multiple
'
in
spec
else
'
--disable-mpi-thread-multiple
'
,
# NOQA: ignore=E501
'
--with-pmi
'
if
'
+pmi
'
in
spec
else
'
--without-pmi
'
,
'
--with-pmi
'
if
'
+pmi
'
in
spec
else
'
--without-pmi
'
,
'
--with-sqlite3
'
if
'
+sqlite3
'
in
spec
else
'
--without-sqlite3
'
,
'
--with-sqlite3
'
if
'
+sqlite3
'
in
spec
else
'
--without-sqlite3
'
,
'
--enable-vt
'
if
'
+vt
'
in
spec
else
'
--disable-vt
'
'
--enable-vt
'
if
'
+vt
'
in
spec
else
'
--disable-vt
'
...
@@ -153,7 +160,7 @@ def install(self, spec, prefix):
...
@@ -153,7 +160,7 @@ def install(self, spec, prefix):
# use this for LANL builds, but for LLNL builds, we need:
# use this for LANL builds, but for LLNL builds, we need:
# "--with-platform=contrib/platform/llnl/optimized"
# "--with-platform=contrib/platform/llnl/optimized"
if
self
.
version
==
ver
(
"
1.6.5
"
)
and
'
+lanl
'
in
spec
:
if
self
.
version
==
ver
(
"
1.6.5
"
)
and
'
+lanl
'
in
spec
:
config_args
.
append
(
"
--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas
"
)
config_args
.
append
(
"
--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas
"
)
# NOQA: ignore=E501
if
not
self
.
compiler
.
f77
and
not
self
.
compiler
.
fc
:
if
not
self
.
compiler
.
f77
and
not
self
.
compiler
.
fc
:
config_args
.
append
(
"
--enable-mpi-fortran=no
"
)
config_args
.
append
(
"
--enable-mpi-fortran=no
"
)
...
...
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