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
9f496e5e
Commit
9f496e5e
authored
9 years ago
by
David Beckingsale
Browse files
Options
Downloads
Patches
Plain Diff
Replace compiler in f90 and f77 wrappers if they exist
parent
41c01b52
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
var/spack/packages/openmpi/package.py
+22
-3
22 additions, 3 deletions
var/spack/packages/openmpi/package.py
with
22 additions
and
3 deletions
var/spack/packages/openmpi/package.py
+
22
−
3
View file @
9f496e5e
...
...
@@ -30,6 +30,7 @@ def setup_dependent_environment(self, module, spec, dep_spec):
os
.
environ
[
'
OMPI_CC
'
]
=
'
cc
'
os
.
environ
[
'
OMPI_CXX
'
]
=
'
c++
'
os
.
environ
[
'
OMPI_FC
'
]
=
'
f90
'
os
.
environ
[
'
OMPI_F77
'
]
=
'
f77
'
def
install
(
self
,
spec
,
prefix
):
...
...
@@ -58,8 +59,8 @@ def filter_compilers(self):
"""
Run after install to make the MPI compilers use the
compilers that Spack built the package with.
If this isn
'
t done, they
'
ll have CC, CXX
, F77,
and FC set
to Spack
'
s generic cc, c++
, f77,
and f90. We want them to
If this isn
'
t done, they
'
ll have CC, CXX and FC set
to Spack
'
s generic cc, c++ and f90. We want them to
be bound to whatever compiler they were built with.
"""
kwargs
=
{
'
ignore_absent
'
:
True
,
'
backup
'
:
False
,
'
string
'
:
False
}
...
...
@@ -68,7 +69,8 @@ def filter_compilers(self):
cc_wrappers
=
[
'
mpicc-vt-wrapper-data.txt
'
,
'
mpicc-wrapper-data.txt
'
,
'
ortecc-wrapper-data.txt
'
,
'
shmemcc-wrapper-data.txt
'
]
cxx_wrappers
=
[
'
mpic++-vt-wrapper-data.txt
'
,
'
mpic++-wrapper-data.txt
'
]
cxx_wrappers
=
[
'
mpic++-vt-wrapper-data.txt
'
,
'
mpic++-wrapper-data.txt
'
,
'
ortec++-wrapper-data.txt
'
]
fc_wrappers
=
[
'
mpifort-vt-wrapper-data.txt
'
,
'
mpifort-wrapper-data.txt
'
,
'
shmemfort-wrapper-data.txt
'
]
...
...
@@ -84,3 +86,20 @@ def filter_compilers(self):
for
wrapper
in
fc_wrappers
:
filter_file
(
'
compiler=.*
'
,
'
compiler=%s
'
%
self
.
compiler
.
fc
,
os
.
path
.
join
(
dir
,
wrapper
),
**
kwargs
)
# These are symlinks in newer versions, so check that here
f77_wrappers
=
[
'
mpif77-vt-wrapper-data.txt
'
,
'
mpif77-wrapper-data.txt
'
]
f90_wrappers
=
[
'
mpif90-vt-wrapper-data.txt
'
,
'
mpif90-wrapper-data.txt
'
]
for
wrapper
in
f77_wrappers
:
path
=
os
.
path
.
join
(
dir
,
wrapper
)
if
not
os
.
path
.
islink
(
path
):
filter_file
(
'
compiler=.*
'
,
'
compiler=%s
'
%
self
.
compiler
.
f77
,
path
,
**
kwargs
)
for
wrapper
in
f90_wrappers
:
path
=
os
.
path
.
join
(
dir
,
wrapper
)
if
not
os
.
path
.
islink
(
path
):
filter_file
(
'
compiler=.*
'
,
'
compiler=%s
'
%
self
.
compiler
.
fc
,
path
,
**
kwargs
)
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