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
2 changes: 1 addition & 1 deletion scripts/custom/install_boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ install_dir=${base_dir}/opt/boost/${version}
mkdir -p ${install_dir}

cd ${src_dir}
./bootstrap.sh --prefix=${install_dir} && \
./bootstrap.sh --prefix=${install_dir}
./b2 -j ${parallel} toolset=gcc cxxflags=-w install

# Add modulefile
Expand Down
4 changes: 2 additions & 2 deletions scripts/custom/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ mkdir -p ${install_dir}
cd cmake-${version}
./bootstrap \
--prefix=${install_dir} \
--parallel=${parallel} && \
make -j ${parallel} && \
--parallel=${parallel}
make -j ${parallel}
make install

# Add modulefile
Expand Down
15 changes: 8 additions & 7 deletions scripts/custom/install_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,25 @@ if version_lt "${version}" '2.0.0'; then # HDF5 < 2.0.0
CPPFLAGS=-fPIC \
CXXFLAGS=-fPIC \
CC=mpicc \
CXX=mpic++ &&
make -j ${parallel} all &&
make install
CXX=mpic++
make -j ${parallel} all
make install

else # HDF5 >= 2.0.0
# Check cmake version (HDF5 2.0+ requires cmake >= 3.26)
cmake --version

mkdir -p build && cd build
mkdir -p build
Comment thread
kwabenantim marked this conversation as resolved.
cd build
CC=mpicc CXX=mpic++ cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${install_dir} \
-DHDF5_BUILD_HL_LIB=ON \
-DHDF5_BUILD_TOOLS=ON \
-DHDF5_ENABLE_PARALLEL=ON .. &&
make -j ${parallel} &&
make install
-DHDF5_ENABLE_PARALLEL=ON ..
make -j ${parallel}
make install
fi

# Add modulefile
Expand Down
4 changes: 2 additions & 2 deletions scripts/custom/install_petsc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ case ${arch} in
--with-fc=0 \
--with-shared-libraries \
--with-ssl=false \
--with-x=false && \
--with-x=false
make -j ${parallel} all
;;

Expand All @@ -132,7 +132,7 @@ case ${arch} in
--with-fc=0 \
--with-shared-libraries \
--with-ssl=false \
--with-x=false && \
--with-x=false
make -j ${parallel} all
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions scripts/custom/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ mkdir -p ${install_dir}
cd Python-${version}
./configure \
--enable-optimizations \
--prefix=${install_dir} && \
make -j ${parallel} && \
--prefix=${install_dir}
make -j ${parallel}
make install

# Add symbolic links
Expand Down
4 changes: 2 additions & 2 deletions scripts/custom/install_sundials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_MPI=ON \
-DEXAMPLES_ENABLE=OFF .. && \
make -j ${parallel} && \
-DEXAMPLES_ENABLE=OFF ..
make -j ${parallel}
make install

# Add modulefile
Expand Down
15 changes: 13 additions & 2 deletions scripts/custom/install_vtk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,17 @@ if version_eq "${major}.${minor}" '9.2'; then # VTK == 9.2.x
patch -t -p1 < ${patch_dir}/9.2/gcc-13.patch
fi

# VTK 9.4.x patches
if version_eq "${major}.${minor}" '9.4'; then # VTK == 9.4.x
# netCDF 4.9.3 replaced the _FillValue macro with NC_FillValue, which the
# bundled exodusII on VTK < 9.5 still uses, so do a rename if applicable.
netcdf_version="$(pkg-config --modversion netcdf 2>/dev/null || true)"
if [ -n "${netcdf_version}" ] && version_ge "${netcdf_version}" '4.9.3'; then
cd ${src_dir}
patch -t -p1 < ${patch_dir}/9.4/netcdf-fillvalue.patch
fi
fi

