Skip to content

Commit

Permalink
updates testing w/ HDF5
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed Nov 14, 2024
1 parent eaf283e commit 5868a7e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
16 changes: 15 additions & 1 deletion .github/scripts/run_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ else
adios=()
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

## HIP
if [ "${HIP}" == "true" ]; then
echo
Expand All @@ -55,10 +65,14 @@ echo
echo "configuration:"
echo

# split TESTFLAGS into individual items
set -- ${TESTFLAGS}

./configure \
"${adios[@]}" \
"${hdf[@]}" \
"${hip[@]}" \
FC=gfortran MPIFC=mpif90 CC=gcc ${TESTFLAGS}
FC=gfortran MPIFC=mpif90 CC=gcc "$@"

# checks
if [[ $? -ne 0 ]]; then echo "configuration failed:"; cat config.log; echo ""; echo "exiting..."; exit 1; fi
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/run_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ if [[ $? -ne 0 ]]; then exit 1; fi
# fortran/openMPI compiler
sudo apt-get install -yq --no-install-recommends gfortran g++ openmpi-bin libopenmpi-dev

# parallel hdf5
if [[ "${TEST}" == *"with-hdf5"* ]]; then
## parallel HDF5
if [ "${HDF5}" == "true" ]; then
echo
echo "additional installation: ${TEST}"
echo "HDF5 additional installation:"
echo
sudo apt-get install -yq --no-install-recommends libhdf5-mpi-dev
## checks installation paths
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ if [ "$TESTDIR" == "EXAMPLES/applications/meshfem3D_examples/sep_bathymetry/" ];
sed -i "s:^NSTEP .*:NSTEP = 1000:" DATA/Par_file
fi

## hdf5 i/o example
if [[ "${TEST}" == *"with-hdf5"* ]]; then
## HDF5 - i/o example
if [ "${HDF5}" == "true" ]; then
echo
echo "test run: ${TEST}"
echo "test run w/ HDF5"
echo
# turns on HDF5
echo "turning on HDF5"
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ jobs:

- name: Run build
env:
TESTFLAGS: 'FLAGS_CHECK="-O3 -mcmodel=medium -std=f2008 -Wall -Wno-do-subscript -Wno-conversion -Wno-maybe-uninitialized"'
TESTFLAGS: FLAGS_CHECK="-O3 -mcmodel=medium -std=f2008 -Wall -Wno-do-subscript -Wno-conversion -Wno-maybe-uninitialized"
run: ./.github/scripts/run_build.sh
shell: bash

Expand Down Expand Up @@ -805,7 +805,7 @@ jobs:
shell: bash

linuxTest_20:
name: Test 20 - socal1D hdf5 i/o
name: Test 20 - socal1D HDF5 I/O
runs-on: ubuntu-latest
needs: [linuxCheck]

Expand All @@ -814,21 +814,22 @@ jobs:

- name: Install packages
env:
TEST: with-hdf5
HDF5: true
run: ./.github/scripts/run_install.sh
shell: bash

- name: Run build
env:
TESTFLAGS: --with-mpi --with-hdf5 HDF5_INC=/usr/include/hdf5/openmpi/ HDF5_LIBS=-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi
TESTFLAGS: --with-mpi
HDF5: true
run: ./.github/scripts/run_build.sh
shell: bash

- name: Run test
env:
TEST: with-hdf5
TESTDIR: EXAMPLES/applications/meshfem3D_examples/socal1D/
TESTID: 0
HDF5: true
run: ./.github/scripts/run_tests.sh
shell: bash

Expand Down

0 comments on commit 5868a7e

Please sign in to comment.