Skip to content

Commit 6a53273

Browse files
authored
Merge pull request #3866 from Thyre/20250801183103_new_pr_flexiblas
enhance FlexiBLAS easyblock to support NVPL library
2 parents c75e740 + ae21250 commit 6a53273

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

easybuild/easyblocks/f/flexiblas.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
from easybuild.easyblocks.generic.cmakemake import CMakeMake
3333
from easybuild.framework.easyconfig import CUSTOM
34-
from easybuild.tools import toolchain
34+
from easybuild.tools import toolchain, LooseVersion
3535
from easybuild.tools.build_log import EasyBuildError
3636
from easybuild.tools.config import build_option
3737
from easybuild.tools.environment import setvar
@@ -98,6 +98,8 @@ def configure_step(self):
9898
}
9999

100100
supported_blas_libs = ['AOCL-BLAS', 'BLIS', 'NETLIB', 'OpenBLAS', 'imkl']
101+
if LooseVersion(self.version) >= LooseVersion('3.4.5'):
102+
supported_blas_libs += ['NVPL']
101103

102104
# make sure that default backend is a supported library
103105
flexiblas_default = configopts['FLEXIBLAS_DEFAULT']
@@ -123,7 +125,7 @@ def configure_step(self):
123125
if blas_lib == 'imkl':
124126
# For MKL there is gf_lp64 vs. intel_lp64 and gnu_thread vs. intel_thread (vs. sequential)
125127
# For gf_lp64 vs intel_lp64 the difference is in the ABI for [sz]dot[uc], which FlexiBLAS
126-
# can transparenly wrap.
128+
# can transparently wrap.
127129
# gnu_thread vs intel_thread links to libgomp vs. libiomp5 for the OpenMP library.
128130
mkl_gnu_libs = "mkl_gf_lp64;mkl_gnu_thread;mkl_core;gomp;pthread;m;dl"
129131
mkl_intel_libs = "mkl_intel_lp64;mkl_intel_thread;mkl_core;iomp5;pthread;m;dl"
@@ -138,6 +140,11 @@ def configure_step(self):
138140
configopts[key] = mkl_compiler_mapping[comp_family]
139141
except KeyError:
140142
raise EasyBuildError("Compiler family not supported yet: %s", comp_family)
143+
elif blas_lib == "NVPL":
144+
# NVPL libraries do not explicitly link any OpenMP runtime,
145+
# but try to lazily and dynamically find the OpenMP runtime in the
146+
# built program. Supported are libgomp, libomp and libnvomp.
147+
configopts[key] = "nvpl_blas_lp64_gomp;nvpl_blas_core"
141148
elif blas_lib == 'AOCL_mt':
142149
configopts[key] = 'blis-mt'
143150
else:

0 commit comments

Comments
 (0)