From d1983d7395ca51e7ef87bd9a79614b2f760cd994 Mon Sep 17 00:00:00 2001 From: yellowhat Date: Wed, 6 May 2020 21:36:29 +0100 Subject: [PATCH] blis: FIX threads option, HPL: enable opemp variant for 2.3 (#16476) * blis: FIX threads option * HPL: openmp variant is ignored for 2.3 * blis: FIX flake8 * blis: FIX spacing * Update var/spack/repos/builtin/packages/hpl/package.py Co-authored-by: Adam J. Stewart * hpl: FIX spec --> self.spec, FIX blas with amdblis * HPL: fix flake8 * HPL: FIX flake8 Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/blis/package.py | 4 +++- var/spack/repos/builtin/packages/hpl/package.py | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/blis/package.py b/var/spack/repos/builtin/packages/blis/package.py index c2fc1545a3..fd06bc455e 100644 --- a/var/spack/repos/builtin/packages/blis/package.py +++ b/var/spack/repos/builtin/packages/blis/package.py @@ -104,7 +104,9 @@ def darwin_fix(self): @property def libs(self): - return find_libraries(['libblis'], root=self.prefix, recursive=True) + return find_libraries( + ["libblis", "libblis-mt"], root=self.prefix, recursive=True + ) class Blis(BlisBase): diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py index 05909653c0..579abe7618 100644 --- a/var/spack/repos/builtin/packages/hpl/package.py +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -101,9 +101,15 @@ def configure(self, spec, prefix): @when('@2.3:') def configure_args(self): - config = [ - 'CFLAGS=-O3' - ] + filter_file( + r"^libs10=.*", "libs10=%s" % self.spec["blas"].libs.ld_flags, + "configure" + ) + + if '+openmp' in self.spec: + config = ['CFLAGS=-O3 ' + self.compiler.openmp_flag] + else: + config = ['CFLAGS=-O3'] if (self.spec.satisfies('^intel-mkl') or self.spec.satisfies('^intel-parallel-studio+mkl')):