From c70ea22c6fabfe3372d502425167a3bc771b5aaa Mon Sep 17 00:00:00 2001 From: David Hows Date: Tue, 18 Dec 2018 12:12:00 +1100 Subject: 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 --- var/spack/repos/builtin/packages/atlas/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index 0f624ae839..9cc5328fc2 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -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 @@ class Atlas(Package): '-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, -- cgit v1.2.3-60-g2f50