CP2K: fix multiple use of spec["fftw"] (#42724)
fftw object was originally created with spec["fftw:openmp"], but referencing spec["fftw"] overwrites the 'last_query' in the spec object, so later use of fftw.libs was not returing FFTW OpenMP libs. Also allow the post-install fixup to support amdfftw as well as fftw. Co-authored-by: Branden Moore <branden.moore@amd.com> Co-authored-by: Phil Tooley <phil.tooley@amd.com> Co-authored-by: Greg Becker <becker33@llnl.gov>
This commit is contained in:
parent
baa203f115
commit
c6faab10aa
1 changed files with 3 additions and 2 deletions
|
@ -384,7 +384,7 @@ def edit(self, pkg, spec, prefix):
|
|||
}
|
||||
|
||||
dflags = ["-DNDEBUG"] if spec.satisfies("@:2023.2") else []
|
||||
if spec["fftw-api"].name in ("intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"):
|
||||
if fftw.name in ("intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"):
|
||||
cppflags = ["-D__FFTW3_MKL", "-I{0}".format(fftw_header_dir)]
|
||||
else:
|
||||
cppflags = ["-D__FFTW3", "-I{0}".format(fftw_header_dir)]
|
||||
|
@ -888,7 +888,8 @@ def fix_package_config(self):
|
|||
content += " " + self.spec["lapack"].libs.ld_flags
|
||||
content += " " + self.spec["fftw-api"].libs.ld_flags
|
||||
|
||||
if (self.spec["fftw-api"].name == "fftw") and ("+openmp" in self.spec["fftw"]):
|
||||
fftw = self.spec["fftw-api"]
|
||||
if fftw.name in ["fftw", "amdfftw"] and fftw.satisfies("+openmp"):
|
||||
content += " -lfftw3_omp"
|
||||
|
||||
content += "\n"
|
||||
|
|
Loading…
Reference in a new issue