Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated minimum supported versions #67

Merged
merged 2 commits into from
Feb 26, 2024
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
6 changes: 3 additions & 3 deletions scripts/install_boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ major=${version_arr[0]}
minor=${version_arr[1]}
ver_si_on=${version//\./_} # Converts 1.69.0 to 1_69_0

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
if [[ (${major} -lt 1) || ((${major} -eq 1) && (${minor} -lt 62)) ]]; then # Boost < 1.62.x
echo "$(basename $0): Boost versions < 1.62 not supported"
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [[ (${major} -lt 1) || ((${major} -eq 1) && (${minor} -lt 67)) ]]; then # Boost < 1.67.x
echo "$(basename $0): Boost versions < 1.67 not supported"
exit 1
fi

Expand Down
9 changes: 6 additions & 3 deletions scripts/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ parallel="${parallel:-$(nproc)}"
version_arr=(${version//\./ })
major=${version_arr[0]}
minor=${version_arr[1]}
patch=${version_arr[2]}

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
if [[ (${major} -lt 3) || ((${major} -eq 3) && (${minor} -lt 5)) ]]; then # CMake < 3.5.x
echo "$(basename $0): CMake versions < 3.5 not supported"
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [[ (${major} -lt 3)
|| ((${major} -eq 3) && (${minor} -lt 16))
|| ((${major} -eq 3) && (${minor} -eq 16) && (${patch} -lt 3)) ]]; then # CMake < 3.16.3
echo "$(basename $0): CMake versions < 3.16.3 not supported"
exit 1
fi

Expand Down
83 changes: 14 additions & 69 deletions scripts/install_petsc_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,25 @@ petsc_minor=${petsc_version_arr[1]}
hdf5_version_arr=(${hdf5_version//\./ })
hdf5_major=${hdf5_version_arr[0]}
hdf5_minor=${hdf5_version_arr[1]}
hdf5_patch=${hdf5_version_arr[2]}

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
if [[ (${petsc_major} -lt 3) || ((${petsc_major} -eq 3) && (${petsc_minor} -lt 7)) ]]; then # PETSc < 3.7.x
echo "$(basename $0): PETSc versions < 3.7 not supported"
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [[ (${petsc_major} -lt 3)
|| ((${petsc_major} -eq 3) && (${petsc_minor} -lt 12)) ]]; then # PETSc < 3.12.x
echo "$(basename $0): PETSc versions < 3.12 not supported"
exit 1
fi

if [[ (${hdf5_major} -lt 1) || ((${hdf5_major} -eq 1) && (${hdf5_minor} -lt 10)) ]]; then # HDF5 < 1.10.x
echo "$(basename $0): HDF5 versions < 1.10 not supported"
if [[ (${hdf5_major} -lt 1)
|| ((${hdf5_major} -eq 1) && (${hdf5_minor} -lt 10))
|| ((${hdf5_major} -eq 1) && (${hdf5_minor} -eq 10) && (${hdf5_patch} -lt 4)) ]]; then # HDF5 < 1.10.4
echo "$(basename $0): HDF5 versions < 1.10.4 not supported"
exit 1
fi

# Preferred MPICH versions
URL_MPICH_3_3=https://www.mpich.org/static/downloads/3.3/mpich-3.3.tar.gz
URL_MPICH_3_4=https://www.mpich.org/static/downloads/3.4a3/mpich-3.4a3.tar.gz

# Fixes for broken Hypre links in some PETSc versions
URL_HYPRE_2_11=https://github.com/hypre-space/hypre/archive/refs/tags/v2.11.1.tar.gz
URL_HYPRE_2_12=https://github.com/hypre-space/hypre/archive/refs/tags/v2.12.0.tar.gz
URL_HYPRE_2_14=https://github.com/hypre-space/hypre/archive/refs/tags/v2.14.0.tar.gz
URL_HYPRE_2_15=https://github.com/hypre-space/hypre/archive/refs/tags/v2.15.1.tar.gz

# Retrieving packages to fix "url is not a tarball" errors
mkdir -p ${base_dir}/src/petsc_hdf5
cd ${base_dir}/src/petsc_hdf5
Expand All @@ -143,53 +140,7 @@ if [ -n "${mpich_version}" ]; then
download_mpich=$(pwd)/$(basename ${URL_MPICH})
fi

download_hypre=1
if [[ (${petsc_major} -eq 3) && (${petsc_minor} -eq 7) ]]; then # PETSc 3.7.x
if [ -z "${mpich_version}" ]; then
wget -nc ${URL_MPICH_3_3}
download_mpich=$(pwd)/$(basename ${URL_MPICH_3_3})
fi

wget -nc ${URL_HYPRE_2_11} # Fixes broken hypre link in this version
download_hypre=$(pwd)/$(basename ${URL_HYPRE_2_11})

elif [[ (${petsc_major} -eq 3) && (${petsc_minor} -eq 8) ]]; then # PETSc 3.8.x
if [ -z "${mpich_version}" ]; then
wget -nc ${URL_MPICH_3_3}
download_mpich=$(pwd)/$(basename ${URL_MPICH_3_3})
fi

wget -nc ${URL_HYPRE_2_12} # Fixes broken hypre link in this version
download_hypre=$(pwd)/$(basename ${URL_HYPRE_2_12})

elif [[ (${petsc_major} -eq 3) && (${petsc_minor} -eq 9) ]]; then # PETSc 3.9.x
if [ -z "${mpich_version}" ]; then
wget -nc ${URL_MPICH_3_3}
download_mpich=$(pwd)/$(basename ${URL_MPICH_3_3})
fi

wget -nc ${URL_HYPRE_2_14} # Fixes broken hypre link in this version
download_hypre=$(pwd)/$(basename ${URL_HYPRE_2_14})

elif [[ (${petsc_major} -eq 3) && (${petsc_minor} -eq 10) ]]; then # PETSc 3.10.x
if [ -z "${mpich_version}" ]; then
wget -nc ${URL_MPICH_3_3}
download_mpich=$(pwd)/$(basename ${URL_MPICH_3_3})
fi

wget -nc ${URL_HYPRE_2_14} # Fixes broken hypre link in this version
download_hypre=$(pwd)/$(basename ${URL_HYPRE_2_14})

elif [[ (${petsc_major} -eq 3) && (${petsc_minor} -eq 11) ]]; then # PETSc 3.11.x
if [ -z "${mpich_version}" ]; then
wget -nc ${URL_MPICH_3_3}
download_mpich=$(pwd)/$(basename ${URL_MPICH_3_3})
fi

wget -nc ${URL_HYPRE_2_15} # Fixes broken hypre link in this version
download_hypre=$(pwd)/$(basename ${URL_HYPRE_2_15})

elif [[ (${petsc_major} -eq 3) && (${petsc_minor} -eq 12) ]]; then # PETSc 3.12.x
if [[ (${petsc_major} -eq 3) && (${petsc_minor} -eq 12) ]]; then # PETSc 3.12.x
if [ -z "${mpich_version}" ]; then
wget -nc ${URL_MPICH_3_4}
download_mpich=$(pwd)/$(basename ${URL_MPICH_3_4})
Expand All @@ -212,12 +163,6 @@ if [[ (${petsc_major} -eq 3) && ((${petsc_minor} -eq 12) || (${petsc_minor} -eq
sed -i.bak 's/thread.isAlive()/thread.is_alive()/g' config/BuildSystem/script.py
fi

# Set Python version
PYTHON=python3
if [[ (${petsc_major} -lt 3) || ((${petsc_major} -eq 3) && (${petsc_minor} -lt 11)) ]]; then # PETSc < 3.11.x
PYTHON=python2
fi

# Build and install
cd ${install_dir}
export PETSC_DIR=$(pwd)
Expand All @@ -226,7 +171,7 @@ case ${petsc_arch} in

linux-gnu)
export PETSC_ARCH=linux-gnu
${PYTHON} ./configure \
python3 ./configure \
--with-make-np=${parallel} \
--with-cc=gcc \
--with-cxx=g++ \
Expand All @@ -240,14 +185,14 @@ case ${petsc_arch} in
--download-hdf5=${download_hdf5} \
--download-parmetis=1 \
--download-metis=1 \
--download-hypre=${download_hypre} \
--download-hypre=1 \
--with-shared-libraries && \
make -j ${parallel} all
;;

linux-gnu-opt)
export PETSC_ARCH=linux-gnu-opt
${PYTHON} ./configure \
python3 ./configure \
--with-make-np=${parallel} \
--with-cc=gcc \
--with-cxx=g++ \
Expand All @@ -259,7 +204,7 @@ case ${petsc_arch} in
--download-hdf5=${download_hdf5} \
--download-parmetis=1 \
--download-metis=1 \
--download-hypre=${download_hypre} \
--download-hypre=1 \
--with-shared-libraries \
--with-debugging=0 && \
make -j ${parallel} all
Expand Down
13 changes: 4 additions & 9 deletions scripts/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ version_arr=(${version//\./ })
major=${version_arr[0]}
minor=${version_arr[1]}

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
if [[ (${major} -eq 3) && (${minor} -lt 6) ]]; then # Python3 < 3.6.x
echo "$(basename $0): Python3 versions < 3.6 not supported"
exit 1
fi

# PETSc versions < 3.11.x need Python2 to configure builds
if [[ (${major} -eq 2) && (${minor} -lt 7) ]]; then # Python2 < 2.7.x
echo "$(basename $0): Python2 versions < 2.7 not supported (for building dependencies)"
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [[ (${major} -lt 3)
|| ((${major} -eq 3) && (${minor} -lt 8)) ]]; then # Python < 3.8.x
echo "$(basename $0): Python3 versions < 3.8 not supported"
exit 1
fi

Expand Down
7 changes: 4 additions & 3 deletions scripts/install_sundials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ version_arr=(${version//\./ })
major=${version_arr[0]}
minor=${version_arr[1]}

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
if [[ (${major} -lt 2) || ((${major} -eq 2) && (${minor} -lt 7)) ]]; then # Sundials < 2.7.x
echo "$(basename $0): Sundials versions < 2.7 not supported"
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [[ (${major} -lt 3)
|| ((${major} -eq 3) && (${minor} -lt 1)) ]]; then # Sundials < 3.1.x
echo "$(basename $0): Sundials versions < 3.1 not supported"
exit 1
fi

Expand Down
5 changes: 3 additions & 2 deletions scripts/install_vtk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ version_arr=(${version//\./ })
major=${version_arr[0]}
minor=${version_arr[1]}

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
if [[ (${major} -lt 6) || ((${major} -eq 6) && (${minor} -lt 3)) ]]; then # VTK < 6.3.x
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [[ (${major} -lt 6)
|| ((${major} -eq 6) && (${minor} -lt 3)) ]]; then # VTK < 6.3.x
echo "$(basename $0): VTK versions < 6.3 not supported"
exit 1
fi
Expand Down
9 changes: 6 additions & 3 deletions scripts/install_xercesc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@ ver_si_on=${version//\./_} # Converts 3.1.1 to 3_1_1
version_arr=(${version//\./ })
major=${version_arr[0]}
minor=${version_arr[1]}
patch=${version_arr[2]}

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
if [[ (${major} -lt 3) || ((${major} -eq 3) && (${minor} -lt 2)) ]]; then # Xerces-C < 3.2.x
echo "$(basename $0): Xerces-C versions < 3.2 not supported"
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [[ (${major} -lt 3)
|| ((${major} -eq 3) && (${minor} -lt 2))
|| ((${major} -eq 3) && (${minor} -eq 2) && (${patch} -lt 1)) ]]; then # Xerces-C < 3.2.1
echo "$(basename $0): Xerces-C versions < 3.2.1 not supported"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/install_xsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ version_arr=(${version//\./ })
major=${version_arr[0]}
minor=${version_arr[1]}

# Unsupported versions: https://github.com/Chaste/dependency-modules/wiki
# Unsupported versions: https://chaste.github.io/docs/installguides/dependency-versions/
if [ ${major} -lt 4 ]; then # XSD < 4.0.x
echo "$(basename $0): XSD versions < 4.0 not supported"
exit 1
Expand Down
Loading