-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Installation issue: HDF5+mpi~fortran requires a fortran compiler #35377
Copy link
Copy link
Closed
Labels
Description
Steps to reproduce the issue
spack currently requires an MPI fortran wrapper for hdf5+mpi builds even with the fortran variant disabled :
spack/var/spack/repos/builtin/packages/hdf5/package.py
Lines 610 to 618 in b52d4b8
| if "+mpi" in spec: | |
| args.extend( | |
| [ | |
| "-DMPI_CXX_COMPILER:PATH=%s" % spec["mpi"].mpicxx, | |
| "-DMPI_C_COMPILER:PATH=%s" % spec["mpi"].mpicc, | |
| "-DMPI_Fortran_COMPILER:PATH=%s" % spec["mpi"].mpifc, | |
| ] | |
| ) | |
This causes anyone trying to build hdf5+mpi~fortran with an installation of MPI without fortran wrappers to crash.
Error message
sasyed@MAC-140753 ~> spack install [email protected]+mpi+hl~fortran ^[email protected]~fortran
...
==> Installing hdf5-1.12.1-tj3u7vhy7yyct563jfygmkdcdjr76kk6
==> No binary for hdf5-1.12.1-tj3u7vhy7yyct563jfygmkdcdjr76kk6 found: installing from source
==> Fetching https://mirror.spack.io/_source-cache/archive/79/79c66ff67e666665369396e9c90b32e238e501f345afd2234186bfb8331081ca.tar.gz
==> Applied patch /Users/sasyed/Documents/packages/spack/var/spack/repos/builtin/packages/hdf5/fortran-kinds-2.patch
==> Ran patch() for hdf5
==> hdf5: Executing phase: 'cmake'
==> Error: AttributeError: 'Spec' object has no attribute 'mpifc'
The 'hdf5' package cannot find an attribute while trying to build from sources. This might be due to a change in Spack's package format to support multiple build-systems for a single package. You can fix this by updating the build recipe, and you can also report the issue as a bug. More information at https://spack.readthedocs.io/en/latest/packaging_guide.html#installation-procedure
/Users/sasyed/Documents/packages/spack/var/spack/repos/builtin/packages/hdf5/package.py:615, in cmake_args:
612 [
613 "-DMPI_CXX_COMPILER:PATH=%s" % spec["mpi"].mpicxx,
614 "-DMPI_C_COMPILER:PATH=%s" % spec["mpi"].mpicc,
>> 615 "-DMPI_Fortran_COMPILER:PATH=%s" % spec["mpi"].mpifc,
616 ]
617 )
618
See build log for details:
...
Information on your system
sasyed@MAC-140753 ~> spack debug report
* **Spack:** 0.20.0.dev0 (7fe2039b0144ff38850f1a34069bd61bec4db74b)
* **Python:** 3.10.8
* **Platform:** darwin-monterey-m1
* **Concretizer:** clingo
sasyed@MAC-140753 ~>
Additional information
For the HDF5 maintainers (@brtnfld @byrnHDF @gheber @hyoklee @lkurz @lrknox): Should the CMake argument DMPI_Fortran_COMPILER be set only when the fortran variant is enabled or is it always required even when one does not build the fortran wrappers?
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have run
spack maintainers <name-of-the-package>and @mentioned any maintainers - I have uploaded the build log and environment files
- I have searched the issues of this repo and believe this is not a duplicate
Reactions are currently unavailable