diff options
author | Ken Raffenetti <raffenet@users.noreply.github.com> | 2024-04-15 11:40:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-15 18:40:37 +0200 |
commit | c3c63e5ca439cc3f38a1671ef2b220fb7494a8e4 (patch) | |
tree | 325d03b6eb0377418c9ac8c3ee4a47ae0ee322ec | |
parent | e72d4075bdb2e9c7c41a42605b4bdd95d842443a (diff) | |
download | spack-c3c63e5ca439cc3f38a1671ef2b220fb7494a8e4.tar.gz spack-c3c63e5ca439cc3f38a1671ef2b220fb7494a8e4.tar.bz2 spack-c3c63e5ca439cc3f38a1671ef2b220fb7494a8e4.tar.xz spack-c3c63e5ca439cc3f38a1671ef2b220fb7494a8e4.zip |
mpich: Update PMI configure options (#43551)
Add a "default" option that passes no option to configure. Existing
options changed in the MPICH 4.2.0 release, so update the package to
reflect those changes.
-rw-r--r-- | var/spack/repos/builtin/packages/mpich/package.py | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b624bfe866..14c496506b 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -61,9 +61,9 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): variant("wrapperrpath", default=True, description="Enable wrapper rpath") variant( "pmi", - default="pmi", + default="default", description="""PMI interface.""", - values=("pmi", "pmi2", "pmix", "cray"), + values=("default", "pmi", "pmi2", "pmix", "cray"), multi=False, ) variant( @@ -388,10 +388,16 @@ supported, and netmod is ignored if device is ch3:sock.""", if re.search(r"--with-thread-package=argobots", output): variants.append("+argobots") - if re.search(r"--with-pmi=simple", output): + if re.search(r"--with-pmi=default", output): + variants.append("pmi=default") + elif re.search(r"--with-pmi=simple", output): variants.append("pmi=pmi") elif re.search(r"--with-pmi=pmi2/simple", output): variants.append("pmi=pmi2") + elif re.search(r"--with-pmi=pmi", output): + variants.append("pmi=pmi") + elif re.search(r"--with-pmi=pmi2", output): + variants.append("pmi=pmi2") elif re.search(r"--with-pmix", output): variants.append("pmi=pmix") @@ -555,14 +561,32 @@ supported, and netmod is ignored if device is ch3:sock.""", else: config_args.append("--with-slurm=no") - if "pmi=pmi" in spec: - config_args.append("--with-pmi=simple") - elif "pmi=pmi2" in spec: - config_args.append("--with-pmi=pmi2/simple") - elif "pmi=pmix" in spec: - config_args.append("--with-pmix={0}".format(spec["pmix"].prefix)) - elif "pmi=cray" in spec: - config_args.append("--with-pmi=cray") + # PMI options changed in 4.2.0 + if spec.satisfies("@4.2:"): + # default (no option) is to build both PMIv1 and PMI2 client interfaces + if "pmi=pmi" in spec: + # make PMI1 the default client interface + config_args.append("--with-pmi=pmi") + elif "pmi=pmi2" in spec: + # make PMI2 the default client interface + config_args.append("--with-pmi=pmi2") + elif "pmi=pmix" in spec: + # use the PMIx client interface with an external PMIx library + config_args.append("--with-pmi=pmix") + config_args.append(f"--with-pmix={spec['pmix'].prefix}") + elif "pmi=cray" in spec: + # use PMI2 interface of the Cray PMI library + config_args.append("--with-pmi=pmi2") + config_args.append(f"--with-pmi2={spec['cray-pmi'].prefix}") + else: + if "pmi=pmi" in spec: + config_args.append("--with-pmi=simple") + elif "pmi=pmi2" in spec: + config_args.append("--with-pmi=pmi2/simple") + elif "pmi=pmix" in spec: + config_args.append(f"--with-pmix={spec['pmix'].prefix}") + elif "pmi=cray" in spec: + config_args.append("--with-pmi=cray") if "+cuda" in spec: config_args.append("--with-cuda={0}".format(spec["cuda"].prefix)) |