diff options
author | Nils Vu <owls@nilsvu.de> | 2022-03-04 10:16:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 10:16:49 +0100 |
commit | 77d2b9a87afb6787b6d7d49d48ac17196bf8396e (patch) | |
tree | a828d0e2bd2d22f886af0c72eca126e242f85061 | |
parent | f931067bf2a6dfed6d1ad965f95cf57424c6b44a (diff) | |
download | spack-77d2b9a87afb6787b6d7d49d48ac17196bf8396e.tar.gz spack-77d2b9a87afb6787b6d7d49d48ac17196bf8396e.tar.bz2 spack-77d2b9a87afb6787b6d7d49d48ac17196bf8396e.tar.xz spack-77d2b9a87afb6787b6d7d49d48ac17196bf8396e.zip |
charmpp: resolve conflict with '+smp' (#29243)
The 'multicore' backend always uses SMP, so reverse
the logic of the `conflict` clause. This resolves an issue
where the '+smp' default caused the 'backend' to switch
away from 'multicore' unintentionally (#29234).
-rw-r--r-- | var/spack/repos/builtin/packages/charmpp/package.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/charmpp/package.py b/var/spack/repos/builtin/packages/charmpp/package.py index fe867153a5..35d1e7b950 100644 --- a/var/spack/repos/builtin/packages/charmpp/package.py +++ b/var/spack/repos/builtin/packages/charmpp/package.py @@ -94,9 +94,7 @@ class Charmpp(Package): # Other options variant("papi", default=False, description="Enable PAPI integration") variant("syncft", default=False, description="Compile with Charm++ fault tolerance support") - variant("smp", default=True, - description=( - "Enable SMP parallelism (does not work with +multicore)")) + variant("smp", default=True, description="Enable SMP parallelism") variant("tcp", default=False, description="Use TCP as transport mechanism (requires +net)") variant("omp", default=False, description="Support for the integrated LLVM OpenMP runtime") @@ -134,7 +132,8 @@ class Charmpp(Package): conflicts("~tracing", "+papi") - conflicts("backend=multicore", "+smp") + conflicts("backend=multicore", when="~smp", + msg="The 'multicore' backend always uses SMP") conflicts("backend=ucx", when="@:6.9") # Shared-lib builds with GCC are broken on macOS: @@ -299,7 +298,11 @@ class Charmpp(Package): options.extend(["--basedir=%s" % spec["ucx"].prefix]) if "+papi" in spec: options.extend(["papi", "--basedir=%s" % spec["papi"].prefix]) - if "+smp" in spec: + if "+smp" in spec and 'backend=multicore' not in spec: + # The 'multicore' backend always uses SMP, so we don't have to + # append the 'smp' option when the 'multicore' backend is active. As + # of Charm++ v7.0.0 it is actually a build error to append 'smp' + # with the 'multicore' backend. options.append("smp") if "+tcp" in spec: if 'backend=netlrts' not in spec: |