summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2019-07-15 13:37:54 -0500
committerPeter Scheibel <scheibel1@llnl.gov>2019-07-15 11:37:54 -0700
commit3f83a2a7d82067dd2e6dacb45572a4948dfda86a (patch)
treea7341d2a773973ebf6d3d1d72d11512428c23d1d /var
parent5acbe449e5840a7592e93d3ba35ff10e45ebc8a0 (diff)
downloadspack-3f83a2a7d82067dd2e6dacb45572a4948dfda86a.tar.gz
spack-3f83a2a7d82067dd2e6dacb45572a4948dfda86a.tar.bz2
spack-3f83a2a7d82067dd2e6dacb45572a4948dfda86a.tar.xz
spack-3f83a2a7d82067dd2e6dacb45572a4948dfda86a.zip
Add auto-dispatch specification to Intel packages (#11697)
This PR adds the ability to specify the auto-dispatch targets that can be used by the Intel compilers. The `-ax` flag will be written to the respective compiler configuration files. This ability is very handy when wanting to build optimized builds for various architectures. This PR does not set any optimization flags, however.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py13
-rw-r--r--var/spack/repos/builtin/packages/intel/package.py13
2 files changed, 26 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
index 73e63d7662..409e642000 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -129,6 +129,13 @@ class IntelParallelStudio(IntelPackage):
multi=False
)
+ auto_dispatch_options = IntelPackage.auto_dispatch_options
+ variant(
+ 'auto_dispatch',
+ values=any_combination_of(*auto_dispatch_options),
+ description='Enable generation of multiple auto-dispatch code paths'
+ )
+
# Components available in all editions
variant('daal', default=True,
description='Install the Intel DAAL libraries')
@@ -186,6 +193,12 @@ class IntelParallelStudio(IntelPackage):
conflicts('+daal', when='@cluster.0:cluster.2015.7')
conflicts('+daal', when='@composer.0:composer.2015.7')
+ # MacOS does not support some of the auto dispatch settings
+ conflicts('auto_dispatch=SSE2', 'platform=darwin',
+ msg='SSE2 is not supported on MacOS')
+ conflicts('auto_dispatch=SSE3', 'platform=darwin target=x86_64',
+ msg='SSE3 is not supported on MacOS x86_64')
+
def setup_dependent_environment(self, *args):
# Handle in callback, conveying client's compilers in additional arg.
# CAUTION - DUP code in:
diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py
index 5f723b010f..a611c09fb7 100644
--- a/var/spack/repos/builtin/packages/intel/package.py
+++ b/var/spack/repos/builtin/packages/intel/package.py
@@ -43,5 +43,18 @@ class Intel(IntelPackage):
variant('rpath', default=True, description='Add rpath to .cfg files')
+ auto_dispatch_options = IntelPackage.auto_dispatch_options
+ variant(
+ 'auto_dispatch',
+ values=any_combination_of(*auto_dispatch_options),
+ description='Enable generation of multiple auto-dispatch code paths'
+ )
+
+ # MacOS does not support some of the auto dispatch settings
+ conflicts('auto_dispatch=SSE2', 'platform=darwin',
+ msg='SSE2 is not supported on MacOS')
+ conflicts('auto_dispatch=SSE3', 'platform=darwin target=x86_64',
+ msg='SSE3 is not supported on MacOS x86_64')
+
# Since the current package is a subset of 'intel-parallel-studio',
# all remaining Spack actions are handled in the package class.