diff options
author | David Beckingsale <davidbeckingsale@gmail.com> | 2015-10-22 09:50:02 -0700 |
---|---|---|
committer | David Beckingsale <davidbeckingsale@gmail.com> | 2015-10-22 09:50:02 -0700 |
commit | 9f496e5efa0559dc1eccf26e20963eaf6755c00f (patch) | |
tree | 87e285d43b8988b04b3995ac632f275066c01666 /var | |
parent | 41c01b523f2af4e60ed38e7a097991b55647be9f (diff) | |
download | spack-9f496e5efa0559dc1eccf26e20963eaf6755c00f.tar.gz spack-9f496e5efa0559dc1eccf26e20963eaf6755c00f.tar.bz2 spack-9f496e5efa0559dc1eccf26e20963eaf6755c00f.tar.xz spack-9f496e5efa0559dc1eccf26e20963eaf6755c00f.zip |
Replace compiler in f90 and f77 wrappers if they exist
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/packages/openmpi/package.py | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py index d2d095979e..c48d0557e5 100644 --- a/var/spack/packages/openmpi/package.py +++ b/var/spack/packages/openmpi/package.py @@ -30,6 +30,7 @@ class Openmpi(Package): 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 @@ class Openmpi(Package): """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 @@ class Openmpi(Package): 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 @@ class Openmpi(Package): 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) + + |