Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ fi
if [ "${TESTDIR}" == "EXAMPLES/global_small" ]; then
sed -i "s:^RECORD_LENGTH_IN_MINUTES .*:RECORD_LENGTH_IN_MINUTES = 0.1:" DATA/Par_file
fi
if [ "${TESTDIR}" == "EXAMPLES/regional_Berkeley" ]; then
sed -i "s:^RECORD_LENGTH_IN_MINUTES .*:RECORD_LENGTH_IN_MINUTES = 4.0:" DATA/Par_file # needs increase due to source time function
fi

# debug
if [ "${DEBUG}" == "true" ]; then
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -663,3 +663,27 @@ jobs:
GPU: true
run: ./.github/scripts/run_tests.sh
shell: bash

linuxTest_15:
name: Test 15 - regional_Berkeley
runs-on: ubuntu-latest
needs: [linuxCheck]

steps:
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
shell: bash

- name: Run build
env:
TESTFLAGS: --enable-vectorization
run: ./.github/scripts/run_build.sh
shell: bash

- name: Run test
env:
TESTDIR: EXAMPLES/regional_Berkeley
run: ./.github/scripts/run_tests.sh
shell: bash
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/geodynamics/autoconf_cig.git
[submodule "external_libs/ROCm-HIP-CPU"]
path = external_libs/ROCm-HIP-CPU
url = git@github.com:ROCm/HIP-CPU.git
url = https://github.com/ROCm/HIP-CPU.git
32 changes: 32 additions & 0 deletions .travis/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "1" ]; then
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
./run_this_example.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# cleanup
rm -rf OUTPUT_FILES* DATABASES_MPI*
cd $WORKDIR
fi
echo -en 'travis_fold:end:coverage.regular-kernel\\r'
Expand All @@ -197,6 +199,8 @@ if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "1" ]; then
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
./run_this_example.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# cleanup
rm -rf OUTPUT_FILES* DATABASES_MPI*
cd $WORKDIR
fi
echo -en 'travis_fold:end:coverage.regional-LDDRK\\r'
Expand All @@ -215,6 +219,8 @@ if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "2" ]; then
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
./run_this_example.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# cleanup
rm -rf OUTPUT_FILES* DATABASES_MPI*
cd $WORKDIR
fi
echo -en 'travis_fold:end:coverage.regional-s40rts\\r'
Expand All @@ -225,6 +231,7 @@ echo -en 'travis_fold:end:coverage.regional-s40rts\\r'
## tested by github actions
## - EXAMPLES/regional_Greece_small
## - EXAMPLES/regional_sgloberani
## - EXAMPLES/regional_Berkeley
## - EXAMPLES/point_force
## - EXAMPLES/moon_global
## - EXAMPLES/mars_regional
Expand All @@ -244,6 +251,8 @@ if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "1" ]; then
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
./run_this_example.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# cleanup
rm -rf OUTPUT_FILES* DATABASES_MPI*
cd $WORKDIR
fi
echo -en 'travis_fold:end:coverage.point-force\\r'
Expand All @@ -261,6 +270,8 @@ if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "2" ]; then
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
./run_this_example.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# cleanup
rm -rf OUTPUT_FILES* DATABASES_MPI*
cd $WORKDIR
fi
echo -en 'travis_fold:end:coverage.moon-global\\r'
Expand All @@ -278,10 +289,31 @@ if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "2" ]; then
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
./run_this_example.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# cleanup
rm -rf OUTPUT_FILES* DATABASES_MPI*
cd $WORKDIR
fi
echo -en 'travis_fold:end:coverage.mars-regional\\r'

echo 'Coverage...' && echo -en 'travis_fold:start:coverage.regional-Berkeley\\r'
if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "2" ]; then
##
## testing regional_Berkeley
##
echo "##################################################################"
echo "EXAMPLES/regional_Berkeley/"
echo
cd EXAMPLES/regional_Berkeley/
sed -i "s:^RECORD_LENGTH_IN_MINUTES .*:RECORD_LENGTH_IN_MINUTES = 0.0:" DATA/Par_file
sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
./run_this_example.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# cleanup
rm -rf OUTPUT_FILES* DATABASES_MPI*
cd $WORKDIR
fi
echo -en 'travis_fold:end:coverage.regional-Berkeley\\r'


# done
echo "all done"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
# (more exclude directories can be appended in this list)
EXCLUDE_DIR_LIST = [ \
"unused_routines", \
"small_SEM_solvers_in_Fortran_and_C_without_MPI_to_learn" \
"small_SEM_solvers_in_Fortran_and_C_without_MPI_to_learn", \
"tmp"
]

# optional parameters in Par_file
Expand All @@ -56,7 +57,13 @@
"SCATTERING_STRENGTH", \
"SCATTERING_CORRELATION", \
"SHIFT_SIMULTANEOUS_RUNS", \
"FILESYSTEM_IO_BANDWIDTH" \
"FILESYSTEM_IO_BANDWIDTH", \
"STF_IS_UCB_HEAVISIDE", \
"SOURCE_T1", \
"SOURCE_T2", \
"SOURCE_T3", \
"SOURCE_T4", \
"TAU" \
]

#
Expand Down
10 changes: 10 additions & 0 deletions EXAMPLES/regional_Berkeley/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ USE_MONOCHROMATIC_CMT_SOURCE = .false.
# print source time function
PRINT_SOURCE_TIME_FUNCTION = .true.

## Berkeley source time function
STF_IS_UCB_HEAVISIDE = .true.
# UCB source frequency content (i.e., heaviside function)
SOURCE_T1 = 500.d0
SOURCE_T2 = 400.d0
SOURCE_T3 = 50.d0
SOURCE_T4 = 40.d0
# UCB source time shift
TAU = 500.d0

#-----------------------------------------------------------
#
# Seismograms
Expand Down
32 changes: 15 additions & 17 deletions EXAMPLES/regional_Berkeley/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@
README
----------------------------------------------------------

This example creates a regional mesh using transversely isotropic PREM
This example creates a regional mesh using the 3D Berkeley model SEMUCB_A3d
and runs a spectral-element simulation.

In the Par_file, we also add the following parameters to use a specific Berkeley source time function:
```
## Berkeley source time function
STF_IS_UCB_HEAVISIDE = .true.
# UCB source frequency content (i.e., heaviside function)
SOURCE_T1 = 500.d0
SOURCE_T2 = 400.d0
SOURCE_T3 = 50.d0
SOURCE_T4 = 40.d0
# UCB source time shift
TAU = 500.d0
```

The simulation is setup to use 4 CPUs only, thus can be run locally on a desktop machine
(needs to have MPI installed).

Expand All @@ -18,24 +31,9 @@ type:
to setup this directory for the simulation and to run a corresponding
script "run_mesher_solver.bash".

The simulation is accurate down to a shortest period of ~ 15 s.
The simulation is accurate down to a shortest period of ~ 21 s.
(minimum period resolved ~ (256/NEX_XI) * (ANGULAR_WIDTH_XI_IN_DEGREES/90) * 17)

Reference seismograms for comparisons are provided in the directory: REF_SEIS/


2. kernel simulation:
---------------------

type:
./run_this_example.kernel.sh

to setup this directory for the simulation and to submit a corresponding
script "run_mesher_solver.kernel.bash".

The simulation will use the adjoint source given in directory: SEM/
to compute a travel-time sensitivity kernel.


Please modify these scripts according to your specifics.

Loading