diff options
author | nkgh77 <84457720+nkgh77@users.noreply.github.com> | 2023-03-13 10:06:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 10:06:42 +0100 |
commit | ee1ea1f43046a54d9c1b06901f9de4aa1b6c3ee8 (patch) | |
tree | 1270e9f0b733ec87e7d94de2dfdd8e0c42f71eed /var | |
parent | ff019f868bc1043dcc09399a2ccae54a39cc47ec (diff) | |
download | spack-ee1ea1f43046a54d9c1b06901f9de4aa1b6c3ee8.tar.gz spack-ee1ea1f43046a54d9c1b06901f9de4aa1b6c3ee8.tar.bz2 spack-ee1ea1f43046a54d9c1b06901f9de4aa1b6c3ee8.tar.xz spack-ee1ea1f43046a54d9c1b06901f9de4aa1b6c3ee8.zip |
octave: better specification of MKL and AMDFFTW libraries (#35935)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/octave/package.py | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 617789e1dc..cce79f56db 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -223,14 +223,42 @@ class Octave(AutotoolsPackage, GNUMirrorPackage): if "+fftw" in spec: fftw_string = "fftw-api" - config_args.extend( - [ - "--with-fftw3-includedir=%s" % spec[fftw_string].prefix.include, - "--with-fftw3-libdir=%s" % spec[fftw_string].prefix.lib, - "--with-fftw3f-includedir=%s" % spec[fftw_string].prefix.include, - "--with-fftw3f-libdir=%s" % spec[fftw_string].prefix.lib, - ] - ) + if ("^intel-mkl" in spec) or ("^intel-oneapi-mkl" in spec): + config_args.extend( + [ + "--with-fftw3={0}".format(spec[fftw_string].libs.ld_flags), + "--with-fftw3f={0}".format(spec[fftw_string].libs.ld_flags), + ] + ) + elif "^amdfftw" in spec: + specAmdfftw = spec[fftw_string].token[0] + AMD_FFTW3_LIBS = "-lfftw3" + AMD_FFTW3F_LIBS = "-lfftw3f" + if "+openmp" in specAmdfftw: + AMD_FFTW3_LIBS += " -lfftw3_omp" + AMD_FFTW3F_LIBS += " -lfftw3f_omp" + if "+threads" in specAmdfftw: + AMD_FFTW3_LIBS += " -lfftw3_threads" + AMD_FFTW3F_LIBS += " -lfftw3f_threads" + config_args.extend( + [ + "--with-fftw3=-L{0} {1}".format( + spec[fftw_string].libs.directories[0], AMD_FFTW3_LIBS + ), + "--with-fftw3f=-L{0} {1}".format( + spec[fftw_string].libs.directories[0], AMD_FFTW3F_LIBS + ), + ] + ) + else: + config_args.extend( + [ + "--with-fftw3-includedir=%s" % spec[fftw_string].prefix.include, + "--with-fftw3-libdir=%s" % spec[fftw_string].prefix.lib, + "--with-fftw3f-includedir=%s" % spec[fftw_string].prefix.include, + "--with-fftw3f-libdir=%s" % spec[fftw_string].prefix.lib, + ] + ) else: config_args.extend(["--without-fftw3", "--without-fftw3f"]) |