diff --git a/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl-3.9.1.patch b/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl-3.9.1.patch index 38f4e9c41f..c9e1707857 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl-3.9.1.patch +++ b/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl-3.9.1.patch @@ -1,3 +1,17 @@ +Fixes for IBM XL and Cray CCE builds: + +* Correct path to the fallback configuration used to handle mangling for + C++/Fortran compatibility (CCE, XL) + +* Change logic for detecting recursive fortran flags to (a) Include XL +(qrecur), and (b) Be explicit, since not every compiler will correctly reject +an incorrect option (ALL) + +NOTE: This patch has been accepted upstream +(see https://github.com/Reference-LAPACK/lapack/pull/621) + +############################################################################## + diff -Naur a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt --- a/CBLAS/CMakeLists.txt 2021-03-25 12:25:15.000000000 -0600 +++ b/CBLAS/CMakeLists.txt 2021-09-01 16:27:23.561355382 -0600 diff --git a/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch b/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch index c6fba2a028..52b5f19719 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch +++ b/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch @@ -1,3 +1,14 @@ +Fixes for IBM XL and Cray CCE builds: + +* Avoid optimizations that would alter program semantics by changing the + qstrict activation threshold from O3 to O2 (XL) + +* Don't assume Fortran code is all in fixed source form; disable qfixed (XL) + +* Correct path to the fallback configuration used to handle mangling for + C++/Fortran compatibility (CCE, XL) +############################################################################## + --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 4a7dfff325..bd1baaddef 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -42,12 +42,21 @@ class NetlibLapack(CMakePackage): variant('xblas', default=False, description='Builds extended precision routines using XBLAS') + # Fixes for IBM XL and Cray CCE builds: + # Avoid optimizations that alter program semantics + # Don't assume fixed source form for Fortran + # Correct path to mangling config patch('ibm-xl.patch', when='@3.7:3.8 %xl') patch('ibm-xl.patch', when='@3.7:3.8 %xl_r') - patch('ibm-xl.patch', when='@3.7: %cce@9:') + patch('ibm-xl.patch', when='@3.7:3.8 %cce@9:') + # https://github.com/Reference-LAPACK/lapack/pull/621 + # Fixes for IBM XL and Cray CCE builds: + # Correct path to mangling config + # Fix logic for detecting recursive Fortran flags patch('ibm-xl-3.9.1.patch', when='@3.9.1 %xl') patch('ibm-xl-3.9.1.patch', when='@3.9.1 %xl_r') + patch('ibm-xl-3.9.1.patch', when='@3.9.1 %cce@13:') # https://github.com/Reference-LAPACK/lapack/issues/228 patch('undefined_declarations.patch', when='@3.8.0:3.8')