Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile.custom
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ RUN source /etc/profile.d/modules.sh && \

# TODO: This RUN section is a temporary workaround for backwards compatibility.
# Remove once the combined PETSc/HDF5 module is no longer needed.
# See https://github.com/Chaste/dependency-modules/issues/84
RUN source /etc/profile.d/modules.sh && \
module use ${MODULES_DIR}/modulefiles && \
install_petsc_hdf5.sh \
Expand Down
20 changes: 10 additions & 10 deletions scripts/custom/install_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,31 +69,30 @@ fi
mkdir -p ${base_dir}/src/hdf5
cd ${base_dir}/src/hdf5

URL_HDF5=
src_dir=$(pwd)/hdf5-${version}
mkdir -p ${src_dir}

if (version_ge "${version}" '1.10.0' && version_lt "${version}" '1.10.12') || # HDF5 >=1.10.0, <1.10.12
(version_ge "${version}" '1.12.0' && version_lt "${version}" '1.12.2') # HDF5 >=1.12.0, <1.12.2
then
URL_HDF5=https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${major}.${minor}/hdf5-${version}/src/hdf5-${version}.tar.gz
wget -nc https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${major}.${minor}/hdf5-${version}/src/hdf5-${version}.tar.gz
tar -xzf hdf5-${version}.tar.gz

elif (version_ge "${version}" '1.12.2' && version_lt "${version}" '1.12.4') || # HDF5 >=1.12.2, <1.12.4
(version_ge "${version}" '1.14.0' && version_lt "${version}" '1.14.4') # HDF5 >=1.14.0, <1.14.4
then
URL_HDF5=https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-${ver_si_on}.tar.gz
wget -nc https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-${ver_si_on}.tar.gz
tar -xzf hdf5-${ver_si_on}.tar.gz -C ${src_dir} --strip-components=1

else
# HDF5 >=1.10.12, <1.11
# HDF5 >=1.12.4, <1.13
# HDF5 >=1.14.4, <1.15
# + catch-all
URL_HDF5=https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-${version}.tar.gz
wget -nc https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-${version}.tar.gz
tar -xzf hdf5-${version}.tar.gz -C ${src_dir} --strip-components=1
fi

src_dir=$(pwd)/hdf5-${version}
mkdir -p ${src_dir}

wget -nc ${URL_HDF5}
tar -xzf $(basename ${URL_HDF5}) -C ${src_dir} --strip-components=1

# Build and install
install_dir=${base_dir}/opt/hdf5/${version}
mkdir -p ${install_dir}
Expand All @@ -105,6 +104,7 @@ cd build
CC=mpicc cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${install_dir} \
-DHDF5_BUILD_HL_LIB=OFF \
-DHDF5_BUILD_TOOLS=OFF \
-DHDF5_ENABLE_PARALLEL=ON \
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
Expand Down
1 change: 1 addition & 0 deletions scripts/custom/install_petsc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ case ${arch} in
--download-parmetis=1 \
--with-cc=mpicc \
--with-cxx=mpicxx \
--with-debugging=0 \
--with-fc=0 \
--with-shared-libraries \
--with-ssl=false \
Expand Down
1 change: 1 addition & 0 deletions scripts/custom/install_petsc_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# TODO: This script adds a PETSc/HDF5 modulefile as a temporary workaround for backwards compatibility.
# Remove once the combined PETSc/HDF5 module is no longer needed.
# See https://github.com/Chaste/dependency-modules/issues/84

usage()
{
Expand Down
2 changes: 2 additions & 0 deletions scripts/system/install_modulefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ EOF

# TODO: This adds PETSc/HDF5 modulefile stub as a temporary workaround for backwards compatibility.
# Remove once the combined PETSc/HDF5 module is no longer needed.
# See https://github.com/Chaste/dependency-modules/issues/84

mkdir -p ${base_dir}/modulefiles/petsc_hdf5/${petsc_version}_${hdf5_version}
cd ${base_dir}/modulefiles/petsc_hdf5/${petsc_version}_${hdf5_version}

Expand Down