summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/chai/package.py
diff options
context:
space:
mode:
authorAdrien Bernede <51493078+adrienbernede@users.noreply.github.com>2020-08-07 15:42:07 -0700
committerGitHub <noreply@github.com>2020-08-07 17:42:07 -0500
commit3978db91dc4385b492b8dcbc1f2b87326f217b1b (patch)
treef74a767c921e58f1c37f27c73ab6e7b283c8aa3e /var/spack/repos/builtin/packages/chai/package.py
parentceed9c4bc0ea64ab2ec01f8b1ec07adfdbbefb0d (diff)
downloadspack-3978db91dc4385b492b8dcbc1f2b87326f217b1b.tar.gz
spack-3978db91dc4385b492b8dcbc1f2b87326f217b1b.tar.bz2
spack-3978db91dc4385b492b8dcbc1f2b87326f217b1b.tar.xz
spack-3978db91dc4385b492b8dcbc1f2b87326f217b1b.zip
Feature/raja chai umpire update (#17665)
* Changing raja, chai, and umpire packages so all will compile with each other. * Need a CUDA version of CHAI when compiling with raja+cuda+chai * Updating checks for commit. * Adding comments explaining why chai+umpire tests were disabled * Reactivating tests for CHAI and Umpire * reordering versions * Unified handling of Cuda Arch * Adding latest versions * Unused/Untested: removed * Aesthetic and test mode in Chai * Unified handling of Cuda Arch * Using 'ON' consistently, instead of 'On' * Apply suggestions from code review Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Fix, suggestion and patch: Chai depends on RAJA, not the other way. Apply suggested master-main version mapping. Add Umpire version 3.0.0 and patch. Co-authored-by: Robert Blake <blake14@llnl.gov> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var/spack/repos/builtin/packages/chai/package.py')
-rw-r--r--var/spack/repos/builtin/packages/chai/package.py61
1 files changed, 61 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/chai/package.py b/var/spack/repos/builtin/packages/chai/package.py
new file mode 100644
index 0000000000..66296f5ddf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/chai/package.py
@@ -0,0 +1,61 @@
+# Copyright 2013-2019 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 Chai(CMakePackage, CudaPackage):
+ """
+ Copy-hiding array interface for data migration between memory spaces
+ """
+
+ homepage = "https://github.com/LLNL/CHAI"
+ git = "https://github.com/LLNL/CHAI.git"
+
+ version('develop', branch='develop', submodules='True')
+ version('master', branch='main', submodules='True')
+ version('2.1.1', tag='v2.1.1', submodules='True')
+ version('2.1.0', tag='v2.1.0', submodules='True')
+ version('2.0.0', tag='v2.0.0', submodules='True')
+ version('1.2.0', tag='v1.2.0', submodules='True')
+ version('1.1.0', tag='v1.1.0', submodules='True')
+ version('1.0', tag='v1.0', submodules='True')
+
+ variant('shared', default=True, description='Build Shared Libs')
+ variant('raja', default=False, description='Build plugin for RAJA')
+
+ depends_on('cmake@3.8:', type='build')
+ depends_on('umpire')
+ depends_on('raja', when="+raja")
+
+ depends_on('cmake@3.9:', type='build', when="+cuda")
+ depends_on('umpire+cuda', when="+cuda")
+ depends_on('raja+cuda', when="+raja+cuda")
+
+ def cmake_args(self):
+ spec = self.spec
+
+ options = []
+
+ if '+cuda' in spec:
+ options.extend([
+ '-DENABLE_CUDA=ON',
+ '-DCUDA_TOOLKIT_ROOT_DIR=%s' % (spec['cuda'].prefix)])
+
+ if not spec.satisfies('cuda_arch=none'):
+ cuda_arch = spec.variants['cuda_arch'].value
+ options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0]))
+ flag = '-arch sm_{0}'.format(cuda_arch[0])
+ options.append('-DCMAKE_CUDA_FLAGS:STRING={0}'.format(flag))
+ else:
+ options.append('-DENABLE_CUDA=OFF')
+
+ options.append('-Dumpire_DIR:PATH='
+ + spec['umpire'].prefix.share.umpire.cmake)
+
+ options.append('-DENABLE_TESTS={0}'.format(
+ 'ON' if self.run_tests else 'OFF'))
+
+ return options