
* Add OpenMP variant to Umpire * Initial implementation of Axom package * Add Axom spack package and fix required dependencies * Fix overzealous tag replacement * Attempt to fix version error * Fix python version attempt #2 * Update raja and umpire * remove sys_type check * Address comments in axom package * Address Greg's comments * Fix flake8 * more flake8 * Simplify MPIEXEC and MPIEXEC_NUMPROC_FLAG * Fix typo * Revert back to slurm check, fix cuda_arch checks * Fix cuda_arch variant forwarding * Add cub variant * Add py-shroud * Address comments * Fix shroud path in axom * Fix merge conflict * Fix backwards if * Fix flake8 and add copyright * format for consistency
87 lines
3.3 KiB
Python
87 lines
3.3 KiB
Python
# 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 Umpire(CMakePackage, CudaPackage):
|
|
"""An application-focused API for memory management on NUMA & GPU
|
|
architectures"""
|
|
|
|
homepage = 'https://github.com/LLNL/Umpire'
|
|
git = 'https://github.com/LLNL/Umpire.git'
|
|
|
|
version('develop', branch='develop', submodules='True')
|
|
version('master', branch='master', submodules='True')
|
|
version('2.1.0', tag='v2.1.0', submodules='True')
|
|
version('2.0.0', tag='v2.0.0', submodules='True')
|
|
version('1.1.0', tag='v1.1.0', submodules='True')
|
|
version('1.0.1', tag='v1.0.1', submodules='True')
|
|
version('1.0.0', tag='v1.0.0', submodules='True')
|
|
version('0.3.5', tag='v0.3.5', submodules='True')
|
|
version('0.3.4', tag='v0.3.4', submodules='True')
|
|
version('0.3.3', tag='v0.3.3', submodules='True')
|
|
version('0.3.2', tag='v0.3.2', submodules='True')
|
|
version('0.3.1', tag='v0.3.1', submodules='True')
|
|
version('0.3.0', tag='v0.3.0', submodules='True')
|
|
version('0.2.4', tag='v0.2.4', submodules='True')
|
|
version('0.2.3', tag='v0.2.3', submodules='True')
|
|
version('0.2.2', tag='v0.2.2', submodules='True')
|
|
version('0.2.1', tag='v0.2.1', submodules='True')
|
|
version('0.2.0', tag='v0.2.0', submodules='True')
|
|
version('0.1.4', tag='v0.1.4', submodules='True')
|
|
version('0.1.3', tag='v0.1.3', submodules='True')
|
|
|
|
variant('fortran', default=False, description='Build C/Fortran API')
|
|
variant('c', default=True, description='Build C API')
|
|
variant('numa', default=False, description='Enable NUMA support')
|
|
variant('openmp', default=False, description='Build with OpenMP support')
|
|
variant('deviceconst', default=False,
|
|
description='Enables support for constant device memory')
|
|
|
|
depends_on('cmake@3.8:', type='build')
|
|
depends_on('cmake@3.9:', when='+cuda', type='build')
|
|
|
|
conflicts('+numa', when='@:0.3.2')
|
|
conflicts('~c', when='+fortran', msg='Fortran API requires C API')
|
|
|
|
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
|
|
flag = '-arch sm_{0}'.format(cuda_arch[0])
|
|
options.append('-DCMAKE_CUDA_FLAGS:STRING={0}'.format(flag))
|
|
|
|
if '+deviceconst' in spec:
|
|
options.append('-DENABLE_DEVICE_CONST=On')
|
|
else:
|
|
options.append('-DENABLE_CUDA=Off')
|
|
|
|
options.append('-DENABLE_C={0}'.format(
|
|
'On' if '+c' in spec else 'Off'))
|
|
|
|
options.append('-DENABLE_FORTRAN={0}'.format(
|
|
'On' if '+fortran' in spec else 'Off'))
|
|
|
|
options.append('-DENABLE_NUMA={0}'.format(
|
|
'On' if '+numa' in spec else 'Off'))
|
|
|
|
options.append('-DENABLE_OPENMP={0}'.format(
|
|
'On' if '+openmp' in spec else 'Off'))
|
|
|
|
options.append('-DENABLE_TESTS={0}'.format(
|
|
'On' if self.run_tests else 'Off'))
|
|
|
|
return options
|