diff options
author | Wouter Deconinck <wdconinc@gmail.com> | 2024-08-02 13:19:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-02 12:19:06 -0600 |
commit | a2cbc46dbc1a7ba3799d44c04c57060e80cd2180 (patch) | |
tree | 9b6985ef9d944d6ddf1113d1f2a573841a302631 | |
parent | 8538b0c01dd2c29bbb7d5ca6db59bbc549c4c20d (diff) | |
download | spack-a2cbc46dbc1a7ba3799d44c04c57060e80cd2180.tar.gz spack-a2cbc46dbc1a7ba3799d44c04c57060e80cd2180.tar.bz2 spack-a2cbc46dbc1a7ba3799d44c04c57060e80cd2180.tar.xz spack-a2cbc46dbc1a7ba3799d44c04c57060e80cd2180.zip |
openblas: fix AttributeError when threads=openmp (#45338)
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 74961d16aa..ae9f2e6070 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -570,17 +570,19 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder): # Openblas may pass its own test but still fail to compile Lapack # symbols. To make sure we get working Blas and Lapack, do a small # test. - source_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.c") - blessed_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.output") + source_file = join_path(os.path.dirname(self.pkg.module.__file__), "test_cblas_dgemm.c") + blessed_file = join_path( + os.path.dirname(self.pkg.module.__file__), "test_cblas_dgemm.output" + ) include_flags = spec["openblas"].headers.cpp_flags link_flags = spec["openblas"].libs.ld_flags - if self.compiler.name == "intel": + if self.pkg.compiler.name == "intel": link_flags += " -lifcore" if self.spec.satisfies("threads=pthreads"): link_flags += " -lpthread" if spec.satisfies("threads=openmp"): - link_flags += " -lpthread " + self.compiler.openmp_flag + link_flags += " -lpthread " + self.pkg.compiler.openmp_flag output = compile_c_and_execute(source_file, [include_flags], link_flags.split()) compare_output_file(output, blessed_file) |