Repository: spack/spack

Issue:
Installation issue: intel-mpi
```console
$ git clone https://github.com/spack/spack.git

$ cat > spack/etc/spack/defaults/compilers.yaml <<EOF
compilers:
- compiler:
    spec: gcc@9.3.0
    target: x86_64
    operating_system: centos7
    environment: {}
    extra_rpaths: []
    flags: {}
    modules: []
    paths:
      cc:  /apps/gcc-9.3.0/bin/gcc
      cxx: /apps/gcc-9.3.0/bin/g++
      f77: /apps/gcc-9.3.0/bin/gfortran
      fc:  /apps/gcc-9.3.0/bin/gfortran
EOF

$ cat >> spack/etc/spack/defaults/packages.yaml <<EOF

  openmpi:
    paths:
      openmpi @4.0.3 %gcc@9.3.0: /usr/mpi/gcc/openmpi-4.0.3rc4/
    buildable: False
EOF

$ TMPDIR=/dev/shm spack -d install intel-mpi
==> [2020-07-03-13:37:36.099079, 6394] Imported install from built-in commands
==> [2020-07-03-13:37:36.101744, 6394] Reading config file /apps/spack/etc/spack/defaults/config.yaml
==> [2020-07-03-13:37:36.131232, 6394] Imported install from built-in commands
==> [2020-07-03-13:37:36.135654, 6394] Reading config file /apps/spack/etc/spack/defaults/repos.yaml
==> [2020-07-03-13:37:38.890414, 6394] Reading config file /apps/spack/etc/spack/defaults/packages.yaml
==> [2020-07-03-13:37:38.930520, 6394] Reading config file /apps/spack/etc/spack/defaults/compilers.yaml
==> [2020-07-03-13:37:38.987470, 6394] DATABASE LOCK TIMEOUT: 3s
==> [2020-07-03-13:37:38.987572, 6394] PACKAGE LOCK TIMEOUT: No timeout
==> [2020-07-03-13:37:38.988066, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:38.993313, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:38.997189, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:38.997151]
==> [2020-07-03-13:37:38.997935, 6394] WRITE LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:38.998004, 6394] write locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:38.999900, 6394] WRITE LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:38.999868]
==> [2020-07-03-13:37:39.026345, 6394] WRITE LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.026439, 6394] write locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.030964, 6394] WRITE LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.030928]
==> [2020-07-03-13:37:39.047240, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.049446, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.049415]
==> [2020-07-03-13:37:39.053387, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.055709, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.059191, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.059158]
==> [2020-07-03-13:37:39.059913, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.062580, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.062551]
==> [2020-07-03-13:37:39.062645, 6394] Initializing the build queue for intel-mpi
==> [2020-07-03-13:37:39.063512, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Acquiring]
==> [2020-07-03-13:37:39.067173, 6394] read locking [3642785708049608380:1]: timeout None sec
==> [2020-07-03-13:37:39.069702, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Acquired at 13:37:39.069670]
==> [2020-07-03-13:37:39.069782, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Releasing]
==> [2020-07-03-13:37:39.071190, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Released at 13:37:39.071161]
==> [2020-07-03-13:37:39.071271, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.072533, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.074059, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.074027]
==> [2020-07-03-13:37:39.074561, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.075424, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.075395]
==> [2020-07-03-13:37:39.075511, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.076826, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.079288, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.079257]
==> [2020-07-03-13:37:39.079755, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.082560, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.082531]
==> [2020-07-03-13:37:39.092608, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Acquiring]
==> [2020-07-03-13:37:39.094405, 6394] read locking [3642785708049608380:1]: timeout None sec
==> [2020-07-03-13:37:39.095409, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Acquired at 13:37:39.095372]
==> [2020-07-03-13:37:39.095476, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Releasing]
==> [2020-07-03-13:37:39.099343, 6394] READ LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Released at 13:37:39.099313]
==> [2020-07-03-13:37:39.099450, 6394] Acquiring a write lock on intel-mpi with timeout 1e-09
==> [2020-07-03-13:37:39.099900, 6394] WRITE LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_lock[3642785708049608380:1] [Acquiring]
==> [2020-07-03-13:37:39.110035, 6394] write locking [3642785708049608380:1]: timeout 1e-09 sec
==> [2020-07-03-13:37:39.111650, 6394] WRITE LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_lock[3642785708049608380:1] [Acquired at 13:37:39.111618]
==> [2020-07-03-13:37:39.111789, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.113330, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.115886, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.115854]
==> [2020-07-03-13:37:39.116317, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.119456, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.119427]
==> [2020-07-03-13:37:39.119531, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.120768, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.123909, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.123877]
==> [2020-07-03-13:37:39.124352, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.127431, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.127402]
==> [2020-07-03-13:37:39.131930, 6394] Creating stage lock spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez
==> [2020-07-03-13:37:39.132403, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.133768, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.135485, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.135452]
==> [2020-07-03-13:37:39.135986, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.139695, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.139666]
==> [2020-07-03-13:37:39.140021, 6394] 6394: Installing intel-mpi
==> [2020-07-03-13:37:39.140082, 6394] Searching for binary cache of intel-mpi
==> [2020-07-03-13:37:39.141298, 6394] No Spack mirrors are currently configured
==> [2020-07-03-13:37:39.141873, 6394] No binary for intel-mpi found: installing from source
==> [2020-07-03-13:37:39.142000, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:37:39.143262, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:37:39.144671, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:37:39.144639]
==> [2020-07-03-13:37:39.145189, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:37:39.147786, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:37:39.147757]
==> [2020-07-03-13:37:39.487202, 6399] [TOOLCHAIN] MATCH Gcc
==> [2020-07-03-13:37:39.508643, 6399] A dependency has updated CPATH, this may lead pkg-config to assume that the package is part of the system includes and omit it when invoked with '--cflags'.
==> [2020-07-03-13:37:39.569388, 6399] '/apps/gcc-9.3.0/bin/g++' '-v' '/dev/shm/spack-implicit-link-infoqyeclna9/main.c' '-o' '/dev/shm/spack-implicit-link-infoqyeclna9/output'
==> [2020-07-03-13:37:39.860003, 6399] parsing implicit link info
==> [2020-07-03-13:37:39.860435, 6399] linker line:  /apps/gcc-9.3.0/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/collect2 -plugin /apps/gcc-9.3.0/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/liblto_plugin.so -plugin-opt=/apps/gcc-9.3.0/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/lto-wrapper -plugin-opt=-fresolution=/dev/shm/ccBoCISp.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /dev/shm/spack-implicit-link-infoqyeclna9/output /lib/../lib64/crt1.o /lib/../lib64/crti.o /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/crtbegin.o -L/apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0 -L/apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../.. /dev/shm/ccL9JBNT.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/crtend.o /lib/../lib64/crtn.o
==> [2020-07-03-13:37:39.860554, 6399] linkdir: /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0
==> [2020-07-03-13:37:39.860609, 6399] linkdir: /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64
==> [2020-07-03-13:37:39.860657, 6399] linkdir: /lib/../lib64
==> [2020-07-03-13:37:39.860702, 6399] linkdir: /usr/lib/../lib64
==> [2020-07-03-13:37:39.860786, 6399] linkdir: /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../..
==> [2020-07-03-13:37:39.860852, 6399] found raw link dirs: /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0, /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../lib64, /lib/../lib64, /usr/lib/../lib64, /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../..
==> [2020-07-03-13:37:39.860999, 6399] found link dirs: /apps/gcc-9.3.0/lib/gcc/x86_64-pc-linux-gnu/9.3.0, /apps/gcc-9.3.0/lib64, /lib64, /usr/lib64, /apps/gcc-9.3.0/lib
==> [2020-07-03-13:37:39.869395, 6399] Fetching http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16546/l_mpi_2019.7.217.tgz
==> [2020-07-03-13:37:39.872663, 6399] '/usr/bin/curl' '-C' '-' '-o' '/dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/l_mpi_2019.7.217.tgz.part' '-f' '-D' '-' '-L' 'http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16546/l_mpi_2019.7.217.tgz' '-#' '--connect-timeout' '10'
######################################################################## 100.0%
==> [2020-07-03-13:37:45.229085, 6399] Staging archive: /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/l_mpi_2019.7.217.tgz
==> [2020-07-03-13:37:45.234214, 6399] '/usr/bin/tar' '-xf' '/dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/l_mpi_2019.7.217.tgz'
==> [2020-07-03-13:37:47.119125, 6399] Created stage in /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez
==> [2020-07-03-13:37:47.119898, 6399] No patches needed for intel-mpi
==> [2020-07-03-13:37:47.120038, 6399] 6394: intel-mpi: Building intel-mpi [IntelPackage]
==> [2020-07-03-13:37:47.120407, 6399] WRITE LOCK (spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez): /dev/shm/vasco/spack-stage/.lock[7160311475289934657:1] [Acquiring]
==> [2020-07-03-13:37:47.120957, 6399] write locking [7160311475289934657:1]: timeout 60 sec
==> [2020-07-03-13:37:47.121132, 6399] WRITE LOCK (spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez): /dev/shm/vasco/spack-stage/.lock[7160311475289934657:1] [Acquired at 13:37:47.121095]
==> [2020-07-03-13:37:47.167810, 6399] 6394: intel-mpi: Executing phase: 'configure'
==> [2020-07-03-13:37:47.169432, 6399] 6394: intel-mpi: Executing phase: 'install'
==> [2020-07-03-13:39:32.285456, 6399] FileNotFoundError: [Errno 2] No such file or directory: '/apps/spack/opt/spack/linux-centos7-zen/gcc-9.3.0/intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/.spack/repos'
==> [2020-07-03-13:39:32.286351, 6399] Installing /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/spack-build-out.txt to /apps/spack/opt/spack/linux-centos7-zen/gcc-9.3.0/intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/.spack/spack-build-out.txt
==> [2020-07-03-13:39:32.294817, 6399] Installing /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/spack-build-env.txt to /apps/spack/opt/spack/linux-centos7-zen/gcc-9.3.0/intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/.spack/spack-build-env.txt
==> [2020-07-03-13:39:32.346534, 6399] Installing /apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py to /apps/spack/opt/spack/linux-centos7-zen/gcc-9.3.0/intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/.spack/repos/builtin/packages/intel-mpi
==> [2020-07-03-13:39:32.355151, 6399] Reading config file /apps/spack/etc/spack/defaults/modules.yaml
==> [2020-07-03-13:39:32.375904, 6399] Reading config file /apps/spack/etc/spack/defaults/linux/modules.yaml
==> [2020-07-03-13:39:32.383436, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:39:32.385306, 6399] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:39:32.387438, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:39:32.387399]
==> [2020-07-03-13:39:32.388411, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:39:32.388905, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:39:32.388875]
==> [2020-07-03-13:39:32.389013, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:39:32.390184, 6399] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:39:32.391848, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:39:32.391816]
==> [2020-07-03-13:39:32.392335, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:39:32.395978, 6399] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:39:32.395948]
==> [2020-07-03-13:39:32.400063, 6399]  WRITE: intel-mpi@2019.7.217%gcc@9.3.0 arch=linux-centos7-zen/munyzgr [/apps/spack/share/spack/modules/linux-centos7-zen/intel-mpi-2019.7.217-gcc-9.3.0-munyzgr]
==> [2020-07-03-13:39:32.714220, 6399] WRITE LOCK (spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez): /dev/shm/vasco/spack-stage/.lock[7160311475289934657:1] [Releasing]
==> [2020-07-03-13:39:32.714404, 6399] WRITE LOCK (spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez): /dev/shm/vasco/spack-stage/.lock[7160311475289934657:1] [Released at 13:39:32.714376]
==> [2020-07-03-13:39:32.727227, 6394] Error: NameError: name 'IntelMPI' is not defined

/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py:68, in setup_run_environment:
         67    def setup_run_environment(self, env):
  >>     68        super(IntelMPI, self).setup_run_environment(env)
         69
         70        for name, value in self.mpi_compiler.wrappers.items():
         71            env.set(name, value)

See build log for details:
  /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/spack-build-out.txt

Traceback (most recent call last):
  File "/apps/spack/lib/spack/spack/build_environment.py", line 838, in child_process
    return_value = function()
  File "/apps/spack/lib/spack/spack/installer.py", line 1146, in build_process
    spack.hooks.post_install(pkg.spec)
  File "/apps/spack/lib/spack/spack/hooks/__init__.py", line 59, in __call__
    hook(*args, **kwargs)
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 30, in post_install
    _for_each_enabled(spec, 'write')
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 22, in _for_each_enabled
    getattr(generator, method_name)()
  File "/apps/spack/lib/spack/spack/modules/common.py", line 822, in write
    context = self.context.to_dict()
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in to_dict
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in <listcomp>
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/modules/common.py", line 676, in environment_modifications
    self.spec.package.setup_run_environment(env)
  File "/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py", line 69, in setup_run_environment
NameError: name 'IntelMPI' is not defined
==> [2020-07-03-13:39:32.727709, 6394] Error: Failed to install intel-mpi due to ChildError: NameError: name 'IntelMPI' is not defined
/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py:68, in setup_run_environment:
         67    def setup_run_environment(self, env):
  >>     68        super(IntelMPI, self).setup_run_environment(env)
         69
         70        for name, value in self.mpi_compiler.wrappers.items():
         71            env.set(name, value)

See build log for details:
  /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/spack-build-out.txt
Traceback (most recent call last):
  File "/apps/spack/lib/spack/spack/build_environment.py", line 838, in child_process
    return_value = function()
  File "/apps/spack/lib/spack/spack/installer.py", line 1146, in build_process
    spack.hooks.post_install(pkg.spec)
  File "/apps/spack/lib/spack/spack/hooks/__init__.py", line 59, in __call__
    hook(*args, **kwargs)
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 30, in post_install
    _for_each_enabled(spec, 'write')
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 22, in _for_each_enabled
    getattr(generator, method_name)()
  File "/apps/spack/lib/spack/spack/modules/common.py", line 822, in write
    context = self.context.to_dict()
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in to_dict
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in <listcomp>
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/modules/common.py", line 676, in environment_modifications
    self.spec.package.setup_run_environment(env)
  File "/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py", line 69, in setup_run_environment
NameError: name 'IntelMPI' is not defined

==> [2020-07-03-13:39:32.727890, 6394] Flagging intel-mpi as failed: NameError: name 'IntelMPI' is not defined
/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py:68, in setup_run_environment:
         67    def setup_run_environment(self, env):
  >>     68        super(IntelMPI, self).setup_run_environment(env)
         69
         70        for name, value in self.mpi_compiler.wrappers.items():
         71            env.set(name, value)

See build log for details:
  /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/spack-build-out.txt
Traceback (most recent call last):
  File "/apps/spack/lib/spack/spack/build_environment.py", line 838, in child_process
    return_value = function()
  File "/apps/spack/lib/spack/spack/installer.py", line 1146, in build_process
    spack.hooks.post_install(pkg.spec)
  File "/apps/spack/lib/spack/spack/hooks/__init__.py", line 59, in __call__
    hook(*args, **kwargs)
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 30, in post_install
    _for_each_enabled(spec, 'write')
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 22, in _for_each_enabled
    getattr(generator, method_name)()
  File "/apps/spack/lib/spack/spack/modules/common.py", line 822, in write
    context = self.context.to_dict()
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in to_dict
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in <listcomp>
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/modules/common.py", line 676, in environment_modifications
    self.spec.package.setup_run_environment(env)
  File "/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py", line 69, in setup_run_environment
NameError: name 'IntelMPI' is not defined

==> [2020-07-03-13:39:32.733435, 6394] WRITE LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Acquiring]
==> [2020-07-03-13:39:32.739336, 6394] write locking [3642785708049608380:1]: timeout None sec
==> [2020-07-03-13:39:32.741810, 6394] WRITE LOCK (intel-mpi): /apps/spack/opt/spack/.spack-db/prefix_failures[3642785708049608380:1] [Acquired at 13:39:32.741777]
==> [2020-07-03-13:39:32.741958, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2020-07-03-13:39:32.743159, 6394] read locking [0:0]: timeout 3 sec
==> [2020-07-03-13:39:32.743876, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Acquired at 13:39:32.743845]
==> [2020-07-03-13:39:32.744368, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Releasing]
==> [2020-07-03-13:39:32.745896, 6394] READ LOCK (database): /apps/spack/opt/spack/.spack-db/lock[0:0] [Released at 13:39:32.745867]
==> [2020-07-03-13:39:35.157560, 6394] ChildError: NameError: name 'IntelMPI' is not defined
/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py:68, in setup_run_environment:
         67    def setup_run_environment(self, env):
  >>     68        super(IntelMPI, self).setup_run_environment(env)
         69
         70        for name, value in self.mpi_compiler.wrappers.items():
         71            env.set(name, value)

See build log for details:
  /dev/shm/vasco/spack-stage/spack-stage-intel-mpi-2019.7.217-munyzgrskvoxsx2jnjodrb3uo73fnqez/spack-build-out.txt
Traceback (most recent call last):
  File "/apps/spack/lib/spack/spack/build_environment.py", line 838, in child_process
    return_value = function()
  File "/apps/spack/lib/spack/spack/installer.py", line 1146, in build_process
    spack.hooks.post_install(pkg.spec)
  File "/apps/spack/lib/spack/spack/hooks/__init__.py", line 59, in __call__
    hook(*args, **kwargs)
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 30, in post_install
    _for_each_enabled(spec, 'write')
  File "/apps/spack/lib/spack/spack/hooks/module_file_generation.py", line 22, in _for_each_enabled
    getattr(generator, method_name)()
  File "/apps/spack/lib/spack/spack/modules/common.py", line 822, in write
    context = self.context.to_dict()
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in to_dict
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/tengine.py", line 63, in <listcomp>
    d = [(name, getattr(self, name)) for name in self.context_properties]
  File "/apps/spack/lib/spack/spack/modules/common.py", line 676, in environment_modifications
    self.spec.package.setup_run_environment(env)
  File "/apps/spack/var/spack/repos/builtin/packages/intel-mpi/package.py", line 69, in setup_run_environment
NameError: name 'IntelMPI' is not defined
```

Maybe releated to https://github.com/spack/spack/pull/17248?

Thanks



Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/intel-mpi/package.py b/var/spack/repos/builtin/packages/intel-mpi/package.py
--- a/var/spack/repos/builtin/packages/intel-mpi/package.py
+++ b/var/spack/repos/builtin/packages/intel-mpi/package.py
@@ -65,7 +65,7 @@ def setup_dependent_build_environment(self, *args):
         })
 
     def setup_run_environment(self, env):
-        super(IntelMPI, self).setup_run_environment(env)
+        super(IntelMpi, self).setup_run_environment(env)
 
         for name, value in self.mpi_compiler.wrappers.items():
             env.set(name, value)


Test patch: