Add thread count variant to atlas (#9999)
* Add thread count variant Atlas automatically configures itself and optimizes to run with a fixed number of threads. This can be overridden during compile by setting a flag and atlas will tune itself to use the specified number, rather than all system CPUs. Default value is the existing logic, autoconfigure. * Fix Linting * Another lint for longline
This commit is contained in:
parent
09d2df690a
commit
c70ea22c6f
@ -46,6 +46,12 @@ class Atlas(Package):
|
||||
multi=False
|
||||
)
|
||||
|
||||
variant('tune_cpu', default=-1,
|
||||
multi=False,
|
||||
description="Number of threads to tune to,\
|
||||
-1 for autodetect, 0 for no threading"
|
||||
)
|
||||
|
||||
provides('blas')
|
||||
provides('lapack')
|
||||
|
||||
@ -77,6 +83,11 @@ def install(self, spec, prefix):
|
||||
'-b', '64'
|
||||
])
|
||||
|
||||
# set number of cpu's to tune to
|
||||
options.extend([
|
||||
'-t', spec.variants['tune_cpu'].value
|
||||
])
|
||||
|
||||
# set compilers:
|
||||
options.extend([
|
||||
'-C', 'ic', spack_cc,
|
||||
|
Loading…
Reference in New Issue
Block a user