diff --git a/.github/scripts/run_build.sh b/.github/scripts/run_build.sh index ccff70f9c..e94b15060 100755 --- a/.github/scripts/run_build.sh +++ b/.github/scripts/run_build.sh @@ -60,6 +60,16 @@ else petsc=() fi +## HDF5 +if [ "${HDF5}" == "true" ]; then + echo + echo "enabling HDF5" + echo + hdf=(--with-hdf5 HDF5_INC="/usr/include/hdf5/openmpi/" HDF5_LIBS="-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi" ) +else + hdf=() +fi + # configuration echo echo "configuration:" @@ -68,8 +78,9 @@ echo ./configure \ ${adios[@]} \ ${netcdf[@]} \ +${hdf[@]} \ ${petsc[@]} \ -FC=gfortran MPIFC=mpif90 CC=gcc ${TESTFLAGS} +FC=gfortran MPIFC=mpif90 CC=gcc "${TESTFLAGS}" # checks if [[ $? -ne 0 ]]; then echo "configuration failed:"; cat config.log; echo ""; echo "exiting..."; exit 1; fi diff --git a/.github/scripts/run_install.sh b/.github/scripts/run_install.sh index 689781245..7614c9d7d 100755 --- a/.github/scripts/run_install.sh +++ b/.github/scripts/run_install.sh @@ -19,9 +19,9 @@ if [[ $? -ne 0 ]]; then exit 1; fi echo # parallel hdf5 -if [[ "${TEST}" == *"with-hdf5"* ]]; then +if [ "${HDF5}" == "true" ]; then echo - echo "additional installation: ${TEST}" + echo "HDF5 installation:" echo sudo apt-get install -yq --no-install-recommends libhdf5-mpi-dev ## checks installation paths diff --git a/.github/scripts/run_tests.sh b/.github/scripts/run_tests.sh index 4d21fc64c..b20501549 100755 --- a/.github/scripts/run_tests.sh +++ b/.github/scripts/run_tests.sh @@ -66,9 +66,9 @@ if [ "${FULL_GRAVITY}" == "true" ]; then fi # hdf5 i/o example -if [[ "${TEST}" == *"with-hdf5"* ]]; then +if [ "${HDF5}" == "true" ]; then echo - echo "test run: ${TEST}" + echo "HDF5 enabled test run" 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 diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 17ea70be1..3e1bb7abb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -563,19 +563,20 @@ jobs: - name: Install packages env: - TEST: with-hdf5 + HDF5: true 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 + TESTFLAGS: # no extra flags + HDF5: true run: ./.github/scripts/run_build.sh shell: bash - name: Run test env: - TEST: with-hdf5 TESTDIR: EXAMPLES/regional_Greece_small + HDF5: true run: ./.github/scripts/run_tests.sh shell: bash diff --git a/EXAMPLES/regional_s40rts/DATA/Par_file b/EXAMPLES/regional_s40rts/DATA/Par_file index b0602efc4..7120a833c 100644 --- a/EXAMPLES/regional_s40rts/DATA/Par_file +++ b/EXAMPLES/regional_s40rts/DATA/Par_file @@ -433,5 +433,5 @@ ADIOS_FOR_UNDO_ATTENUATION = .true. # HDF5 Database I/O # (note the flags for HDF5 and ADIOS are mutually exclusive, only one can be used) -HDF5_ENABLED = .true. +HDF5_ENABLED = .false. diff --git a/EXAMPLES/regional_small_adjoint/DATA/Par_file b/EXAMPLES/regional_small_adjoint/DATA/Par_file index 0e0ecb4bc..07ae44976 100644 --- a/EXAMPLES/regional_small_adjoint/DATA/Par_file +++ b/EXAMPLES/regional_small_adjoint/DATA/Par_file @@ -433,5 +433,5 @@ ADIOS_FOR_UNDO_ATTENUATION = .true. # HDF5 Database I/O # (note the flags for HDF5 and ADIOS are mutually exclusive, only one can be used) -HDF5_ENABLED = .true. +HDF5_ENABLED = .false. diff --git a/src/shared/read_parameter_file.F90 b/src/shared/read_parameter_file.F90 index b30892b62..6b996c63b 100644 --- a/src/shared/read_parameter_file.F90 +++ b/src/shared/read_parameter_file.F90 @@ -437,5 +437,4 @@ subroutine read_parameter_file() endif #endif - end subroutine read_parameter_file