diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2020-12-17 22:13:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 13:13:21 -0800 |
commit | a879c875ddffe9b927e0d6b9a32f211c8be03228 (patch) | |
tree | 0b0ba3f28502464bba427a9994aff9fc46f7fa82 | |
parent | 105ee757bc209228a4b5626bab1c76f553da3e5d (diff) | |
download | spack-a879c875ddffe9b927e0d6b9a32f211c8be03228.tar.gz spack-a879c875ddffe9b927e0d6b9a32f211c8be03228.tar.bz2 spack-a879c875ddffe9b927e0d6b9a32f211c8be03228.tar.xz spack-a879c875ddffe9b927e0d6b9a32f211c8be03228.zip |
New package: cray-mpich (#20076)
Cray's version of MPICH uses a different versioning system than
MPICH, so it has been split into its own package. It is an
external-only package (always provided by the system, never
installed by Spack).
-rw-r--r-- | var/spack/repos/builtin/packages/cray-mpich/package.py | 60 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mpich/package.py | 36 |
2 files changed, 69 insertions, 27 deletions
diff --git a/var/spack/repos/builtin/packages/cray-mpich/package.py b/var/spack/repos/builtin/packages/cray-mpich/package.py new file mode 100644 index 0000000000..07193d95e4 --- /dev/null +++ b/var/spack/repos/builtin/packages/cray-mpich/package.py @@ -0,0 +1,60 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class CrayMpich(Package): + """Cray's MPICH is a high performance and widely portable implementation of + the Message Passing Interface (MPI) standard.""" + + homepage = "https://docs.nersc.gov/development/compilers/wrappers/" + has_code = False # Skip attempts to fetch source that is not available + + maintainers = ['haampie'] + + version('8.1.0') + version('8.0.16') + version('8.0.14') + version('8.0.11') + version('8.0.9') + version('7.7.16') + version('7.7.15') + version('7.7.14') + version('7.7.13') + + provides('mpi@3') + + def setup_run_environment(self, env): + env.set('MPICC', spack_cc) + env.set('MPICXX', spack_cxx) + env.set('MPIF77', spack_fc) + env.set('MPIF90', spack_fc) + + def setup_dependent_build_environment(self, env, dependent_spec): + self.setup_run_environment(env) + + env.set('MPICH_CC', spack_cc) + env.set('MPICH_CXX', spack_cxx) + env.set('MPICH_F77', spack_f77) + env.set('MPICH_F90', spack_fc) + env.set('MPICH_FC', spack_fc) + + def setup_dependent_package(self, module, dependent_spec): + spec = self.spec + spec.mpicc = spack_cc + spec.mpicxx = spack_cxx + spec.mpifc = spack_fc + spec.mpif77 = spack_f77 + + spec.mpicxx_shared_libs = [ + join_path(self.prefix.lib, 'libmpicxx.{0}'.format(dso_suffix)), + join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix)) + ] + + def install(self, spec, prefix): + raise InstallError( + self.spec.format('{name} is not installable, you need to specify ' + 'it as an external package in packages.yaml')) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index d3979ff486..001301d3af 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -301,19 +301,10 @@ spack package at this time.''', def setup_run_environment(self, env): # Because MPI implementations provide compilers, they have to add to # their run environments the code to make the compilers available. - # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. - # Cray MPIs always have cray in the module name, e.g. "cray-mpich" - external_modules = self.spec.external_modules - if external_modules and 'cray' in external_modules[0]: - env.set('MPICC', spack_cc) - env.set('MPICXX', spack_cxx) - env.set('MPIF77', spack_fc) - env.set('MPIF90', spack_fc) - else: - env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) - env.set('MPICXX', join_path(self.prefix.bin, 'mpic++')) - env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) - env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) + env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) + env.set('MPICXX', join_path(self.prefix.bin, 'mpic++')) + env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) + env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) def setup_dependent_build_environment(self, env, dependent_spec): self.setup_run_environment(env) @@ -327,21 +318,12 @@ spack package at this time.''', def setup_dependent_package(self, module, dependent_spec): spec = self.spec - # For Cray MPIs, the regular compiler wrappers *are* the MPI wrappers. - # Cray MPIs always have cray in the module name, e.g. "cray-mpich" - external_modules = spec.external_modules - if external_modules and 'cray' in external_modules[0]: - spec.mpicc = spack_cc - spec.mpicxx = spack_cxx - spec.mpifc = spack_fc - spec.mpif77 = spack_f77 - else: - spec.mpicc = join_path(self.prefix.bin, 'mpicc') - spec.mpicxx = join_path(self.prefix.bin, 'mpic++') + spec.mpicc = join_path(self.prefix.bin, 'mpicc') + spec.mpicxx = join_path(self.prefix.bin, 'mpic++') - if '+fortran' in spec: - spec.mpifc = join_path(self.prefix.bin, 'mpif90') - spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + if '+fortran' in spec: + spec.mpifc = join_path(self.prefix.bin, 'mpif90') + spec.mpif77 = join_path(self.prefix.bin, 'mpif77') spec.mpicxx_shared_libs = [ join_path(self.prefix.lib, 'libmpicxx.{0}'.format(dso_suffix)), |