summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2016-10-03 17:25:36 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-03 08:25:36 -0700
commit50fcade81b6e14b38ecd2f6bc53299f15e7e3c84 (patch)
treef1244ef72f778398081b0242b60b1d764a2374dd /var
parentdf79ba0dcfd933789f407caea977541aa8b4d1ff (diff)
downloadspack-50fcade81b6e14b38ecd2f6bc53299f15e7e3c84.tar.gz
spack-50fcade81b6e14b38ecd2f6bc53299f15e7e3c84.tar.bz2
spack-50fcade81b6e14b38ecd2f6bc53299f15e7e3c84.tar.xz
spack-50fcade81b6e14b38ecd2f6bc53299f15e7e3c84.zip
cp2k : added support for libint, fixed compilation issues on elpa (#1889)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cp2k/package.py12
-rw-r--r--var/spack/repos/builtin/packages/elpa/package.py12
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py3
3 files changed, 22 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py
index 15606cd80a..3a175ea1a2 100644
--- a/var/spack/repos/builtin/packages/cp2k/package.py
+++ b/var/spack/repos/builtin/packages/cp2k/package.py
@@ -47,6 +47,7 @@ class Cp2k(Package):
depends_on('lapack')
depends_on('blas')
depends_on('fftw')
+ depends_on('libint@:1.2', when='@3.0')
depends_on('mpi', when='+mpi')
depends_on('scalapack', when='+mpi')
@@ -56,10 +57,8 @@ class Cp2k(Package):
depends_on('wannier90', when='+mpi')
depends_on('elpa', when='+mpi')
- # TODO : add dependency on libint
# TODO : add dependency on libsmm, libxsmm
# TODO : add dependency on CUDA
- # TODO : add dependency on QUIP
parallel = False
@@ -88,7 +87,7 @@ class Cp2k(Package):
}
cppflags = [
'-D__FFTW3',
- '-D__LIBPEXSI',
+ '-D__LIBINT',
'-I' + spec['fftw'].prefix.include
]
fcflags = copy.deepcopy(optflags[self.spec.compiler.name])
@@ -97,7 +96,11 @@ class Cp2k(Package):
])
fftw = find_libraries(['libfftw3'], root=spec['fftw'].prefix.lib)
ldflags = [fftw.search_flags]
- libs = []
+ libs = [
+ join_path(spec['libint'].prefix.lib, 'libint.so'),
+ join_path(spec['libint'].prefix.lib, 'libderiv.so'),
+ join_path(spec['libint'].prefix.lib, 'libr12.so')
+ ]
if '+plumed' in self.spec:
# Include Plumed.inc in the Makefile
mkf.write('include {0}\n'.format(
@@ -145,6 +148,7 @@ class Cp2k(Package):
if '+mpi' in self.spec:
cppflags.extend([
'-D__parallel',
+ '-D__LIBPEXSI',
'-D__WANNIER90',
'-D__ELPA3',
'-D__SCALAPACK'
diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py
index ae3f26b3ec..b433bf40b0 100644
--- a/var/spack/repos/builtin/packages/elpa/package.py
+++ b/var/spack/repos/builtin/packages/elpa/package.py
@@ -58,6 +58,18 @@ class Elpa(Package):
'CC={0}'.format(self.spec['mpi'].mpicc),
'FC={0}'.format(self.spec['mpi'].mpifc),
'CXX={0}'.format(self.spec['mpi'].mpicxx),
+ 'FCFLAGS={0}'.format(
+ spec['lapack'].lapack_libs.joined()
+ ),
+ 'LDFLAGS={0}'.format(
+ spec['lapack'].lapack_libs.joined()
+ ),
+ 'SCALAPACK_FCFLAGS={0}'.format(
+ spec['scalapack'].scalapack_libs.joined()
+ ),
+ 'SCALAPACK_LDFLAGS={0}'.format(
+ spec['scalapack'].scalapack_libs.joined()
+ ),
'--prefix={0}'.format(self.prefix)
]
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
index 1962d8cbec..2ad5e93191 100644
--- a/var/spack/repos/builtin/packages/libint/package.py
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -61,7 +61,8 @@ class Libint(Package):
autoconf()
config_args = [
- '--prefix={0}'.format(prefix)
+ '--prefix={0}'.format(prefix),
+ '--enable-shared'
]
# Optimizations for the Intel compiler, suggested by CP2K