Skip to content

Commit

Permalink
Merge pull request #62 from Chaste/system-image-modulefiles
Browse files Browse the repository at this point in the history
Boost config for system images
  • Loading branch information
kwabenantim authored Dec 11, 2023
2 parents 18b6444 + d5fce71 commit cd44d45
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 49 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
build-args: |
BASE=jammy
XSD=4.0.0
XERCESC=3.2.4
SUNDIALS=5.8.0
BOOST=1.74.0
VTK=9.1.0
PETSC=3.15.5
HDF5=1.10.8
XERCESC=3.2.2
SUNDIALS=3.1.2
BOOST=1.67.0
VTK=6.3.0
PETSC=3.12.4
HDF5=1.10.4
steps:
- name: Checkout
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/image-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,7 @@ jobs:
- name: cmake configure
run: |
source init.sh
su -m runner -c "cmake \
-DBoost_NO_BOOST_CMAKE=ON \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBOOST_ROOT=${BOOST_ROOT} \
-DCMAKE_BUILD_TYPE=Release \
../Chaste"
su -m runner -c "cmake -DCMAKE_BUILD_TYPE=Release ../Chaste"
working-directory: chaste-build-dir

- name: compile build info
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/ubuntu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,7 @@ jobs:
module load vtk/${{ matrix.vtk_ver }}
module load petsc_hdf5/${{ matrix.petsc_ver }}_${{ matrix.hdf5_ver }}/${{ matrix.petsc_arch }}
cmake \
-DBoost_NO_BOOST_CMAKE=ON \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBOOST_ROOT=${BOOST_ROOT} \
-DCMAKE_PREFIX_PATH="${SUNDIALS_ROOT};${VTK_ROOT};${XERCESC_ROOT};${XSD_ROOT}" \
-DCMAKE_BUILD_TYPE=Release \
..
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel $(nproc) --target TestChasteBuildInfo
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/version-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,8 @@ jobs:
mkdir -p Chaste/build
cd Chaste/build
nice -n ${{ env.niceness }} cmake \
-DBoost_NO_BOOST_CMAKE=ON \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBOOST_ROOT=${BOOST_ROOT} \
-DChaste_USE_CVODE=${use_cvode} \
-DChaste_USE_VTK=${use_vtk} \
-DCMAKE_PREFIX_PATH="${XERCESC_ROOT};${XSD_ROOT};${SUNDIALS_ROOT};${VTK_ROOT}" \
-DCMAKE_BUILD_TYPE=Release \
..
Expand Down
10 changes: 6 additions & 4 deletions scripts/install_boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if [ -z "${base_dir}" ]; then usage; fi

parallel="${parallel:-$(nproc)}"

# Modulefile pointing to system version
# Modulefile for system version
if [ "$version" = "system" ]; then
version=$(dpkg -s libboost-dev | grep 'Version:' | cut -d' ' -f2 | cut -d. -f1,2,3)

