summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorEdward Kim <kim.edwardj@gmail.com>2018-05-23 13:26:59 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2018-05-23 13:26:59 -0500
commit011d1245fb95354ba074398eeaa9e6b7447d4203 (patch)
tree0db00e561902b3488ebb3f8f618894acf64e5018 /var
parent9fee111741f1fb70ee95e17ac9949a8eb53be2b9 (diff)
downloadspack-011d1245fb95354ba074398eeaa9e6b7447d4203.tar.gz
spack-011d1245fb95354ba074398eeaa9e6b7447d4203.tar.bz2
spack-011d1245fb95354ba074398eeaa9e6b7447d4203.tar.xz
spack-011d1245fb95354ba074398eeaa9e6b7447d4203.zip
charm: Update install script (#7291)
* charm: Update install script * Addressed PR comments * Removed destination and suffix variants * Added back parallel support
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/charm/package.py139
1 files changed, 94 insertions, 45 deletions
diff --git a/var/spack/repos/builtin/packages/charm/package.py b/var/spack/repos/builtin/packages/charm/package.py
index 1395326767..b52d11aa6e 100644
--- a/var/spack/repos/builtin/packages/charm/package.py
+++ b/var/spack/repos/builtin/packages/charm/package.py
@@ -37,8 +37,11 @@ class Charm(Package):
(your laptop) to the largest supercomputers."""
homepage = "http://charmplusplus.org"
- url = "http://charm.cs.illinois.edu/distrib/charm-6.7.1.tar.gz"
+ url = "http://charm.cs.illinois.edu/distrib/charm-6.8.2.tar.gz"
+ version("6.8.2", "a887a34b638a5b2f7fcf7ff3c262496d")
+ version("6.8.1", "3e95ffa760909154ef16b643c9bb8193")
+ version("6.8.0", "54df066a5aefb0bbc1a263c2383c2bba")
version("6.7.1", "a8e20cf85e9c8721158f5bbd0ade48d9")
version("6.7.0", "35a39a7975f1954a7db2d76736158231")
version("6.6.1", "9554230f741e2599deaaac4d9d93d7ab")
@@ -47,63 +50,106 @@ class Charm(Package):
# Support OpenMPI; see
# <https://charm.cs.illinois.edu/redmine/issues/1206>
- patch("mpi.patch")
+ # Patch is no longer needed in versions 6.8.0+
+ patch("mpi.patch", when="@:6.7.1")
+
# Ignore compiler warnings while configuring
patch("strictpass.patch")
+ # Build targets
+ # "target" is reserved, so we have to use something else.
+ variant(
+ "build-target",
+ default="LIBS",
+ values=("charm++", "AMPI", "LIBS"),
+ description="Specify the target to build"
+ )
+
# Communication mechanisms (choose exactly one)
- # TODO: Support Blue Gene/Q PAMI, Cray GNI, Cray shmem, CUDA
variant(
- 'backend',
- default='mpi',
- values=('mpi', 'multicore', 'net', 'netlrts', 'verbs'),
- description='Set the backend to use'
+ "backend",
+ default="mpi",
+ values=("mpi", "multicore", "netlrts", "verbs", "gni",
+ "ofi", "pami", "pamilrts"),
+ description="Set the backend to use"
)
# Other options
- # Something is off with PAPI -- there are build errors. Maybe
- # Charm++ expects a particular version?
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("tcp", default=False,
description="Use TCP as transport mechanism (requires +net)")
- variant("shared", default=True, description="Enable shared link support")
+ variant("omp", default=False, description="Support for the integrated LLVM OpenMP runtime")
+ variant("pthreads", default=False, description="Compile with pthreads Converse threads")
+ variant("cuda", default=False, description="Enable CUDA toolkit")
- # Note: We could add variants for AMPI, LIBS, bigemulator, msa, Tau
+ variant("shared", default=True, description="Enable shared link support")
+ variant("production", default=True, description="Build charm++ with all optimizations")
+ variant("tracing", default=False, description="Enable tracing modules")
- depends_on('mpi', when='backend=mpi')
+ depends_on("mpi", when="backend=mpi")
depends_on("papi", when="+papi")
+ depends_on("cuda", when="+cuda")
- def install(self, spec, prefix):
- target = "charm++"
+ conflicts("~tracing", "+papi")
- comm = spec.variants['backend'].value
+ conflicts("backend=multicore", "+smp")
+
+ def install(self, spec, prefix):
+ target = spec.variants["build-target"].value
plat = sys.platform
if plat.startswith("linux"):
plat = "linux"
+ elif plat.startswith("win"):
+ plat = "win"
+ elif plat.startswith("cnl"):
+ plat = "cnl"
+ elif plat.startswith("cnk"):
+ plat = "cnk"
+
mach = platform.machine()
+ if mach.startswith("ppc"):
+ mach = "ppc"
+ elif mach.startswith("arm"):
+ mach = "arm"
+
+ comm = spec.variants['backend'].value
# Define Charm++ version names for various (plat, mach, comm)
# combinations. Note that not all combinations are supported.
versions = {
- ("darwin", "i386", "multicore"): "multicore-darwin-x86",
- ("darwin", "i386", "net"): "net-darwin-x86",
- ("darwin", "x86_64", "mpi"): "mpi-darwin-x86_64",
- ("darwin", "x86_64", "multicore"): "multicore-darwin-x86_64",
- ("darwin", "x86_64", "net"): "net-darwin-x86_64",
- ("darwin", "x86_64", "netlrts"): "netlrts-darwin-x86_64",
- ("linux", "i386", "mpi"): "mpi-linux",
- ("linux", "i386", "multicore"): "multicore-linux32",
- ("linux", "i386", "net"): "net-linux",
- ("linux", "i386", "netlrts"): "netlrts-linux",
- ("linux", "x86_64", "mpi"): "mpi-linux-x86_64",
- ("linux", "x86_64", "multicore"): "multicore-linux64",
- ("linux", "x86_64", "net"): "net-linux-x86_64",
- ("linux", "x86_64", "netlrts"): "netlrts-linux-x86_64",
- ("linux", "x86_64", "verbs"): "verbs-linux-x86_64",
+ ("darwin", "x86_64", "mpi"): "mpi-darwin-x86_64",
+ ("darwin", "x86_64", "multicore"): "multicore-darwin-x86_64",
+ ("darwin", "x86_64", "netlrts"): "netlrts-darwin-x86_64",
+ ("linux", "i386", "mpi"): "mpi-linux",
+ ("linux", "i386", "multicore"): "multicore-linux",
+ ("linux", "i386", "netlrts"): "netlrts-linux",
+ ("linux", "i386", "uth"): "uth-linux",
+ ("linux", "x86_64", "mpi"): "mpi-linux-x86_64",
+ ("linux", "x86_64", "multicore"): "multicore-linux-x86_64",
+ ("linux", "x86_64", "netlrts"): "netlrts-linux-x86_64",
+ ("linux", "x86_64", "verbs"): "verbs-linux-x86_64",
+ ("linux", "x86_64", "ofi"): "ofi-linux-x86_64",
+ ("linux", "x86_64", "uth"): "uth-linux-x86_64",
+ ("linux", "ppc", "mpi"): "mpi-linux-ppc",
+ ("linux", "ppc", "multicore"): "multicore-linux-ppc",
+ ("linux", "ppc", "netlrts"): "netlrts-linux-ppc",
+ ("linux", "ppc", "pami"): "pami-linux-ppc64le",
+ ("linux", "ppc", "verbs"): "verbs-linux-ppc64le",
+ ("linux", "arm", "netlrts"): "netlrts-linux-arm7",
+ ("linux", "arm", "multicore"): "multicore-arm7",
+ ("win", "x86_64", "mpi"): "mpi-win-x86_64",
+ ("win", "x86_64", "multicore"): "multicore-win-x86_64",
+ ("win", "x86_64", "netlrts"): "netlrts-win-x86_64",
+ ("cnl", "x86_64", "gni"): "gni-crayxc",
+ ("cnl", "x86_64", "mpi"): "mpi-crayxc",
+ ("cnk", "x86_64", "mpi"): "mpi-bluegeneq",
+ ("cnk", "x86_64", "pami"): "pami-bluegeneq",
+ ("cnk", "x86_64", "pamilrts"): "pamilrts-bluegeneq",
}
if (plat, mach, comm) not in versions:
raise InstallError(
@@ -115,16 +161,12 @@ class Charm(Package):
# We assume that Spack's compiler wrappers make this work. If
# not, then we need to query the compiler vendor from Spack
# here.
- compiler = os.path.basename(self.compiler.cc)
-
- options = [compiler]
- if compiler == 'icc':
- options.append('ifort')
-
- options.extend([
- "--with-production", # Note: turn this into a variant
+ options = [
+ os.path.basename(self.compiler.cc),
+ os.path.basename(self.compiler.fc),
"-j%d" % make_jobs,
- "--destination=%s" % prefix])
+ "--destination=%s" % prefix,
+ ]
if 'backend=mpi' in spec:
# in intelmpi <prefix>/include and <prefix>/lib fails so --basedir
@@ -140,21 +182,28 @@ class Charm(Package):
if "+papi" in spec:
options.extend(["papi", "--basedir=%s" % spec["papi"].prefix])
if "+smp" in spec:
- if 'backend=multicore' in spec:
- # This is a Charm++ limitation; it would lead to a
- # build error
- raise InstallError("Cannot combine +smp with +multicore")
options.append("smp")
if "+tcp" in spec:
- if 'backend=net' not in spec:
+ if 'backend=netlrts' not in spec:
# This is a Charm++ limitation; it would lead to a
# build error
raise InstallError(
"The +tcp variant requires "
- "the backend=net communication mechanism")
+ "the backend=netlrts communication mechanism")
options.append("tcp")
+ if "+omp" in spec:
+ options.append("omp")
+ if "+pthreads" in spec:
+ options.append("pthreads")
+ if "+cuda" in spec:
+ options.append("cuda")
+
if "+shared" in spec:
options.append("--build-shared")
+ if "+production" in spec:
+ options.append("--with-production")
+ if "+tracing" in spec:
+ options.append("--enable-tracing")
# Call "make" via the build script
# Note: This builds Charm++ in the "tmp" subdirectory of the