Repository: spack/spack

Issue:
Installation issue: mpich@4.1.2 insists on detecting pmi.h even if `pmi=off`
### Steps to reproduce the issue

On a system that does not have `pmi` installed (`pmi.h` etc.), for example a user laptop or docker container:
```
spack install mpich@4.1.2 pmi=off
```
The issue is that `mpich` tries to find `pmi.h` no matter what option for variant `pmi` is set. For `pmi=off`, `spack` uses
```
'/tmp/root/spack-stage/spack-stage-mpich-4.1.2-xzvi62blqdg5kd5kejlmyztcwkk5i4ht/spack-src/configure' ... '--with-pmi=no' ...
```
and the `mpich` `configure` file looks for `pmi.h`. The same happens if I try `--with-pmi=off` or `--without-pmi`. If, however, I remove the option altogether from `./configure` (i.e. no `--with-pmi=WHATEVER` and no `--without-pmi`), then the call to `configure` succeeds.

### Error message

```
configure: ===== done with src/mpi/romio configure =====
configure: sourcing src/mpi/romio/localdefs
checking pmi.h usability... no
checking pmi.h presence... no
checking for pmi.h... no
configure: error: pmi.h or libpmi library not found. Did you specify --with-pmi= or --with-pmi-include= or --with-pmi-lib=?
```

### Information on your system

```
* **Spack:** 0.22.0.dev0 (07db2824377293d08684d840c54fbca0f9f5c92c)
* **Python:** 3.8.10
* **Platform:** linux-ubuntu20.04-aarch64
* **Concretizer:** clingo
```


### Additional information

@raffenet @yfguo

[spack-build-01-autoreconf-out.txt](https://github.com/spack/spack/files/14284204/spack-build-01-autoreconf-out.txt)
[spack-build-01-install-out.txt](https://github.com/spack/spack/files/14284205/spack-build-01-install-out.txt)
[spack-build-02-configure-out.txt](https://github.com/spack/spack/files/14284206/spack-build-02-configure-out.txt)
[spack-build-env-mods.txt](https://github.com/spack/spack/files/14284207/spack-build-env-mods.txt)
[spack-build-env.txt](https://github.com/spack/spack/files/14284208/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/14284209/spack-build-out.txt)
[spack-configure-args.txt](https://github.com/spack/spack/files/14284210/spack-configure-args.txt)


### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:
`pmi=off` should not be an option. MPICH cannot function without a PMI library.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -63,7 +63,7 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
         "pmi",
         default="pmi",
         description="""PMI interface.""",
-        values=("off", "pmi", "pmi2", "pmix", "cray"),
+        values=("pmi", "pmi2", "pmix", "cray"),
         multi=False,
     )
     variant(
@@ -385,8 +385,6 @@ def is_disabled(text):
             if re.search(r"--with-thread-package=argobots", output):
                 variants.append("+argobots")
 
-            if re.search(r"--with-pmi=no", output):
-                variants.append("pmi=off")
             elif re.search(r"--with-pmi=simple", output):
                 variants.append("pmi=pmi")
             elif re.search(r"--with-pmi=pmi2/simple", output):


Test patch: