summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSimo Tuomisto <simo-tuomisto@users.noreply.github.com>2019-09-08 18:46:47 +0300
committerAdam J. Stewart <ajstewart426@gmail.com>2019-09-08 10:46:47 -0500
commit5a21c781f3fb9c190ab43f6f6245bf822db55ef2 (patch)
tree34f0a93ff11492342d333a2d2c7df54f95692b65 /var
parent8fd8b54e9702dc972189e4def0fe60692a1dce47 (diff)
downloadspack-5a21c781f3fb9c190ab43f6f6245bf822db55ef2.tar.gz
spack-5a21c781f3fb9c190ab43f6f6245bf822db55ef2.tar.bz2
spack-5a21c781f3fb9c190ab43f6f6245bf822db55ef2.tar.xz
spack-5a21c781f3fb9c190ab43f6f6245bf822db55ef2.zip
py-gpaw: Fixing missing numpy include path, adding newer version of p… (#12737)
* py-gpaw: Fixing missing numpy include path, adding newer version of py-gpaw and fixing a bug with libxc.c in older py-gpaw * py-gpaw: Fix Python and ASE version dependencies - GPAW 19.8.1 requires Python 3.x, add dependency on python@3.5: - GPAW releases are associated with a corresponding ASE release, add matching ASE version dependencies. * py-gpaw: Enable the scalapack variant by default GPAW installation instructions say scalapack is optional but "highly recommended". Thus enable it by default.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-gpaw/libxc.patch12
-rw-r--r--var/spack/repos/builtin/packages/py-gpaw/package.py19
2 files changed, 28 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-gpaw/libxc.patch b/var/spack/repos/builtin/packages/py-gpaw/libxc.patch
new file mode 100644
index 0000000000..09a992876e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-gpaw/libxc.patch
@@ -0,0 +1,12 @@
+diff -Naur gpaw-1.3.0.orig/c/xc/libxc.c gpaw-1.3.0/c/xc/libxc.c
+--- gpaw-1.3.0.orig/c/xc/libxc.c 2019-09-06 14:59:35.151442058 +0300
++++ gpaw-1.3.0/c/xc/libxc.c 2019-09-06 15:00:46.211440365 +0300
+@@ -801,7 +801,7 @@
+ if (!PyArg_ParseTuple(args, "dOOOOOO",
+ &c, &n_g, &sigma_g, &lapl_g, &tau_g, &v_g, &vx_g))
+ return NULL;
+- xc_mgga_x_tb09_set_params(self->functional[0], c);
++ xc_func_set_ext_params(self->functional[0], &c);
+ xc_mgga_vxc(self->functional[0], PyArray_DIM(n_g, 0),
+ PyArray_DATA(n_g),
+ PyArray_DATA(sigma_g),
diff --git a/var/spack/repos/builtin/packages/py-gpaw/package.py b/var/spack/repos/builtin/packages/py-gpaw/package.py
index b7b0a8301c..04137f3986 100644
--- a/var/spack/repos/builtin/packages/py-gpaw/package.py
+++ b/var/spack/repos/builtin/packages/py-gpaw/package.py
@@ -14,16 +14,19 @@ class PyGpaw(PythonPackage):
homepage = "https://wiki.fysik.dtu.dk/gpaw/index.html"
url = "https://pypi.io/packages/source/g/gpaw/gpaw-1.3.0.tar.gz"
+ version('19.8.1', sha256='79dee367d695d68409c4d69edcbad5c8679137d6715da403f6c2500cb2178c2a')
version('1.3.0', '82e8c80e637696248db00b5713cdffd1')
variant('mpi', default=True, description='Build with MPI support')
- variant('scalapack', default=False,
+ variant('scalapack', default=True,
description='Build with ScaLAPACK support')
variant('fftw', default=True, description='Build with FFTW support')
depends_on('mpi', when='+mpi', type=('build', 'link', 'run'))
- depends_on('python@2.6:')
- depends_on('py-ase@3.13.0:', type=('build', 'run'))
+ depends_on('python@2.6:', type=('build', 'run'), when='@:1.3.0')
+ depends_on('python@3.5:', type=('build', 'run'), when='@19.8.1:')
+ depends_on('py-ase@3.13.0:', type=('build', 'run'), when='@1.3.0')
+ depends_on('py-ase@3.18.0:', type=('build', 'run'), when='@19.8.1')
depends_on('py-numpy +blas +lapack', type=('build', 'run'))
depends_on('py-scipy', type=('build', 'run'))
depends_on('libxc')
@@ -33,6 +36,8 @@ class PyGpaw(PythonPackage):
depends_on('fftw~mpi', when='+fftw ~mpi')
depends_on('scalapack', when='+scalapack')
+ patch('libxc.patch', when='@1.3.0')
+
def patch(self):
spec = self.spec
# For build notes see https://wiki.fysik.dtu.dk/gpaw/install.html
@@ -41,8 +46,16 @@ class PyGpaw(PythonPackage):
blas = spec['blas']
lapack = spec['lapack']
+ python_include = spec['python'].headers.directories[0]
+ numpy_include = join_path(
+ spec['py-numpy'].prefix,
+ spec['python'].package.site_packages_dir,
+ 'numpy', 'core', 'include')
+
libs = blas.libs + lapack.libs + libxc.libs
include_dirs = [
+ python_include,
+ numpy_include,
blas.prefix.include,
lapack.prefix.include,
libxc.prefix.include