cp2k fixes for aocc (#37758)
This commit is contained in:
parent
8e9efa86c8
commit
d30698d9a8
@ -58,7 +58,7 @@ class Cp2k(MakefilePackage, CudaPackage):
|
|||||||
"elpa",
|
"elpa",
|
||||||
default=False,
|
default=False,
|
||||||
description="Enable optimised diagonalisation routines from ELPA",
|
description="Enable optimised diagonalisation routines from ELPA",
|
||||||
when="@8.3:",
|
when="@6.1:",
|
||||||
)
|
)
|
||||||
variant(
|
variant(
|
||||||
"sirius",
|
"sirius",
|
||||||
@ -246,6 +246,7 @@ class Cp2k(MakefilePackage, CudaPackage):
|
|||||||
sha256="3617abb877812c4b933f601438c70f95e21c6161bea177277b1d4125fd1c0bf9",
|
sha256="3617abb877812c4b933f601438c70f95e21c6161bea177277b1d4125fd1c0bf9",
|
||||||
when="@8.2",
|
when="@8.2",
|
||||||
)
|
)
|
||||||
|
patch("posix_c_source.patch", when="%aocc")
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
url = "https://github.com/cp2k/cp2k/releases/download/v{0}/cp2k-{0}.tar.bz2"
|
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):
|
def edit(self, spec, prefix):
|
||||||
pkgconf = which("pkg-config")
|
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]
|
fftw_header_dir = fftw.headers.directories[0]
|
||||||
|
|
||||||
# some providers (mainly Intel) keep the fftw headers in a subdirectory, find it
|
# some providers (mainly Intel) keep the fftw headers in a subdirectory, find it
|
||||||
|
12
var/spack/repos/builtin/packages/cp2k/posix_c_source.patch
Normal file
12
var/spack/repos/builtin/packages/cp2k/posix_c_source.patch
Normal 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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user