diff options
author | AMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com> | 2023-05-31 05:03:00 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 16:33:00 -0700 |
commit | d30698d9a8c7143d749f6b137d95265d4cdbd7d7 (patch) | |
tree | 3c6b0ec6f221dee550886d7106880de54f6d46fe /var/spack/repos/builtin/packages/cp2k | |
parent | 8e9efa86c8c14c1c9172d3dd85a6dca7ec5b8883 (diff) | |
download | spack-d30698d9a8c7143d749f6b137d95265d4cdbd7d7.tar.gz spack-d30698d9a8c7143d749f6b137d95265d4cdbd7d7.tar.bz2 spack-d30698d9a8c7143d749f6b137d95265d4cdbd7d7.tar.xz spack-d30698d9a8c7143d749f6b137d95265d4cdbd7d7.zip |
cp2k fixes for aocc (#37758)
Diffstat (limited to 'var/spack/repos/builtin/packages/cp2k')
-rw-r--r-- | var/spack/repos/builtin/packages/cp2k/package.py | 5 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/cp2k/posix_c_source.patch | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 84b88ddc50..ee969b64bc 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -58,7 +58,7 @@ class Cp2k(MakefilePackage, CudaPackage): "elpa", default=False, description="Enable optimised diagonalisation routines from ELPA", - when="@8.3:", + when="@6.1:", ) variant( "sirius", @@ -246,6 +246,7 @@ class Cp2k(MakefilePackage, CudaPackage): sha256="3617abb877812c4b933f601438c70f95e21c6161bea177277b1d4125fd1c0bf9", when="@8.2", ) + patch("posix_c_source.patch", when="%aocc") def url_for_version(self, version): url = "https://github.com/cp2k/cp2k/releases/download/v{0}/cp2k-{0}.tar.bz2" @@ -274,7 +275,7 @@ class Cp2k(MakefilePackage, CudaPackage): def edit(self, spec, prefix): pkgconf = which("pkg-config") - fftw = spec["fftw-api"] + fftw = spec["fftw-api:openmp" if "+openmp" in spec else "fftw-api"] fftw_header_dir = fftw.headers.directories[0] # some providers (mainly Intel) keep the fftw headers in a subdirectory, find it diff --git a/var/spack/repos/builtin/packages/cp2k/posix_c_source.patch b/var/spack/repos/builtin/packages/cp2k/posix_c_source.patch new file mode 100644 index 0000000000..87a544a77d --- /dev/null +++ b/var/spack/repos/builtin/packages/cp2k/posix_c_source.patch @@ -0,0 +1,12 @@ +--- a/src/sockets.c 2019-12-24 01:41:57.000000000 +0530 ++++ b/src/sockets.c 2023-05-15 18:35:33.941236292 +0530 +@@ -35,6 +35,7 @@ + */ + #ifndef __NO_IPI_DRIVER + ++#define _POSIX_C_SOURCE 200112L + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> + + |