Ascent: CUDA ~shared (#22760)

Add a conflict for CUDA and shared libraries in Ascent.
The new concretizer will automatically change the default for
Ascent in that case. Until then, dependencies like WarpX need
to hint the `~shared` wish explicitly.
This commit is contained in:
Axel Huebl 2021-04-02 12:16:27 -07:00 committed by GitHub
parent 5a75f7e0d6
commit 2dbaf23fca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -166,6 +166,12 @@ class Ascent(Package, CudaPackage):
depends_on("py-sphinx", when="+python+doc", type='build') depends_on("py-sphinx", when="+python+doc", type='build')
depends_on("py-sphinx-rtd-theme", when="+python+doc", type='build') depends_on("py-sphinx-rtd-theme", when="+python+doc", type='build')
###########
# Conflicts
###########
conflicts("+shared", when="+cuda",
msg="Ascent needs to be built with ~shared for CUDA builds.")
def setup_build_environment(self, env): def setup_build_environment(self, env):
env.set('CTEST_OUTPUT_ON_FAILURE', '1') env.set('CTEST_OUTPUT_ON_FAILURE', '1')

View file

@ -66,7 +66,10 @@ class Warpx(CMakePackage):
description='Enable tiny profiling features') description='Enable tiny profiling features')
depends_on('ascent', when='+ascent') depends_on('ascent', when='+ascent')
depends_on('ascent +cuda', when='+ascent compute=cuda') # note: ~shared is only needed until the new concretizer is in and
# honors the conflict inside the Ascent package to find this
# automatically
depends_on('ascent +cuda ~shared', when='+ascent compute=cuda')
depends_on('ascent +mpi', when='+ascent +mpi') depends_on('ascent +mpi', when='+ascent +mpi')
depends_on('blaspp', when='+psatd dims=rz') depends_on('blaspp', when='+psatd dims=rz')
depends_on('blaspp +cuda', when='+psatd dims=rz compute=cuda') depends_on('blaspp +cuda', when='+psatd dims=rz compute=cuda')