Expand Down Expand Up @@ -65,9 +65,8 @@ proc ModulesHelp { } {
module-whatis "This adds the environment variables for boost ${version}"
setenv BOOST_ROOT /usr
setenv BOOST_INCLUDEDIR /usr/include/boost
setenv BOOST_LIBRARYDIR /usr/lib/x86_64-linux-gnu
setenv Boost_NO_BOOST_CMAKE OFF
setenv Boost_NO_SYSTEM_PATHS OFF
conflict boost
EOF
Expand Down Expand Up @@ -175,5 +174,8 @@ prepend-path CPLUS_INCLUDE_PATH ${install_dir}/include
prepend-path CMAKE_PREFIX_PATH ${install_dir}
setenv Boost_NO_BOOST_CMAKE ON
setenv Boost_NO_SYSTEM_PATHS ON
conflict boost
EOF
7 changes: 2 additions & 5 deletions scripts/install_petsc_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if [[ ! (${petsc_arch} = 'linux-gnu'
usage
fi

# Modulefile pointing to system version
# Modulefile for system version
if [[ ("$petsc_version" = "system")
|| ("$hdf5_version" = "system")
|| ("$petsc_arch" = "system") ]]; then
Expand All @@ -63,7 +63,7 @@ if [[ ("$petsc_version" = "system")

mkdir -p ${base_dir}/modulefiles/petsc_hdf5/${petsc_version}_${hdf5_version}
cd ${base_dir}/modulefiles/petsc_hdf5/${petsc_version}_${hdf5_version}
cat <<EOF > ${petsc_arch}
cat <<EOF > linux-gnu
#%Module1.0#####################################################################
###
## petsc_hdf5 ${petsc_version}_${hdf5_version}/${petsc_arch} modulefile
Expand Down Expand Up @@ -91,9 +91,6 @@ proc ModulesHelp { } {
module-whatis "This adds the environment variables for petsc ${petsc_version} and hdf5 ${hdf5_version}, with PETSC_ARCH=${petsc_arch}"
setenv HDF5_ROOT /usr
setenv PARMETIS_ROOT /usr
conflict petsc
conflict hdf5
conflict petsc_hdf5
Expand Down
4 changes: 1 addition & 3 deletions scripts/install_sundials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ -z "${base_dir}" ]; then usage; fi

parallel="${parallel:-$(nproc)}"

# Modulefile pointing to system version
# Modulefile for system version
if [ "$version" = "system" ]; then
version=$(dpkg -s libsundials-dev | grep 'Version:' | cut -d' ' -f2 | cut -d. -f1,2,3 | cut -d+ -f1)

Expand Down Expand Up @@ -63,8 +63,6 @@ proc ModulesHelp { } {
module-whatis "This adds the environment variables for sundials ${version}"
setenv SUNDIALS_ROOT /usr
conflict sundials
EOF
exit 0
Expand Down
9 changes: 3 additions & 6 deletions scripts/install_vtk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if [ -z "${base_dir}" ]; then usage; fi

parallel="${parallel:-$(nproc)}"

# Modulefile pointing to system version
# Modulefile for system version
if [ "$version" = "system" ]; then
version=""
for i in 9 8 7 6
Expand All @@ -57,9 +57,8 @@ if [ "$version" = "system" ]; then
## vtk ${version} modulefile
##
proc ModulesTest { } {
set paths "[getenv VTK_ROOT]
[getenv VTK_ROOT]/include/vtk-${major}.${minor}
[getenv VTK_ROOT]/lib"
set paths "/usr/include/vtk-${major}.${minor}
/usr/lib/x86_64-linux-gnu/libvtkCommonCore-${major}.${minor}.so"
foreach path \$paths {
if { ![file exists \$path] } {
Expand All @@ -76,8 +75,6 @@ proc ModulesHelp { } {
module-whatis "This adds the environment variables for vtk ${version}"
setenv VTK_ROOT /usr
conflict vtk
EOF
exit 0
Expand Down
6 changes: 1 addition & 5 deletions scripts/install_xercesc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ -z "${base_dir}" ]; then usage; fi

parallel="${parallel:-$(nproc)}"

# Modulefile pointing to system version
# Modulefile for system version
if [ "$version" = "system" ]; then
version=$(dpkg -s libxerces-c-dev | grep 'Version:' | cut -d' ' -f2 | cut -d. -f1,2,3 | cut -d+ -f1)

Expand Down Expand Up @@ -63,10 +63,6 @@ proc ModulesHelp { } {
module-whatis "This adds the environment variables for xercesc ${version}"
setenv XERCESC_ROOT /usr
setenv XERCESC_INCLUDE /usr/include/xercesc
setenv XERCESC_LIBRARY /usr/lib/x86_64-linux-gnu
conflict xercesc
EOF
exit 0
Expand Down
4 changes: 1 addition & 3 deletions scripts/install_xsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ done
if [ -z "${version}" ]; then usage; fi
if [ -z "${base_dir}" ]; then usage; fi

# Modulefile pointing to system version
# Modulefile for system version
if [ "$version" = "system" ]; then
version=$(dpkg -s xsdcxx | grep 'Version:' | cut -d' ' -f2 | cut -d. -f1,2,3 | cut -d- -f1)

Expand Down Expand Up @@ -57,8 +57,6 @@ proc ModulesHelp { } {
module-whatis "This adds the environment variables for xsd ${version}"
setenv XSD_ROOT /usr
conflict xsd
EOF
exit 0
Expand Down

0 comments on commit cd44d45

Please sign in to comment.