hypre: Add a variant for unified memory support (#23258)
Enabling unified memory requires cuda to be enabled as well.
This commit is contained in:
parent
7317b04318
commit
b7c4bfb2a7
@ -60,6 +60,7 @@ class Hypre(Package, CudaPackage):
|
|||||||
variant('openmp', default=False, description='Enable OpenMP support')
|
variant('openmp', default=False, description='Enable OpenMP support')
|
||||||
variant('debug', default=False,
|
variant('debug', default=False,
|
||||||
description='Build debug instead of optimized version')
|
description='Build debug instead of optimized version')
|
||||||
|
variant('unified-memory', default=False, description='Use unified memory')
|
||||||
|
|
||||||
# Patch to add ppc64le in config.guess
|
# Patch to add ppc64le in config.guess
|
||||||
patch('ibm-ppc64le.patch', when='@:2.11.1')
|
patch('ibm-ppc64le.patch', when='@:2.11.1')
|
||||||
@ -79,6 +80,7 @@ class Hypre(Package, CudaPackage):
|
|||||||
depends_on('superlu-dist', when='+superlu-dist+mpi')
|
depends_on('superlu-dist', when='+superlu-dist+mpi')
|
||||||
|
|
||||||
conflicts('+cuda', when='+int64')
|
conflicts('+cuda', when='+int64')
|
||||||
|
conflicts('+unified-memory', when='~cuda')
|
||||||
|
|
||||||
# Patch to build shared libraries on Darwin does not apply to
|
# Patch to build shared libraries on Darwin does not apply to
|
||||||
# versions before 2.13.0
|
# versions before 2.13.0
|
||||||
@ -178,6 +180,9 @@ def _configure_args(self):
|
|||||||
'--disable-cub'
|
'--disable-cub'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if '+unified-memory' in self.spec:
|
||||||
|
configure_args.append('--enable-unified-memory')
|
||||||
|
|
||||||
return configure_args
|
return configure_args
|
||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
|
Loading…
Reference in New Issue
Block a user