suite-sparse: fix issues with tbb (#28054)
* suite-sparse: Fix check for +/- tbb variant Changed 'tbb' in spec to '+tbb' in spec The former would configure suite-sparse to use tbb if any dependency package (e.g. intel-oneapi-mkl) depends on tbb, even if suite-sparse~tbb was specified. * suite-sparse: conflict when trying to use 2021.x versions of tbb See https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/72 suite-sparse depends on task_schedule_init to control the number of threads when e.g. interfacing with MATLAB. However, Intel dropped task_schedule_init in the 2021.x releases of TBB (it has been deprecated since TBB 4.3.5). We just raise a spack conflict when using tbb @2021.x and +tbb Because tbb is a virtual package and is not versioned, I have instead checked for either intel-oneapi-tbb@2021: or intel-tbb@2021:, not the most elegant but should do the job * suite-sparse: fix style issues
This commit is contained in:
parent
6313d84d38
commit
c3a929fdfc
1 changed files with 13 additions and 1 deletions
|
@ -70,6 +70,18 @@ class SuiteSparse(Package):
|
||||||
|
|
||||||
conflicts('%gcc@:4.8', when='@5.2.0:', msg='gcc version must be at least 4.9 for suite-sparse@5.2.0:')
|
conflicts('%gcc@:4.8', when='@5.2.0:', msg='gcc version must be at least 4.9 for suite-sparse@5.2.0:')
|
||||||
|
|
||||||
|
# The @2021.x versions of tbb dropped the task_scheduler_init.h header and
|
||||||
|
# related stuff (which have long been deprecated). This appears to be
|
||||||
|
# rather problematic for suite-sparse (see e.g.
|
||||||
|
# https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/master/SPQR/Source/spqr_parallel.cpp)
|
||||||
|
# Have Spack complain if +tbb and trying to use a 2021.x version of tbb
|
||||||
|
conflicts('+tbb', when='^intel-oneapi-tbb@2021:',
|
||||||
|
msg='suite-sparse needs task_scheduler_init.h dropped in '
|
||||||
|
'recent tbb libs')
|
||||||
|
conflicts('+tbb', when='^intel-tbb@2021:',
|
||||||
|
msg='suite-sparse needs task_scheduler_init.h dropped in '
|
||||||
|
'recent tbb libs')
|
||||||
|
|
||||||
def symbol_suffix_blas(self, spec, args):
|
def symbol_suffix_blas(self, spec, args):
|
||||||
"""When using BLAS with a special symbol suffix we use defines to
|
"""When using BLAS with a special symbol suffix we use defines to
|
||||||
replace blas symbols, e.g. dgemm_ becomes dgemm_64_ when
|
replace blas symbols, e.g. dgemm_ becomes dgemm_64_ when
|
||||||
|
@ -165,7 +177,7 @@ def install(self, spec, prefix):
|
||||||
make_args += ['CFLAGS+=-DBLAS_NO_UNDERSCORE']
|
make_args += ['CFLAGS+=-DBLAS_NO_UNDERSCORE']
|
||||||
|
|
||||||
# Intel TBB in SuiteSparseQR
|
# Intel TBB in SuiteSparseQR
|
||||||
if 'tbb' in spec:
|
if '+tbb' in spec:
|
||||||
make_args += [
|
make_args += [
|
||||||
'SPQR_CONFIG=-DHAVE_TBB',
|
'SPQR_CONFIG=-DHAVE_TBB',
|
||||||
'TBB=%s' % spec['tbb'].libs.ld_flags,
|
'TBB=%s' % spec['tbb'].libs.ld_flags,
|
||||||
|
|
Loading…
Reference in a new issue