elpa: add cuda support, add libtool dep, fix parallel build failure (#17969)
This commit is contained in:
parent
09cc89a449
commit
313511bf1d
1 changed files with 20 additions and 3 deletions
|
@ -8,7 +8,7 @@
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class Elpa(AutotoolsPackage):
|
class Elpa(AutotoolsPackage, CudaPackage):
|
||||||
"""Eigenvalue solvers for Petaflop-Applications (ELPA)"""
|
"""Eigenvalue solvers for Petaflop-Applications (ELPA)"""
|
||||||
|
|
||||||
homepage = 'http://elpa.mpcdf.mpg.de/'
|
homepage = 'http://elpa.mpcdf.mpg.de/'
|
||||||
|
@ -34,6 +34,7 @@ class Elpa(AutotoolsPackage):
|
||||||
depends_on('blas')
|
depends_on('blas')
|
||||||
depends_on('lapack')
|
depends_on('lapack')
|
||||||
depends_on('scalapack')
|
depends_on('scalapack')
|
||||||
|
depends_on('libtool', type='build')
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
t = 'http://elpa.mpcdf.mpg.de/html/Releases/{0}/elpa-{0}.tar.gz'
|
t = 'http://elpa.mpcdf.mpg.de/html/Releases/{0}/elpa-{0}.tar.gz'
|
||||||
|
@ -62,13 +63,13 @@ def headers(self):
|
||||||
return hlist
|
return hlist
|
||||||
|
|
||||||
build_directory = 'spack-build'
|
build_directory = 'spack-build'
|
||||||
|
parallel = False
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
options = []
|
options = []
|
||||||
|
|
||||||
# TODO: add --enable-gpu, --disable-sse-assembly, --enable-sparc64
|
# TODO: --disable-sse-assembly, --enable-sparc64, --enable-neon-arch64
|
||||||
# and --enable-neon-arch64
|
|
||||||
simd_features = ['vsx', 'sse', 'avx', 'avx2', 'avx512']
|
simd_features = ['vsx', 'sse', 'avx', 'avx2', 'avx512']
|
||||||
|
|
||||||
for feature in simd_features:
|
for feature in simd_features:
|
||||||
|
@ -85,6 +86,20 @@ def configure_args(self):
|
||||||
'CFLAGS=-O2'
|
'CFLAGS=-O2'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
if '+cuda' in spec:
|
||||||
|
prefix = spec['cuda'].prefix
|
||||||
|
options.append('--enable-gpu')
|
||||||
|
options.append('--with-cuda-path={0}'.format(prefix))
|
||||||
|
options.append('--with-cuda-sdk-path={0}'.format(prefix))
|
||||||
|
|
||||||
|
cuda_arch = spec.variants['cuda_arch'].value[0]
|
||||||
|
|
||||||
|
if cuda_arch != 'none':
|
||||||
|
options.append('--with-GPU-compute-capability=sm_{0}'.
|
||||||
|
format(cuda_arch))
|
||||||
|
else:
|
||||||
|
options.append('--disable-gpu')
|
||||||
|
|
||||||
if '+openmp' in spec:
|
if '+openmp' in spec:
|
||||||
options.append('--enable-openmp')
|
options.append('--enable-openmp')
|
||||||
else:
|
else:
|
||||||
|
@ -99,4 +114,6 @@ def configure_args(self):
|
||||||
'SCALAPACK_LDFLAGS={0}'.format(spec['scalapack'].libs.joined())
|
'SCALAPACK_LDFLAGS={0}'.format(spec['scalapack'].libs.joined())
|
||||||
])
|
])
|
||||||
|
|
||||||
|
options.append('--disable-silent-rules')
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
Loading…
Reference in a new issue