summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerban Maerean <serban@us.ibm.com>2018-10-10 17:16:50 -0400
committerPeter Scheibel <scheibel1@llnl.gov>2018-10-10 14:16:50 -0700
commit113b750b8973892419975d7e0d2c09ea2a32cc15 (patch)
tree36ca7f2c4fdf01196b797ac837eea99374e219f5
parent013d4ad6a08ca005676ccc5b2138b53371d0fb94 (diff)
downloadspack-113b750b8973892419975d7e0d2c09ea2a32cc15.tar.gz
spack-113b750b8973892419975d7e0d2c09ea2a32cc15.tar.bz2
spack-113b750b8973892419975d7e0d2c09ea2a32cc15.tar.xz
spack-113b750b8973892419975d7e0d2c09ea2a32cc15.zip
Update compile flags for netlib-lapack when building with the XL compiler. (#9318)
We need to use -O3 -qstrict -qnohot. Modified ibm-xl.patch and netlib-lapack package file.
-rw-r--r--var/spack/repos/builtin/packages/netlib-lapack/ibm-xl.patch12
-rw-r--r--var/spack/repos/builtin/packages/netlib-lapack/package.py3
2 files changed, 14 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
index fcb44af5a3..c6fba2a028 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,15 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -62,7 +62,7 @@
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fp-model strict")
+ endif()
+ if("${CMAKE_Fortran_COMPILER}" MATCHES "xlf")
+- set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict=none")
++ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict")
+ endif()
+ # Delete libmtsk in linking sequence for Sun/Oracle Fortran Compiler.
+ # This library is not present in the Sun package SolarisStudio12.3-linux-x86-bin
+
--- a/CMAKE/CheckLAPACKCompilerFlags.cmake
+++ b/CMAKE/CheckLAPACKCompilerFlags.cmake
@@ -43,12 +43,6 @@
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py
index 8c56da718d..7b0cb7cd6c 100644
--- a/var/spack/repos/builtin/packages/netlib-lapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py
@@ -178,7 +178,8 @@ class NetlibLapack(CMakePackage):
# use F77 compiler if IBM XL
args.extend(['-DCMAKE_Fortran_COMPILER=' + self.compiler.f77,
'-DCMAKE_Fortran_FLAGS=' +
- (' '.join(self.spec.compiler_flags['fflags']))])
+ (' '.join(self.spec.compiler_flags['fflags'])) +
+ " -O3 -qnohot"])
# deprecated routines are commonly needed by, for example, suitesparse
# Note that OpenBLAS spack is built with deprecated routines