diff options
author | Robert Cohn <robert.s.cohn@intel.com> | 2024-05-29 17:02:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-29 15:02:28 -0600 |
commit | 1184de8352281ce1b34a8f3f6b54d7fadc2b216a (patch) | |
tree | 9b7caff2122fa3a79a62faf486170791c1e72de4 /var | |
parent | 2470fde5d9248aedf0e40f3f87d6e24cfc577464 (diff) | |
download | spack-1184de8352281ce1b34a8f3f6b54d7fadc2b216a.tar.gz spack-1184de8352281ce1b34a8f3f6b54d7fadc2b216a.tar.bz2 spack-1184de8352281ce1b34a8f3f6b54d7fadc2b216a.tar.xz spack-1184de8352281ce1b34a8f3f6b54d7fadc2b216a.zip |
intel-oneapi-mkl: change logic for gfortran compatibility (#44242)
* [intel-oneapi-mkl]: change logic for gfortran compatibility
* review comments
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
* warn if fortran-rt and gcc are used without gfortran
* remove warning
---------
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py index 5209d10d54..600c83cbfa 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -111,6 +111,8 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): expand=False, ) + variant("gfortran", default=False, description="Compatibility with GNU Fortran") + variant("shared", default=True, description="Builds shared library") variant("ilp64", default=False, description="Build with ILP64 support") variant( @@ -200,10 +202,16 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): if self.spec.satisfies("+cluster"): libs.extend([self._xlp64_lib("libmkl_scalapack"), "libmkl_cdft_core"]) - if self.spec.satisfies("%oneapi") or self.spec.satisfies("%intel"): - libs.append(self._xlp64_lib("libmkl_intel")) - else: + # Explicit variant for compatibility with gfortran, otherwise + # support intel fortran. Be aware that some dependencies may + # be using this logic and other dependencies might be using + # cmake for the library list and they have to be consistent. + # https://github.com/spack/spack/pull/43673 for discussion + if self.spec.satisfies("+gfortran"): + depends_on("fortran", type="build") libs.append(self._xlp64_lib("libmkl_gf")) + else: + libs.append(self._xlp64_lib("libmkl_intel")) if self.spec.satisfies("threads=tbb"): libs.append("libmkl_tbb_thread") |