diff options
author | Barry Smith <bsmith@mcs.anl.gov> | 2016-10-25 13:12:22 -0500 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-10-25 11:12:22 -0700 |
commit | 3de26ff3d7aebc8a2529d58ee9a3fa1c0f6cde3a (patch) | |
tree | f3735fa3d9dde10b18202e32e816bc87ae7adc13 /var | |
parent | 14e3a541e1eb24d4ac225e37f9df2ed28b3b9046 (diff) | |
download | spack-3de26ff3d7aebc8a2529d58ee9a3fa1c0f6cde3a.tar.gz spack-3de26ff3d7aebc8a2529d58ee9a3fa1c0f6cde3a.tar.bz2 spack-3de26ff3d7aebc8a2529d58ee9a3fa1c0f6cde3a.tar.xz spack-3de26ff3d7aebc8a2529d58ee9a3fa1c0f6cde3a.zip |
openblas: Fixes to get OpenBLAS to install with Intel compilers (#2101)
Funded-by: IDEAS
Project: IDEAS/xSDK
Time: 1 hour
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/openblas_icc.patch | 253 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 5 |
2 files changed, 258 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/openblas_icc.patch b/var/spack/repos/builtin/packages/openblas/openblas_icc.patch new file mode 100644 index 0000000000..fb379aea41 --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/openblas_icc.patch @@ -0,0 +1,253 @@ +diff --git a/kernel/x86_64/cscal_microk_bulldozer-2.c b/kernel/x86_64/cscal_microk_bulldozer-2.c +index f470cf8..3abffc4 100644 +--- a/kernel/x86_64/cscal_microk_bulldozer-2.c ++++ b/kernel/x86_64/cscal_microk_bulldozer-2.c +@@ -120,7 +120,7 @@ static void cscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -212,7 +212,7 @@ static void cscal_kernel_16_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -289,7 +289,7 @@ static void cscal_kernel_16_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -334,7 +334,7 @@ static void cscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +diff --git a/kernel/x86_64/cscal_microk_haswell-2.c b/kernel/x86_64/cscal_microk_haswell-2.c +index 0424de3..48e3395 100644 +--- a/kernel/x86_64/cscal_microk_haswell-2.c ++++ b/kernel/x86_64/cscal_microk_haswell-2.c +@@ -120,7 +120,7 @@ static void cscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "0", "1", ++ : "cc", //"0", "1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -212,7 +212,7 @@ static void cscal_kernel_16_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "0", "1", ++ : "cc", // "0", "1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -289,7 +289,7 @@ static void cscal_kernel_16_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -334,7 +334,7 @@ static void cscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "0", "1", ++ : "cc", //"0", "1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +diff --git a/kernel/x86_64/cscal_microk_steamroller-2.c b/kernel/x86_64/cscal_microk_steamroller-2.c +index 763e7ad..8346e17 100644 +--- a/kernel/x86_64/cscal_microk_steamroller-2.c ++++ b/kernel/x86_64/cscal_microk_steamroller-2.c +@@ -121,7 +121,7 @@ static void cscal_kernel_16( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "0", "1", ++ : "cc", //"0", "1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -213,7 +213,7 @@ static void cscal_kernel_16_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "0", "1", ++ : "cc", //"0", "1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -290,7 +290,7 @@ static void cscal_kernel_16_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -335,7 +335,7 @@ static void cscal_kernel_16_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "0", "1", ++ : "cc", //"0", "1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +diff --git a/kernel/x86_64/dscal.c b/kernel/x86_64/dscal.c +index bbc1c96..b6bde6c 100644 +--- a/kernel/x86_64/dscal.c ++++ b/kernel/x86_64/dscal.c +@@ -141,7 +141,7 @@ static void dscal_kernel_inc_8(BLASLONG n, FLOAT *alpha, FLOAT *x, BLASLONG inc_ + "r" (alpha), // 3 + "r" (inc_x), // 4 + "r" (inc_x3) // 5 +- : "cc", "%0", "%1", "%2", ++ : "cc", //"%0", "%1", "%2", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +diff --git a/kernel/x86_64/zscal_microk_bulldozer-2.c b/kernel/x86_64/zscal_microk_bulldozer-2.c +index 28fe734..03882d6 100644 +--- a/kernel/x86_64/zscal_microk_bulldozer-2.c ++++ b/kernel/x86_64/zscal_microk_bulldozer-2.c +@@ -120,7 +120,7 @@ static void zscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -212,7 +212,7 @@ static void zscal_kernel_8_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -289,7 +289,7 @@ static void zscal_kernel_8_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -334,7 +334,7 @@ static void zscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +diff --git a/kernel/x86_64/zscal_microk_haswell-2.c b/kernel/x86_64/zscal_microk_haswell-2.c +index a93308e..b1a34c1 100644 +--- a/kernel/x86_64/zscal_microk_haswell-2.c ++++ b/kernel/x86_64/zscal_microk_haswell-2.c +@@ -120,7 +120,7 @@ static void zscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -212,7 +212,7 @@ static void zscal_kernel_8_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -289,7 +289,7 @@ static void zscal_kernel_8_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -334,7 +334,7 @@ static void zscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +diff --git a/kernel/x86_64/zscal_microk_steamroller-2.c b/kernel/x86_64/zscal_microk_steamroller-2.c +index d611bf5..97b07ad 100644 +--- a/kernel/x86_64/zscal_microk_steamroller-2.c ++++ b/kernel/x86_64/zscal_microk_steamroller-2.c +@@ -121,7 +121,7 @@ static void zscal_kernel_8( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -213,7 +213,7 @@ static void zscal_kernel_8_zero_r( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -290,7 +290,7 @@ static void zscal_kernel_8_zero_i( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", +@@ -335,7 +335,7 @@ static void zscal_kernel_8_zero( BLASLONG n, FLOAT *alpha, FLOAT *x) + "r" (n), // 0 + "r" (x), // 1 + "r" (alpha) // 2 +- : "cc", "%0", "%1", ++ : "cc", //"%0", "%1", + "%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7", + "%xmm8", "%xmm9", "%xmm10", "%xmm11", diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 1f6dd0e013..efdbc1d8b2 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -50,6 +50,9 @@ class Openblas(Package): provides('lapack') patch('make.patch') + # This patch is in a pull request to OpenBLAS that has not been handled + # https://github.com/xianyi/OpenBLAS/pull/915 + patch('openblas_icc.patch', when='%intel') @property def blas_libs(self): @@ -124,6 +127,8 @@ class Openblas(Package): include_flags = ["-I%s" % join_path(spec.prefix, "include")] link_flags = self.lapack_libs.ld_flags.split() + if self.compiler.name == 'intel': + link_flags.extend(["-lifcore"]) link_flags.extend(["-lpthread"]) if '+openmp' in spec: link_flags.extend([self.compiler.openmp_flag]) |