# Build and install
install_dir=${base_dir}/opt/vtk/${version}
mkdir -p ${install_dir}
Expand Down Expand Up @@ -231,8 +242,8 @@ cmake \
-DVTK_MODULE_USE_EXTERNAL_VTK_utf8=ON \
-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON \
-DHDF5_IS_PARALLEL=ON \
${src_dir} && \
make -j ${parallel} && \
${src_dir}
make -j ${parallel}
make install

# Add modulefile
Expand Down
8 changes: 4 additions & 4 deletions scripts/custom/install_xercesc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ if [ ${major} -le 2 ]; then
cd xerces-c-src_${ver_si_on}
export XERCESCROOT=$(pwd)
cd src/xercesc
./runConfigure -plinux -cgcc -xg++ -P${install_dir} && \
make -j ${parallel} && \
./runConfigure -plinux -cgcc -xg++ -P${install_dir}
make -j ${parallel}
make install
else
wget -nc https://archive.apache.org/dist/xerces/c/${major}/sources/xerces-c-${version}.tar.gz
tar -xzf xerces-c-${version}.tar.gz
cd xerces-c-${version}
./configure --enable-netaccessor-socket --prefix=${install_dir} && \
make -j ${parallel} && \
./configure --enable-netaccessor-socket --prefix=${install_dir}
make -j ${parallel}
make install
fi

Expand Down
39 changes: 39 additions & 0 deletions scripts/custom/patches/vtk/9.4/netcdf-fillvalue.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Subject: Use NC_FillValue instead of _FillValue in bundled exodusII
Origin: vendor, https://github.com/Unidata/netcdf-c/blob/main/include/netcdf.h

netCDF 4.9.3 removed the _FillValue macro, which used a reserved identifier,
and replaced it with NC_FillValue. VTK's bundled exodusII still refers to
_FillValue, so it fails to compile against netCDF >= 4.9.3 when VTK is built
with VTK_MODULE_USE_EXTERNAL_VTK_netcdf=ON:

ex_put_prop.c:246:54: error: '_FillValue' undeclared (first use in this
function); did you mean 'NC_FillValue'?

Both macros expand to the string "_FillValue", so the attribute name written
to file is unchanged.

This patch is only applied when building against netCDF >= 4.9.3;
see install_vtk.sh.
---
--- vtk9.orig/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c
+++ vtk9/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c
@@ -243,7 +243,7 @@
vals[0] = 0; /* fill value */
/* create attribute to cause variable to fill with zeros per routine spec
*/
- if ((status = nc_put_att_longlong(exoid, propid, _FillValue, int_type, 1, vals)) != NC_NOERR) {
+ if ((status = nc_put_att_longlong(exoid, propid, NC_FillValue, int_type, 1, vals)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH,
"ERROR: failed to create property name fill attribute in file id %d", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
--- vtk9.orig/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c
+++ vtk9/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c
@@ -172,7 +172,7 @@

/* create attribute to cause variable to fill with zeros per routine spec
*/
- if ((status = nc_put_att_longlong(exoid, propid, _FillValue, int_type, 1, vals)) != NC_NOERR) {
+ if ((status = nc_put_att_longlong(exoid, propid, NC_FillValue, int_type, 1, vals)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH,
"ERROR: failed to create property name fill attribute in file id %d", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
2 changes: 2 additions & 0 deletions scripts/custom/setup_ubuntu_2204.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ apt-get install -y --no-install-recommends \
doxygen \
git \
lcov \
patch \
pkg-config \
python-is-python3 \
python3 \
python3-dev \
Expand Down
2 changes: 2 additions & 0 deletions scripts/custom/setup_ubuntu_2404.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ apt-get install -y --no-install-recommends \
doxygen \
git \
lcov \
patch \
pkg-config \
python-is-python3 \
python3 \
python3-dev \
Expand Down
2 changes: 2 additions & 0 deletions scripts/custom/setup_ubuntu_2604.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ apt-get install -y --no-install-recommends \
doxygen \
git \
lcov \
patch \
pkg-config \
python-is-python3 \
python3 \
python3-dev \
Expand Down