summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/hdf5/hdf5_1_14_0_config_find_mpi.patch13
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py53
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-h5py/package.py2
4 files changed, 58 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/hdf5_1_14_0_config_find_mpi.patch b/var/spack/repos/builtin/packages/hdf5/hdf5_1_14_0_config_find_mpi.patch
new file mode 100644
index 0000000000..49f7fc8376
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hdf5/hdf5_1_14_0_config_find_mpi.patch
@@ -0,0 +1,13 @@
+diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
+index 35cee4f..b336377 100644
+--- a/config/cmake/hdf5-config.cmake.in
++++ b/config/cmake/hdf5-config.cmake.in
+@@ -63,6 +63,8 @@ if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL)
+ set (${HDF5_PACKAGE_NAME}_MPI_Fortran_INCLUDE_PATH "@MPI_Fortran_INCLUDE_DIRS@")
+ set (${HDF5_PACKAGE_NAME}_MPI_Fortran_LIBRARIES "@MPI_Fortran_LIBRARIES@")
+ endif ()
++
++ find_package(MPI QUIET REQUIRED)
+ endif ()
+
+ if (${HDF5_PACKAGE_NAME}_BUILD_JAVA)
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 6a708d5731..8caad95440 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -39,7 +39,8 @@ class Hdf5(CMakePackage):
# The 'develop' version is renamed so that we could uninstall (or patch) it
# without affecting other develop version.
- version("develop-1.13", branch="develop")
+ version("develop-1.15", branch="develop")
+ version("develop-1.14", branch="hdf5_1_14")
version("develop-1.12", branch="hdf5_1_12")
version("develop-1.10", branch="hdf5_1_10")
version("develop-1.8", branch="hdf5_1_8")
@@ -50,6 +51,11 @@ class Hdf5(CMakePackage):
# Even versions are maintenance versions
version(
+ "1.14.0",
+ sha256="a571cc83efda62e1a51a0a912dd916d01895801c5025af91669484a1575a6ef4",
+ preferred=True,
+ )
+ version(
"1.12.2",
sha256="2a89af03d56ce7502dcae18232c241281ad1773561ec00c0f0e8ee2463910f14",
preferred=True,
@@ -190,7 +196,7 @@ class Hdf5(CMakePackage):
"api",
default="default",
description="Choose api compatibility for earlier version",
- values=("default", "v114", "v112", "v110", "v18", "v16"),
+ values=("default", "v116", "v114", "v112", "v110", "v18", "v16"),
multi=False,
)
@@ -207,10 +213,28 @@ class Hdf5(CMakePackage):
for plat in ["cray", "darwin", "linux"]:
depends_on("pkgconfig", when="platform=%s" % plat, type="run")
+ conflicts("+mpi", "^mpich@4.0:4.0.3")
+ conflicts("api=v116", when="@1.6:1.14", msg="v116 is not compatible with this release")
+ conflicts(
+ "api=v116",
+ when="@develop-1.8:develop-1.14",
+ msg="v116 is not compatible with this release",
+ )
conflicts("api=v114", when="@1.6:1.12", msg="v114 is not compatible with this release")
+ conflicts(
+ "api=v114",
+ when="@develop-1.8:develop-1.12",
+ msg="v114 is not compatible with this release",
+ )
conflicts("api=v112", when="@1.6:1.10", msg="v112 is not compatible with this release")
+ conflicts(
+ "api=v112",
+ when="@develop-1.8:develop-1.10",
+ msg="v112 is not compatible with this release",
+ )
conflicts("api=v110", when="@1.6:1.8", msg="v110 is not compatible with this release")
- conflicts("api=v18", when="@1.6.0:1.6", msg="v18 is not compatible with this release")
+ conflicts("api=v110", when="@develop-1.8", msg="v110 is not compatible with this release")
+ conflicts("api=v18", when="@1.6", msg="v18 is not compatible with this release")
# The Java wrappers cannot be built without shared libs.
conflicts("+java", when="~shared")
@@ -287,6 +311,13 @@ class Hdf5(CMakePackage):
# See https://github.com/HDFGroup/hdf5/issues/1157
patch("fortran-kinds-2.patch", when="@1.10.8,1.12.1")
+ # Patch needed for HDF5 1.14.0 where dependency on MPI::MPI_C was declared
+ # PUBLIC. Dependent packages using the default hdf5 package but not
+ # expecting to use MPI then failed to configure because they did not call
+ # find_package(MPI). This patch does that for them. Later HDF5 versions
+ # will include the patch code changes.
+ patch("hdf5_1_14_0_config_find_mpi.patch", when="@1.14.0")
+
# The argument 'buf_size' of the C function 'h5fget_file_image_c' is
# declared as intent(in) though it is modified by the invocation. As a
# result, aggressive compilers such as Fujitsu's may do a wrong
@@ -576,14 +607,14 @@ class Hdf5(CMakePackage):
if api != "default":
args.append(self.define("DEFAULT_API_VERSION", api))
- if "+mpi" in spec and "platform=windows" not in spec:
- args.append(self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc))
-
- if "+cxx" in self.spec:
- args.append(self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx))
-
- if "+fortran" in self.spec:
- args.append(self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc))
+ 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,
+ ]
+ )
# work-around for https://github.com/HDFGroup/hdf5/issues/1320
if spec.satisfies("@1.10.8,1.13.0"):
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 436d328eb8..c5feaf80f6 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -270,8 +270,8 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# Patch for paraview 5.10: +hdf5 ^hdf5@1.13.2:
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9690
- patch("vtk-xdmf2-hdf51.13.1.patch", when="@5.10.0:5.10 +hdf5")
- patch("vtk-xdmf2-hdf51.13.2.patch", when="@5.10: +hdf5")
+ patch("vtk-xdmf2-hdf51.13.1.patch", when="@5.10.0:5.10")
+ patch("vtk-xdmf2-hdf51.13.2.patch", when="@5.10:")
@property
def generator(self):
diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py
index 0782c6977e..5355af43d7 100644
--- a/var/spack/repos/builtin/packages/py-h5py/package.py
+++ b/var/spack/repos/builtin/packages/py-h5py/package.py
@@ -61,7 +61,7 @@ class PyH5py(PythonPackage):
# Link dependencies (py-h5py v2 cannot build against HDF5 1.12 regardless
# of API setting)
depends_on("hdf5@1.8.4:1.11 +hl", when="@:2")
- depends_on("hdf5@1.8.4: +hl", when="@3:")
+ depends_on("hdf5@1.8.4:1.12 +hl", when="@3:")
# MPI dependencies
depends_on("hdf5+mpi", when="+mpi")