diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2024-08-30 11:16:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-30 11:16:35 +0200 |
commit | 1c1970e7277440069c0050ebaf6720f72dcdf2e5 (patch) | |
tree | e86e09dc707e14e17347bdf694180f105ac4c282 | |
parent | c283fce487d75ce1f8b78cb30239630455501391 (diff) | |
download | spack-1c1970e7277440069c0050ebaf6720f72dcdf2e5.tar.gz spack-1c1970e7277440069c0050ebaf6720f72dcdf2e5.tar.bz2 spack-1c1970e7277440069c0050ebaf6720f72dcdf2e5.tar.xz spack-1c1970e7277440069c0050ebaf6720f72dcdf2e5.zip |
Put some more constraint on a few mpi providers (#46132)
This should help not selecting, by default, some niche implementation that are supposed to be externals.
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
7 files changed, 22 insertions, 2 deletions
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 2f6cf53def..037c648af8 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -72,3 +72,13 @@ packages: permissions: read: world write: user + cray-mpich: + buildable: false + cray-mvapich2: + buildable: false + fujitsu-mpi: + buildable: false + hpcx-mpi: + buildable: false + spectrum-mpi: + buildable: false diff --git a/var/spack/repos/builtin/packages/cray-mpich/package.py b/var/spack/repos/builtin/packages/cray-mpich/package.py index 3458caa225..7e8bc57442 100644 --- a/var/spack/repos/builtin/packages/cray-mpich/package.py +++ b/var/spack/repos/builtin/packages/cray-mpich/package.py @@ -32,6 +32,8 @@ class CrayMpich(Package): depends_on("cray-pmi") depends_on("libfabric") + requires("platform=linux", msg="Cray MPICH is only available on Cray") + # cray-mpich 8.1.7: features MPI compiler wrappers variant("wrappers", default=True, when="@8.1.7:", description="enable MPI wrappers") diff --git a/var/spack/repos/builtin/packages/cray-mvapich2/package.py b/var/spack/repos/builtin/packages/cray-mvapich2/package.py index b76d583c2b..03ad2d0516 100644 --- a/var/spack/repos/builtin/packages/cray-mvapich2/package.py +++ b/var/spack/repos/builtin/packages/cray-mvapich2/package.py @@ -26,6 +26,8 @@ class CrayMvapich2(Package): provides("mpi@3") + requires("platform=linux", msg="Cray MVAPICH2 is only available on Cray") + def setup_run_environment(self, env): if spack_cc is None: return diff --git a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py index c57782b00c..36c6cec584 100644 --- a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py +++ b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py @@ -22,6 +22,8 @@ class FujitsuMpi(Package): msg="currently only supports Fujitsu, Clang, or GCC compilers", ) + requires("platform=linux") + def install(self, spec, prefix): raise InstallError("Fujitsu MPI is not installable; it is vendor supplied") diff --git a/var/spack/repos/builtin/packages/hpcx-mpi/package.py b/var/spack/repos/builtin/packages/hpcx-mpi/package.py index 95b575d167..54becb1539 100644 --- a/var/spack/repos/builtin/packages/hpcx-mpi/package.py +++ b/var/spack/repos/builtin/packages/hpcx-mpi/package.py @@ -19,8 +19,10 @@ class HpcxMpi(Package): provides("mpi") + requires("platform=linux") + def install(self, spec, prefix): - raise InstallError("HPC-X MPI is not buildable, it is for external " "specs only.") + raise InstallError("HPC-X MPI is not buildable, it is for external specs only.") def setup_dependent_package(self, module, dependent_spec): # This works for AOCC (AMD), Intel and GNU. diff --git a/var/spack/repos/builtin/packages/msmpi/package.py b/var/spack/repos/builtin/packages/msmpi/package.py index eccb88f0c1..9b3dc8a788 100644 --- a/var/spack/repos/builtin/packages/msmpi/package.py +++ b/var/spack/repos/builtin/packages/msmpi/package.py @@ -33,6 +33,8 @@ class Msmpi(Package): patch("ifort_compat.patch") + requires("platform=windows") + @classmethod def determine_version(cls, exe): # MSMPI is typically MS only, don't detect on other platforms diff --git a/var/spack/repos/builtin/packages/spectrum-mpi/package.py b/var/spack/repos/builtin/packages/spectrum-mpi/package.py index e2b54b1776..9c06900e6a 100644 --- a/var/spack/repos/builtin/packages/spectrum-mpi/package.py +++ b/var/spack/repos/builtin/packages/spectrum-mpi/package.py @@ -20,7 +20,7 @@ class SpectrumMpi(BundlePackage): provides("mpi") - conflicts("platform=windows") + requires("platform=linux") executables = ["^ompi_info$"] |