Skip to content

Commit f290bbc

Browse files
committed
adds github actions hdf5 compilation test
1 parent 0cf3984 commit f290bbc

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

.github/scripts/run_install.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,25 @@ sudo apt-get install -yq --no-install-recommends gfortran g++ openmpi-bin libope
1818
if [[ $? -ne 0 ]]; then exit 1; fi
1919
echo
2020

21+
# parallel hdf5
22+
if [[ "${TEST}" == *"with-hdf5"* ]]; then
23+
echo
24+
echo "additional installation: ${TEST}"
25+
echo
26+
sudo apt-get install -yq --no-install-recommends libhdf5-mpi-dev
27+
## checks installation paths
28+
#echo
29+
#dpkg -L libhdf5-mpi-dev
30+
#echo
31+
#dpkg -L libhdf5-openmpi-dev
32+
#echo
33+
#echo "hdf5 module paths:"
34+
#find /usr/ -iname 'hdf5.mod'
35+
#echo "hdf5 library paths:"
36+
#find /usr/ -iname 'libhdf5hl_fortran*'
37+
#echo
38+
fi
39+
2140
## NetCDF
2241
if [ "${NETCDF}" == "true" ]; then
2342
echo

.github/scripts/run_tests.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ echo
2323
# bash function for checking seismogram output with reference solutions
2424
my_test(){
2525
echo "testing seismograms:"
26-
ln -s $WORKDIR/utils/compare_seismogram_correlations.py
26+
ln -s $WORKDIR/utils/scripts/compare_seismogram_correlations.py
2727
./compare_seismogram_correlations.py REF_SEIS/ OUTPUT_FILES/
2828
if [[ $? -ne 0 ]]; then exit 1; fi
2929
./compare_seismogram_correlations.py REF_SEIS/ OUTPUT_FILES/ | grep min/max | cut -d \| -f 3 | awk '{print "correlation:",$1; if ($1 < 0.999 ){print $1,"failed"; exit 1;}else{ print $1,"good"; exit 0;}}'
@@ -65,6 +65,18 @@ if [ "${FULL_GRAVITY}" == "true" ]; then
6565
echo "NSTEP = 2" >> DATA/Par_file
6666
fi
6767

68+
# hdf5 i/o example
69+
if [[ "${TEST}" == *"with-hdf5"* ]]; then
70+
echo
71+
echo "test run: ${TEST}"
72+
echo
73+
sed -i "s:^HDF5_ENABLED .*:HDF5_ENABLED = .true.:" DATA/Par_file
74+
#sed -i "s:^HDF5_FOR_MOVIES .*:HDF5_FOR_MOVIES = .true.:" DATA/Par_file
75+
#sed -i "s:^HDF5_IO_NODES .*:HDF5_IO_NODES = 1:" DATA/Par_file
76+
# replaces run script
77+
#cp -v run_this_example_HDF5_IO_server.sh run_this_example.sh
78+
fi
79+
6880
# adios
6981
if [ "${ADIOS2}" == "true" ]; then
7082
# turns on ADIOS

.github/workflows/CI.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,3 +552,30 @@ jobs:
552552
RUN_KERNEL: true
553553
run: ./.github/scripts/run_tests.sh
554554
shell: bash
555+
556+
linuxTest_11:
557+
name: Test run example 11 - regional_Greece_small hdf5 i/o
558+
runs-on: ubuntu-latest
559+
needs: [linuxCheck]
560+
561+
steps:
562+
- uses: actions/checkout@v4
563+
564+
- name: Install packages
565+
env:
566+
TEST: with-hdf5
567+
run: ./.github/scripts/run_install.sh
568+
shell: bash
569+
570+
- name: Run build
571+
env:
572+
TESTFLAGS: --with-hdf5 HDF5_INC=/usr/include/hdf5/openmpi/ HDF5_LIBS=-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi
573+
run: ./.github/scripts/run_build.sh
574+
shell: bash
575+
576+
- name: Run test
577+
env:
578+
TEST: with-hdf5
579+
TESTDIR: EXAMPLES/regional_Greece_small
580+
run: ./.github/scripts/run_tests.sh
581+
shell: bash

0 commit comments

Comments
 (0)