CP2K: update libxc dep, SIRIUS: update spla dep for 7+ (#22249)
This commit is contained in:
parent
629f94b4e1
commit
3305a39c55
@ -94,7 +94,8 @@ class Cp2k(MakefilePackage, CudaPackage):
|
|||||||
|
|
||||||
depends_on('libxc@2.2.2:3.99.0', when='+libxc@:5.5999', type='build')
|
depends_on('libxc@2.2.2:3.99.0', when='+libxc@:5.5999', type='build')
|
||||||
depends_on('libxc@4.0.3:4.99.0', when='+libxc@6.0:6.9', type='build')
|
depends_on('libxc@4.0.3:4.99.0', when='+libxc@6.0:6.9', type='build')
|
||||||
depends_on('libxc@4.0.3:4.99.0', when='+libxc@7.0:')
|
depends_on('libxc@4.0.3:4.99.0', when='+libxc@7.0:8.1')
|
||||||
|
depends_on('libxc@5.1.2', when='+libxc@9.0:')
|
||||||
|
|
||||||
depends_on('mpi@2:', when='+mpi')
|
depends_on('mpi@2:', when='+mpi')
|
||||||
depends_on('scalapack', when='+mpi')
|
depends_on('scalapack', when='+mpi')
|
||||||
|
@ -19,7 +19,9 @@ class Sirius(CMakePackage, CudaPackage):
|
|||||||
maintainers = ['simonpintarelli', 'haampie', 'dev-zero', 'AdhocMan']
|
maintainers = ['simonpintarelli', 'haampie', 'dev-zero', 'AdhocMan']
|
||||||
|
|
||||||
version('develop', branch='develop')
|
version('develop', branch='develop')
|
||||||
|
version('master', branch='master')
|
||||||
|
|
||||||
|
version('7.0.2', sha256='ee613607ce3be0b2c3f69b560b2415ce1b0e015179002aa90739430dbfaa0389')
|
||||||
version('7.0.0', sha256='da783df11e7b65668e29ba8d55c8a6827e2216ad6d88040f84f42ac20fd1bb99')
|
version('7.0.0', sha256='da783df11e7b65668e29ba8d55c8a6827e2216ad6d88040f84f42ac20fd1bb99')
|
||||||
version('6.5.7', sha256='d886c3066163c43666ebac2ea50351df03907b5686671e514a75f131ba51b43c',
|
version('6.5.7', sha256='d886c3066163c43666ebac2ea50351df03907b5686671e514a75f131ba51b43c',
|
||||||
preferred=True)
|
preferred=True)
|
||||||
@ -48,6 +50,10 @@ class Sirius(CMakePackage, CudaPackage):
|
|||||||
|
|
||||||
variant('shared', default=True, description="Build shared libraries")
|
variant('shared', default=True, description="Build shared libraries")
|
||||||
variant('openmp', default=True, description="Build with OpenMP support")
|
variant('openmp', default=True, description="Build with OpenMP support")
|
||||||
|
variant('boost_filesystem', default=False,
|
||||||
|
description="Use Boost filesystem for self-consistent field method "
|
||||||
|
"mini-app. Only required when the compiler does not "
|
||||||
|
"support std::experimental::filesystem nor std::filesystem")
|
||||||
variant('fortran', default=False, description="Build Fortran bindings")
|
variant('fortran', default=False, description="Build Fortran bindings")
|
||||||
variant('python', default=False, description="Build Python bindings")
|
variant('python', default=False, description="Build Python bindings")
|
||||||
variant('memory_pool', default=True, description="Build with memory pool")
|
variant('memory_pool', default=True, description="Build with memory pool")
|
||||||
@ -61,6 +67,8 @@ class Sirius(CMakePackage, CudaPackage):
|
|||||||
variant('build_type', default='Release',
|
variant('build_type', default='Release',
|
||||||
description='CMake build type',
|
description='CMake build type',
|
||||||
values=('Debug', 'Release', 'RelWithDebInfo'))
|
values=('Debug', 'Release', 'RelWithDebInfo'))
|
||||||
|
variant('apps', default=True, description="Build applications")
|
||||||
|
variant('tests', default=False, description="Build tests")
|
||||||
|
|
||||||
depends_on('python', type=('build', 'run'))
|
depends_on('python', type=('build', 'run'))
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
@ -80,17 +88,15 @@ class Sirius(CMakePackage, CudaPackage):
|
|||||||
depends_on('py-voluptuous', when='+python', type=('build', 'run'))
|
depends_on('py-voluptuous', when='+python', type=('build', 'run'))
|
||||||
depends_on('py-pybind11', when='+python', type=('build', 'run'))
|
depends_on('py-pybind11', when='+python', type=('build', 'run'))
|
||||||
depends_on('magma', when='+magma')
|
depends_on('magma', when='+magma')
|
||||||
|
depends_on('boost cxxstd=14 +filesystem', when='+boost_filesystem')
|
||||||
|
|
||||||
depends_on('spfft', when='@6.4.0:')
|
depends_on('spfft', when='@6.4.0:')
|
||||||
depends_on('spfft', when='@develop')
|
|
||||||
depends_on('spfft+cuda', when='@6.4.0:+cuda')
|
depends_on('spfft+cuda', when='@6.4.0:+cuda')
|
||||||
depends_on('spfft+cuda', when='@develop+cuda')
|
|
||||||
depends_on('spfft+rocm', when='@6.4.0:+rocm')
|
depends_on('spfft+rocm', when='@6.4.0:+rocm')
|
||||||
depends_on('spfft+rocm', when='@develop+rocm')
|
|
||||||
|
|
||||||
depends_on('spla@1.1.0:', when='@develop')
|
depends_on('spla@1.2.0:', when='@7.0.0:')
|
||||||
depends_on('spla@1.1.0:+cuda', when='@develop+cuda')
|
depends_on('spla+cuda', when='@7.0.0:+cuda')
|
||||||
depends_on('spla@1.1.0:+rocm', when='@develop+rocm')
|
depends_on('spla+rocm', when='@7.0.0:+rocm')
|
||||||
|
|
||||||
depends_on('elpa+openmp', when='+elpa+openmp')
|
depends_on('elpa+openmp', when='+elpa+openmp')
|
||||||
depends_on('elpa~openmp', when='+elpa~openmp')
|
depends_on('elpa~openmp', when='+elpa~openmp')
|
||||||
@ -110,6 +116,8 @@ class Sirius(CMakePackage, CudaPackage):
|
|||||||
extends('python', when='+python')
|
extends('python', when='+python')
|
||||||
|
|
||||||
conflicts('+shared', when='@6.3.0:6.4.999')
|
conflicts('+shared', when='@6.3.0:6.4.999')
|
||||||
|
conflicts('+boost_filesystem', when='~apps')
|
||||||
|
conflicts('^libxc@5.0.0') # known to produce incorrect results
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# add support for CRAY_LIBSCI, testing
|
# add support for CRAY_LIBSCI, testing
|
||||||
@ -144,78 +152,72 @@ def libs(self):
|
|||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
def _def(variant, flag=None):
|
|
||||||
"""Returns "-DUSE_VARIANT:BOOL={ON,OFF}" depending on whether
|
|
||||||
+variant is set. If the CMake flag differs from the variant
|
|
||||||
name, pass the flag name explicitly.
|
|
||||||
"""
|
|
||||||
|
|
||||||
return "-D{0}:BOOL={1}".format(
|
|
||||||
flag if flag else "USE_{0}".format(
|
|
||||||
variant.strip('+~').upper()
|
|
||||||
),
|
|
||||||
"ON" if variant in spec else "OFF"
|
|
||||||
)
|
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
_def('+openmp'),
|
self.define_from_variant('USE_OPENMP', 'openmp'),
|
||||||
_def('+elpa'),
|
self.define_from_variant('USE_ELPA', 'elpa'),
|
||||||
_def('+magma'),
|
self.define_from_variant('USE_MAGMA', 'magma'),
|
||||||
_def('+nlcglib'),
|
self.define_from_variant('USE_NLCGLIB', 'nlcglib'),
|
||||||
_def('+vdwxc'),
|
self.define_from_variant('USE_VDWXC', 'vdwxc'),
|
||||||
_def('+memory_pool'),
|
self.define_from_variant('USE_MEMORY_POOL', 'memory_pool'),
|
||||||
_def('+scalapack'),
|
self.define_from_variant('USE_SCALAPACK', 'scalapack'),
|
||||||
_def('+fortran', 'CREATE_FORTRAN_BINDINGS'),
|
self.define_from_variant('CREATE_FORTRAN_BINDINGS', 'fortran'),
|
||||||
_def('+python', 'CREATE_PYTHON_MODULE'),
|
self.define_from_variant('CREATE_PYTHON_MODULE', 'python'),
|
||||||
_def('+cuda'),
|
self.define_from_variant('USE_CUDA', 'cuda'),
|
||||||
_def('+rocm')
|
self.define_from_variant('USE_ROCM', 'rocm'),
|
||||||
|
self.define_from_variant('BUILD_TESTING', 'tests'),
|
||||||
|
self.define_from_variant('BUILD_APPS', 'apps'),
|
||||||
|
self.define_from_variant('BUILD_SHARED_LIBS', 'shared')
|
||||||
]
|
]
|
||||||
|
|
||||||
args += [_def('+shared', 'BUILD_SHARED_LIBS')]
|
|
||||||
|
|
||||||
lapack = spec['lapack']
|
lapack = spec['lapack']
|
||||||
blas = spec['blas']
|
blas = spec['blas']
|
||||||
|
|
||||||
args += [
|
args.extend([
|
||||||
'-DLAPACK_FOUND=true',
|
self.define('LAPACK_FOUND', 'true'),
|
||||||
'-DLAPACK_LIBRARIES={0}'.format(lapack.libs.joined(';')),
|
self.define('LAPACK_LIBRARIES', lapack.libs.joined(';')),
|
||||||
'-DBLAS_FOUND=true',
|
self.define('BLAS_FOUND', 'true'),
|
||||||
'-DBLAS_LIBRARIES={0}'.format(blas.libs.joined(';')),
|
self.define('BLAS_LIBRARIES', blas.libs.joined(';'))
|
||||||
]
|
])
|
||||||
|
|
||||||
if '+scalapack' in spec:
|
if '+scalapack' in spec:
|
||||||
args += [
|
args.extend([
|
||||||
'-DSCALAPACK_FOUND=true',
|
self.define('SCALAPACK_FOUND', 'true'),
|
||||||
'-DSCALAPACK_INCLUDE_DIRS={0}'.format(
|
self.define('SCALAPACK_INCLUDE_DIRS',
|
||||||
spec['scalapack'].prefix.include),
|
spec['scalapack'].prefix.include),
|
||||||
'-DSCALAPACK_LIBRARIES={0}'.format(
|
self.define('SCALAPACK_LIBRARIES',
|
||||||
spec['scalapack'].libs.joined(';')),
|
spec['scalapack'].libs.joined(';'))
|
||||||
]
|
])
|
||||||
|
|
||||||
if spec['blas'].name in ['intel-mkl', 'intel-parallel-studio']:
|
if spec['blas'].name in ['intel-mkl', 'intel-parallel-studio']:
|
||||||
args += ['-DUSE_MKL=ON']
|
args.append(self.define('USE_MKL', 'ON'))
|
||||||
|
|
||||||
if '+elpa' in spec:
|
if '+elpa' in spec:
|
||||||
elpa_incdir = os.path.join(
|
elpa_incdir = os.path.join(
|
||||||
spec['elpa'].headers.directories[0],
|
spec['elpa'].headers.directories[0],
|
||||||
'elpa'
|
'elpa'
|
||||||
)
|
)
|
||||||
args += ["-DELPA_INCLUDE_DIR={0}".format(elpa_incdir)]
|
args.append(self.define('ELPA_INCLUDE_DIR', elpa_incdir))
|
||||||
|
|
||||||
|
if '+cuda' in spec:
|
||||||
cuda_arch = spec.variants['cuda_arch'].value
|
cuda_arch = spec.variants['cuda_arch'].value
|
||||||
cuda_arch_selected = cuda_arch[0] != 'none'
|
if cuda_arch[0] != 'none':
|
||||||
if '+cuda' in spec and cuda_arch_selected:
|
# Specify a single arch directly
|
||||||
cuda_args = '-DCUDA_ARCH={0}'.format(cuda_arch[0])
|
if '@:6' in spec:
|
||||||
if spec.satisfies('@:6.999'):
|
args.append(self.define(
|
||||||
cuda_args = '-DCMAKE_CUDA_FLAGS=-arch=sm_{0}'.format(
|
'CMAKE_CUDA_FLAGS',
|
||||||
cuda_arch[0])
|
'-arch=sm_{0}'.format(cuda_arch[0]))
|
||||||
args.append(cuda_args)
|
)
|
||||||
|
|
||||||
|
# Make SIRIUS handle it
|
||||||
|
else:
|
||||||
|
args.append(self.define('CUDA_ARCH', ';'.join(cuda_arch)))
|
||||||
|
|
||||||
if '+rocm' in spec:
|
if '+rocm' in spec:
|
||||||
archs = ",".join(self.spec.variants['amdgpu_target'].value)
|
archs = ",".join(self.spec.variants['amdgpu_target'].value)
|
||||||
args.extend([
|
args.extend([
|
||||||
'-DHIP_ROOT_DIR={0}'.format(spec['hip'].prefix),
|
self.define('HIP_ROOT_DIR', spec['hip'].prefix),
|
||||||
'-DHIP_HCC_FLAGS=--amdgpu-target={0}'.format(archs)
|
self.define('HIP_HCC_FLAGS', '--amdgpu-target={0}'.format(archs)),
|
||||||
|
self.define('HIP_CXX_COMPILER', self.spec['hip'].hipcc)
|
||||||
])
|
])
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user