bohrium: missing dependencies (#27807)

This commit is contained in:
Glenn Johnson 2021-12-06 09:23:25 -06:00 committed by GitHub
parent 9b1b38d2de
commit a8a226b748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,6 +68,8 @@ class Bohrium(CMakePackage, CudaPackage):
conflicts('~node~proxy') conflicts('~node~proxy')
conflicts('~openmp~opencl~cuda') conflicts('~openmp~opencl~cuda')
conflicts('+cbridge', when='~python')
# #
# Dependencies # Dependencies
# #
@ -94,9 +96,14 @@ class Bohrium(CMakePackage, CudaPackage):
depends_on('py-numpy', type=("build", "test", "run"), when="+python") depends_on('py-numpy', type=("build", "test", "run"), when="+python")
depends_on('swig', type="build", when="+python") depends_on('swig', type="build", when="+python")
depends_on('py-cython', type="build", when="+python") depends_on('py-cython', type="build", when="+python")
depends_on('py-virtualenv', type="build", when="+python")
depends_on('py-pip', type="build", when="+python")
depends_on('py-wheel', type="build", when="+python")
depends_on('zlib', when="+proxy") depends_on('zlib', when="+proxy")
depends_on('libsigsegv')
@property @property
def config_file(self): def config_file(self):
"""Return the path of the Bohrium system-wide configuration file""" """Return the path of the Bohrium system-wide configuration file"""
@ -108,14 +115,11 @@ def config_file(self):
def cmake_args(self): def cmake_args(self):
spec = self.spec spec = self.spec
# Sanity check # TODO: Use cuda_arch to specify compute capabilities to build.
cuda_arch = spec.variants['cuda_arch'].value # This package detects the compute capability of the device on the
if "+cuda" in spec and len(cuda_arch) >= 1 and cuda_arch[0]: # build host and uses that to set a single compute capability. This is
# TODO Add cuda_arch support to Bohrium once the basic setup # limiting for generic builds and the ability to run CUDA builds on
# via Spack works. # different hosts.
raise InstallError(
"Bohrium does not support setting the CUDA architecture yet."
)
args = [ args = [
# Choose a particular python version # Choose a particular python version
@ -136,7 +140,7 @@ def cmake_args(self):
# #
# Bridges and interfaces # Bridges and interfaces
"-DBRIDGE_BHXX=ON", "-DBRIDGE_BHXX=ON",
"-DBRIDGE_C=" + str("+cbridge" in spec or "+python" in spec), "-DBRIDGE_C=" + str("+cbridge" in spec and "+python" in spec),
"-DBRIDGE_NPBACKEND=" + str("+python" in spec), "-DBRIDGE_NPBACKEND=" + str("+python" in spec),
"-DNO_PYTHON3=ON", # Only build python version we provide "-DNO_PYTHON3=ON", # Only build python version we provide
] ]