summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <junghans@lanl.gov>2020-05-27 01:06:25 -0600
committerGitHub <noreply@github.com>2020-05-27 09:06:25 +0200
commitac7f6b98b50c64bf0526a803c89deca64f0e87c5 (patch)
tree91f5ca1af0cd78212b6900a28a3fc8b48b6afcc4
parente9dcab946470a71ad88ddaaad85f338d72a1b5db (diff)
downloadspack-ac7f6b98b50c64bf0526a803c89deca64f0e87c5.tar.gz
spack-ac7f6b98b50c64bf0526a803c89deca64f0e87c5.tar.bz2
spack-ac7f6b98b50c64bf0526a803c89deca64f0e87c5.tar.xz
spack-ac7f6b98b50c64bf0526a803c89deca64f0e87c5.zip
quicksilver: initial commit (#16811)
-rw-r--r--var/spack/repos/builtin/packages/quicksilver/package.py63
1 files changed, 63 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/quicksilver/package.py b/var/spack/repos/builtin/packages/quicksilver/package.py
new file mode 100644
index 0000000000..ceef9e1bfb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/quicksilver/package.py
@@ -0,0 +1,63 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Quicksilver(MakefilePackage):
+ """Quicksilver is a proxy application that represents some elements of the
+ Mercury workload.
+ """
+
+ tags = ['proxy-app']
+
+ homepage = "https://codesign.llnl.gov/quicksilver.php"
+ url = "https://github.com/LLNL/Quicksilver"
+ git = "https://github.com/LLNL/Quicksilver.git"
+
+ maintainers = ['richards12']
+
+ version('master', branch='master')
+
+ variant('openmp', default=True, description='Build with OpenMP support')
+ variant('mpi', default=True, description='Build with MPI support')
+
+ depends_on('mpi', when="+mpi")
+
+ build_directory = 'src'
+
+ @property
+ def build_targets(self):
+ targets = []
+ spec = self.spec
+
+ targets.append('CXXFLAGS={0}'.format(self.compiler.cxx11_flag))
+
+ if '+mpi' in spec:
+ targets.append('CXX={0}'.format(spec['mpi'].mpicxx))
+ else:
+ targets.append('CXX={0}'.format(spack_cxx))
+
+ if '+openmp+mpi' in spec:
+ targets.append('CPPFLAGS=-DHAVE_MPI -DHAVE_OPENMP {0}'.format(
+ self.compiler.openmp_flag))
+ elif '+openmp' in spec:
+ targets.append('CPPFLAGS=-DHAVE_OPENMP {0}'.format(
+ self.compiler.openmp_flag))
+ elif '+mpi' in spec:
+ targets.append('CPPFLAGS=-DHAVE_MPI')
+
+ if '+openmp' in self.spec:
+ targets.append('LDFLAGS={0}'.format(self.compiler.openmp_flag))
+
+ return targets
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ mkdir(prefix.doc)
+ install("src/qs", prefix.bin)
+ install('LICENSE.md', prefix.doc)
+ install('README.md', prefix.doc)
+ install_tree('Examples', prefix.Examples)