cp2k fixes for aocc (#37758)

This commit is contained in:
AMD Toolchain Support 2023-05-31 05:03:00 +05:30 committed by GitHub
parent 8e9efa86c8
commit d30698d9a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -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 @@ def archive_files(self):
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

View File

@ -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>