Skip to content

Commit

Permalink
updates github scripts (for hdf5); sets hdf5 Par_file defaults to .fa…
Browse files Browse the repository at this point in the history
…lse.
  • Loading branch information
danielpeter committed Nov 6, 2024
1 parent 2f4fe17 commit 96ab351
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
13 changes: 12 additions & 1 deletion .github/scripts/run_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/run_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion EXAMPLES/regional_s40rts/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -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.

2 changes: 1 addition & 1 deletion EXAMPLES/regional_small_adjoint/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -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.

1 change: 0 additions & 1 deletion src/shared/read_parameter_file.F90
Original file line number Diff line number Diff line change
Expand Up @@ -437,5 +437,4 @@ subroutine read_parameter_file()
endif
#endif


end subroutine read_parameter_file

0 comments on commit 96ab351

Please sign in to comment.