Intel packages: add support for LLVM OpenMP (#26517)

This commit is contained in:
Piotr Luszczek 2021-11-22 16:41:43 -05:00 committed by GitHub
parent abec10fcd5
commit e90d5ad6cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -690,6 +690,12 @@ def openmp_libs(self):
'--print-file-name', 'libgomp.%s' % dso_suffix, output=str) '--print-file-name', 'libgomp.%s' % dso_suffix, output=str)
omp_libs = LibraryList(omp_lib_path.strip()) omp_libs = LibraryList(omp_lib_path.strip())
elif '%clang' in self.spec:
clang = Executable(self.compiler.cc)
omp_lib_path = clang(
'--print-file-name', 'libomp.%s' % dso_suffix, output=str)
omp_libs = LibraryList(omp_lib_path.strip())
if len(omp_libs) < 1: if len(omp_libs) < 1:
raise_lib_error('Cannot locate OpenMP libraries:', omp_libnames) raise_lib_error('Cannot locate OpenMP libraries:', omp_libnames)
@ -772,7 +778,7 @@ def blas_libs(self):
if self.spec.satisfies('threads=openmp'): if self.spec.satisfies('threads=openmp'):
if '%intel' in self.spec: if '%intel' in self.spec:
mkl_threading = 'libmkl_intel_thread' mkl_threading = 'libmkl_intel_thread'
elif '%gcc' in self.spec: elif '%gcc' in self.spec or '%clang' in self.spec:
mkl_threading = 'libmkl_gnu_thread' mkl_threading = 'libmkl_gnu_thread'
threading_engine_libs = self.openmp_libs threading_engine_libs = self.openmp_libs
elif self.spec.satisfies('threads=tbb'): elif self.spec.satisfies('threads=tbb'):