diff --git a/.github/scripts/run_install.sh b/.github/scripts/run_install.sh index d47694773..689781245 100755 --- a/.github/scripts/run_install.sh +++ b/.github/scripts/run_install.sh @@ -18,6 +18,25 @@ sudo apt-get install -yq --no-install-recommends gfortran g++ openmpi-bin libope if [[ $? -ne 0 ]]; then exit 1; fi echo +# parallel hdf5 +if [[ "${TEST}" == *"with-hdf5"* ]]; then + echo + echo "additional installation: ${TEST}" + echo + sudo apt-get install -yq --no-install-recommends libhdf5-mpi-dev + ## checks installation paths + #echo + #dpkg -L libhdf5-mpi-dev + #echo + #dpkg -L libhdf5-openmpi-dev + #echo + #echo "hdf5 module paths:" + #find /usr/ -iname 'hdf5.mod' + #echo "hdf5 library paths:" + #find /usr/ -iname 'libhdf5hl_fortran*' + #echo +fi + ## NetCDF if [ "${NETCDF}" == "true" ]; then echo diff --git a/.github/scripts/run_tests.sh b/.github/scripts/run_tests.sh index 8e6119579..4d21fc64c 100755 --- a/.github/scripts/run_tests.sh +++ b/.github/scripts/run_tests.sh @@ -23,7 +23,7 @@ echo # bash function for checking seismogram output with reference solutions my_test(){ echo "testing seismograms:" - ln -s $WORKDIR/utils/compare_seismogram_correlations.py + ln -s $WORKDIR/utils/scripts/compare_seismogram_correlations.py ./compare_seismogram_correlations.py REF_SEIS/ OUTPUT_FILES/ if [[ $? -ne 0 ]]; then exit 1; fi ./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 echo "NSTEP = 2" >> DATA/Par_file fi +# hdf5 i/o example +if [[ "${TEST}" == *"with-hdf5"* ]]; then + echo + echo "test run: ${TEST}" + echo + sed -i "s:^HDF5_ENABLED .*:HDF5_ENABLED = .true.:" DATA/Par_file + #sed -i "s:^HDF5_FOR_MOVIES .*:HDF5_FOR_MOVIES = .true.:" DATA/Par_file + #sed -i "s:^HDF5_IO_NODES .*:HDF5_IO_NODES = 1:" DATA/Par_file + # replaces run script + #cp -v run_this_example_HDF5_IO_server.sh run_this_example.sh +fi + # adios if [ "${ADIOS2}" == "true" ]; then # turns on ADIOS diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b73443e9f..17ea70be1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -552,3 +552,30 @@ jobs: RUN_KERNEL: true run: ./.github/scripts/run_tests.sh shell: bash + + linuxTest_11: + name: Test run example 11 - regional_Greece_small hdf5 i/o + runs-on: ubuntu-latest + needs: [linuxCheck] + + steps: + - uses: actions/checkout@v4 + + - name: Install packages + env: + TEST: with-hdf5 + run: ./.github/scripts/run_install.sh + shell: bash + + - name: Run build + env: + TESTFLAGS: --with-hdf5 HDF5_INC=/usr/include/hdf5/openmpi/ HDF5_LIBS=-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi + run: ./.github/scripts/run_build.sh + shell: bash + + - name: Run test + env: + TEST: with-hdf5 + TESTDIR: EXAMPLES/regional_Greece_small + run: ./.github/scripts/run_tests.sh + shell: bash