diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch | 16 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/netlib-lapack/package.py | 12 |
2 files changed, 27 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch b/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch new file mode 100644 index 0000000000..c9598a4e7c --- /dev/null +++ b/var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch @@ -0,0 +1,16 @@ +diff -Naur lapack-3.6.1/CMAKE/CheckLAPACKCompilerFlags.cmake lapack-3.6.1-patched/CMAKE/CheckLAPACKCompilerFlags.cmake +--- lapack-3.6.1/CMAKE/CheckLAPACKCompilerFlags.cmake 2017-01-27 17:14:37.414854283 -0500 ++++ lapack-3.6.1-patched/CMAKE/CheckLAPACKCompilerFlags.cmake 2017-01-27 17:14:24.754719546 -0500 +@@ -43,12 +43,6 @@ + if( "${CMAKE_Fortran_FLAGS}" MATCHES "-qflttrap=[a-zA-Z:]:enable" ) + set( FPE_EXIT TRUE ) + endif() +- +- if( NOT ("${CMAKE_Fortran_FLAGS}" MATCHES "-qfixed") ) +- message( STATUS "Enabling fixed format F90/F95 with -qfixed" ) +- set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qfixed" +- CACHE STRING "Flags for Fortran compiler." FORCE ) +- endif() + + # HP Fortran + elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "HP" ) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 4b03259cbd..ee011e7d1b 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -52,6 +52,9 @@ class NetlibLapack(Package): variant('lapacke', default=True, description='Activates the build of the LAPACKE C interface') + patch('ibm-xl.patch', when='@3:6%xl') + patch('ibm-xl.patch', when='@3:6%xl_r') + # virtual dependency provides('blas', when='~external-blas') provides('lapack') @@ -96,7 +99,14 @@ class NetlibLapack(Package): cmake_args.extend(['-DCBLAS=OFF']) cmake_args.extend(['-DLAPACKE:BOOL=OFF']) - # deprecated routines are commonly need by, for example, suitesparse + if self.compiler.name == 'xl' or self.compiler.name == 'xl_r': + # use F77 compiler if IBM XL + cmake_args.extend([ + '-DCMAKE_Fortran_COMPILER=%s' % self.compiler.f77, + '-DCMAKE_Fortran_FLAGS=-qzerosize' + ]) + + # deprecated routines are commonly needed by, for example, suitesparse # Note that OpenBLAS spack is built with deprecated routines cmake_args.extend(['-DBUILD_DEPRECATED:BOOL=ON']) |