diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py index 2c24d42c36c..04041f43df5 100644 --- a/var/spack/repos/builtin/packages/plumed/package.py +++ b/var/spack/repos/builtin/packages/plumed/package.py @@ -292,10 +292,9 @@ def configure_args(self): if "+mpi" in spec: configure_opts.extend(["--enable-mpi", "CXX={0}".format(spec["mpi"].mpicxx)]) - # If the MPI dependency is provided by the intel-mpi package then - # the following additional argument is required to allow it to - # build. - if "intel-mpi" in spec: + # If the MPI dependency is provided by the intel-oneapi-mpi package then the following + # additional argument is required to allow it to build. + if spec.satisfies("^[virtuals=mpi] intel-oneapi-mpi"): configure_opts.extend(["STATIC_LIBS=-mt_mpi"]) extra_libs = []