summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/atlas/package.py
diff options
context:
space:
mode:
authorDavid Hows <howsdav@gmail.com>2018-12-18 12:12:00 +1100
committerAdam J. Stewart <ajstewart426@gmail.com>2018-12-17 19:12:00 -0600
commitc70ea22c6fabfe3372d502425167a3bc771b5aaa (patch)
tree83ecd4c8b0146b50dabc3d0bcf771383198de12e /var/spack/repos/builtin/packages/atlas/package.py
parent09d2df690a89d8d1ceb865fe313a86c229396892 (diff)
downloadspack-c70ea22c6fabfe3372d502425167a3bc771b5aaa.tar.gz
spack-c70ea22c6fabfe3372d502425167a3bc771b5aaa.tar.bz2
spack-c70ea22c6fabfe3372d502425167a3bc771b5aaa.tar.xz
spack-c70ea22c6fabfe3372d502425167a3bc771b5aaa.zip
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
Diffstat (limited to 'var/spack/repos/builtin/packages/atlas/package.py')
-rw-r--r--var/spack/repos/builtin/packages/atlas/package.py11
1 files changed, 11 insertions, 0 deletions
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,