Repository: spack/spack

Issue:
intel-parallel-studio@cluster.2018.1 won't install VTune
Summary:
I'm working on moving our software stack to Spack. I've just run into an issue with the intel-parallel-studio@2018.1. intel-parallel-studio@cluster.2018.x won't install VTune. The 2017.5 version did.

### 2017.5 Results

```bash
-bash-4.2$ spack install intel-parallel-studio@cluster.2017.5%gcc@6.4.0 vtune=True
...
-bash-4.2$ ml gcc/6.4.0-vddll intel-parallel-studio/cluster.2017.5-iur77
-bash-4.2$ which amplxe-gui
/projects/holtat/spack/opt/spack/linux-rhel7-x86_64/gcc-6.4.0/intel-parallel-studio-cluster.2017.5-iur77sjgx63uvqttuqweylleguwfqo5x/vtune_amplifier_xe_2017.5.0.526192/bin64/amplxe-gui
-bash-4.2$ amplxe-gui
... VTune loads ... 
```

### 2018.1 Result (same for 2018.0):

```bash
-bash-4.2$ spack install intel-parallel-studio@cluster.2018.1%gcc@6.4.0 vtune=True
...
-bash-4.2$  ml gcc/6.4.0-vddll intel-parallel-studio/cluster.2018.1-sote7
-bash-4.2$ which amplxe-gui
/usr/bin/which: no amplxe-gui in (...)
-bash-4.2$ amplxe-gui
-bash: amplxe-gui: command not found
```
The 2018.1 VTune directory is empty (except a license dir).
```bash
#2018.1
-bash-4.2$ ls /projects/holtat/spack/opt/spack/linux-rhel7-x86_64/gcc-6.4.0/intel-parallel-studio-cluster.2018.1-sote7uaqerhukq5v5buj4oobat7n4mt7/vtune_amplifier_xe
licenses
#2017.5
-bash-4.2$ ls /projects/holtat/spack/opt/spack/linux-rhel7-x86_64/gcc-6.4.0/intel-parallel-studio-cluster.2017.5-iur77sjgx63uvqttuqweylleguwfqo5x/vtune_amplifier_xe_2017.5.0.526192
amplxe-2017.5.0.526192  amplxe-vars.sh  backend  bin64   contrib        frontend  lib32  licenses  message    resource  sdk          sep_vars_busybox.sh  storage_snapshot  target     uninstall.sh
amplxe-vars.csh         apsvars.sh      bin32    config  documentation  include   lib64  man       mic_sepdk  samples   sep_vars.sh  sepdk                support.txt       uninstall  uninstall_GUI.sh
```


### System Info

 1. RHEL 7.3 Haswell nodes.
 2. I'm on the develop branch, last commit 257d23581cda1b136912dbcfe3c8cee2ba635aab
 3. modules.yaml
```modules:
  enable::
    - lmod
  lmod:
    core_compilers:
      - 'gcc@4.8.5'
    hierarchy:
      - mpi
    hash_length: 5
    whitelist:
      - gcc
      - intel-parallel-studio
    blacklist:
      - '%gcc@4.8.5'
    intel-parallel-studio:
      environment:
        set:
          CC: icc
          CXX: icpc
          FC: ifort
          F90: ifort
          F77: ifort
```


Discussion:
@lee218llnl 
oh how fun, Intel changed the component name dropping the "-xe". I will work on a PR. Stay tuned...

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -341,7 +341,7 @@ def components(self):
 
         # Intel(R) VTune(TM) Amplifier XE
         if '+vtune' in spec:
-            components.append('intel-vtune-amplifier-xe')
+            components.append('intel-vtune-amplifier')
 
         return components
 
@@ -397,6 +397,9 @@ def license_files(self):
         if '+vtune' in spec:
             vtune_dir = 'vtune_amplifier_xe/licenses'
 
+            if year >= 2018:
+                vtune_dir = 'vtune_amplifier/licenses'
+
             directories.append(vtune_dir)
 
         return [os.path.join(dir, 'license.lic') for dir in directories]


Test patch: