summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/charm/package.py
diff options
context:
space:
mode:
authorChristoph Junghans <christoph.junghans@gmail.com>2017-04-18 12:02:41 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2017-04-18 12:02:41 -0500
commit2a3fc6c40429cb5171002830c06a800903ba6be4 (patch)
treebde3d9d8deafc4c120eb7a0c6a8f2078e02bcfdb /var/spack/repos/builtin/packages/charm/package.py
parentce714b564166d58eed73e93cc356a39d3a6913ee (diff)
downloadspack-2a3fc6c40429cb5171002830c06a800903ba6be4.tar.gz
spack-2a3fc6c40429cb5171002830c06a800903ba6be4.tar.bz2
spack-2a3fc6c40429cb5171002830c06a800903ba6be4.tar.xz
spack-2a3fc6c40429cb5171002830c06a800903ba6be4.zip
charm: set sane default (#3865)
see https://github.com/LLNL/spack/pull/3852#pullrequestreview-32996651 for details
Diffstat (limited to 'var/spack/repos/builtin/packages/charm/package.py')
-rw-r--r--var/spack/repos/builtin/packages/charm/package.py38
1 files changed, 5 insertions, 33 deletions
diff --git a/var/spack/repos/builtin/packages/charm/package.py b/var/spack/repos/builtin/packages/charm/package.py
index a12eb00445..85451eb5ae 100644
--- a/var/spack/repos/builtin/packages/charm/package.py
+++ b/var/spack/repos/builtin/packages/charm/package.py
@@ -53,16 +53,8 @@ class Charm(Package):
# Communication mechanisms (choose exactly one)
# TODO: Support Blue Gene/Q PAMI, Cray GNI, Cray shmem, CUDA
- variant("mpi", default=True,
- description="Use MPI as communication mechanism")
- variant("multicore", default=False,
- description="Disable inter-node communication")
- variant("net", default=False,
- description="Use net communication mechanism")
- variant("netlrts", default=True,
- description="Use netlrts communication mechanism")
- variant("verbs", default=False,
- description="Use Infiniband as communication mechanism")
+ variant('backend', default='mpi', description=(
+ 'Set the backend to use (mpi, multicore, net, netlrts, verbs)'))
# Other options
# Something is off with PAPI -- there are build errors. Maybe
@@ -73,37 +65,17 @@ class Charm(Package):
"Enable SMP parallelism (does not work with +multicore)"))
variant("tcp", default=False,
description="Use TCP as transport mechanism (requires +net)")
- variant("shared", default=False, description="Enable shared link support")
+ variant("shared", default=True, description="Enable shared link support")
# Note: We could add variants for AMPI, LIBS, bigemulator, msa, Tau
- depends_on("mpi", when="+mpi")
+ depends_on('mpi', when='backend=mpi')
depends_on("papi", when="+papi")
def install(self, spec, prefix):
target = "charm++"
- # Note: Turn this into a multi-valued variant, once these
- # exist in Spack
- if sum(["+mpi" in spec,
- "+multicore" in spec,
- "+net" in spec,
- "+netlrts" in spec,
- "+verbs" in spec]) != 1:
- raise InstallError(
- "Exactly one communication mechanism "
- "(+mpi, +multicore, +net, +netlrts, or +verbs) "
- "must be enabled")
- if "+mpi" in spec:
- comm = "mpi"
- if "+multicore" in spec:
- comm = "multicore"
- if "+net" in spec:
- comm = "net"
- if "+netlrts" in spec:
- comm = "netlrts"
- if "+verbs" in spec:
- comm = "verbs"
+ comm = spec.variants['backend'].value
plat = sys.platform
if plat.startswith("linux"):