spack: can't build hdf5 using intel-mpi

Expected Result

hdf5 installed with ^intel-mpi

Actual Result

[sajid@xrmlite ~]$ spack install hdf5+mpi ^intel-mpi %intel@18.0.3
==> intel-mpi is already installed in /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/intel-mpi-2018.2.199-2k65vtkd3pfhdoq3ds5p23utfcr7qv7o
==> zlib is already installed in /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/zlib-1.2.11-vonxam4cye6oarnfuv4tviycduvx53ma
==> Installing hdf5
==> Using cached archive: /home/sajid/packages/spack/var/spack/cache/hdf5/hdf5-1.10.2.tar.gz
==> Staging archive: /home/sajid/packages/spack/var/spack/stage/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt/hdf5-1.10.2.tar.gz
==> Created stage in /home/sajid/packages/spack/var/spack/stage/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt
==> No patches needed for hdf5
==> Building hdf5 [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 77:
    '/home/sajid/packages/spack/var/spack/stage/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt/hdf5-1.10.2/configure' '--prefix=/home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt' '--enable-unsupported' '--disable-threadsafe' '--disable-cxx' '--disable-hl' '--disable-fortran' '--without-szlib' '--enable-build-mode=production' '--enable-shared' 'CFLAGS=-fPIC' 'CXXFLAGS=-fPIC' 'FCFLAGS=-fPIC' '--enable-parallel' 'CC=/home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/intel-mpi-2018.2.199-2k65vtkd3pfhdoq3ds5p23utfcr7qv7o/compilers_and_libraries/linux/mpi/intel64/bin/mpiicc' '--with-zlib=/home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/zlib-1.2.11-vonxam4cye6oarnfuv4tviycduvx53ma'

2 errors found in build log:
     30    checking for config /home/sajid/packages/spack/var/spack/stage/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt/hdf5-1.10.2/config/site-specific/host-phys.northwestern.edu... no
     31    checking for config /home/sajid/packages/spack/var/spack/stage/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt/hdf5-1.10.2/config/site-specific/host-northwestern.edu... no
     32    checking for config /home/sajid/packages/spack/var/spack/stage/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt/hdf5-1.10.2/config/site-specific/host-edu... no
     33    checking build mode... production
     34    checking for gcc... /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/intel-mpi-2018.2.199-2k65vtkd3pfhdoq3ds5p23utfcr7qv7o/compilers_and_libraries/linux/mpi/i
           ntel64/bin/mpiicc
     35    checking whether the C compiler works... no
  >> 36    configure: error: in `/tmp/sajid/spack-stage/spack-stage-tdyo12k_/hdf5-1.10.2':
  >> 37    configure: error: C compiler cannot create executables
     38    See `config.log' for more details

See build log for details:
  /home/sajid/packages/spack/var/spack/stage/hdf5-1.10.2-x5u6v4jqn252hr6rdt5ljjrxfgjq2klt/hdf5-1.10.2/spack-build.out

Information on your system

This includes:

  1. linux-centos7-x86_64, intel@18.0.3

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 29 (29 by maintainers)

Most upvoted comments

@s-sajid-ali You may have interference between how you integrated the Intel-18.0.3 compilers for Spack and the intel-mpi package.

Since 18.0.3 is neither in #7469 (I was on travel), nor in develop, I take it you saw this issue without that PR applied.

FWIW, I get (of course with #7469 applied):

$ spack install hdf5+mpi ^intel-mpi %intel@18.0.2
…
==> Building hdf5 [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Executing phase: 'build'
==> Executing phase: 'install'
==> Successfully installed hdf5
…

I’ll integrate 18.0.3 and will revisit.

@s-sajid-ali To address the issue in code may need some work – I filed #8632 for it.

For you to merely get going, you could try two avenues:

  1. Use an alternative intel18 modulefile with MPI excised:

    • Copy from your system location to somewhere in MODULEPATH that you control.
    • Comment out I_MPI_ROOT
    • Remove any path components with */mpi in it.
  2. Forego modules: in compilers.yaml and use full paths only.

    Abstractly, this may work, but be warnded that when I tried that in practice, HDF5 would compile only if I also provided a cflags: setting.

@s-sajid-ali

This is the composer edition.

Bingo! – Looks like you integrated the composer edition for Spack with a modules: [intel18] tag, which is a reasonable thing to do. The module sets I_MPI_ROOT to suit the MPI runtime it provides. That might be tolerable, but not if the compiler module gets loaded after Spack has set I_MPI_ROOT to suit intel-mpi, which is just what happens:

$ spack --debug install -v hdf5@1.10.2+mpi ^intel-mpi
…
==> Installing hdf5
…
==> _setup_dependent_env_callback.mpi_setup_dependent_environment:	### setting I_MPI_ROOT #########
==> normalize_path.normalize_suite_dir:	/home/SHARE/soft/spack/spack-stern/opt/spack/linux-centos6-x86_64/intel-mpi/2018.3.222-intel-18.0.3/H626k6b/compilers_and_libraries_2018.3.222
==> mpi_setup_dependent_environment.normalize_path:	/home/SHARE/soft/spack/spack-stern/opt/spack/linux-centos6-x86_64/intel-mpi/2018.3.222-intel-18.0.3/H626k6b/compilers_and_libraries_2018.3.222/linux/mpi
==> _setup_dependent_env_callback.mpi_setup_dependent_environment:	################################
…

So far, so good.

==> '/usr/bin/modulecmd' 'python' 'load' 'intel-parallel-studio/composer.2018.3/intel-18.0.3/Hnd7rbb'

That pulls the rug out from under intel-mpi. 💣

…
==> Staging archive: /home/SHARE/soft/spack/spack-stern/var/spack/stage/hdf5-1.10.2-g47xoftovzdoi3cabhjtkycpxzimqcm5/hdf5-1.10.2.tar.gz
…

… and then things go awry. 💥

Given that Spack demands full paths for compilers anyway, one might think that modules: could be left empty or just select a gcc. Alas, one would be wrong:

  >> 1173    ./H5make_libsettings: error while loading shared libraries: libimf.so: cannot open shared object file: No such file or directory
  >> 1174    make[2]: *** [H5lib_settings.c] Error 1

Outside of Spack, I’d load compiler stuff first, then MPI. I have to believe that there are reasons why Spack does it the other way around. I have to think about the best angle of attack.

@s-sajid-ali It appears your intel-mpi package was installed while spack was checked out on another branch.

  • To confirm, review the package code of your installed version (identified by the hash in CC above):
    less `spack location -i intel-mpi/gp3cej2`/.spack/repos/builtin/packages/intel-mpi/package.py
    
    and compare it against the intel-prefixes branch version. If differences are indeed due to a branch change, that will be pretty obvious.
  • To resolve:
    1. Remove and re-install intel-mpi while spack is on the intel-prefixes branch. This may affect dependents – I trust you know how do deal with that.
    2. Check that the formerly missing lib is now present. e.g.:
      find `spack location -i intel-mpi %intel@18.0.3` -name 'libmpigi.*'
      
    3. Retry hdf5.