Skip to content

Commit

Permalink
Merge pull request #1231 from danielpeter/devel
Browse files Browse the repository at this point in the history
code cleaning and test updates
  • Loading branch information
danielpeter authored Jun 5, 2024
2 parents 875b5d0 + e524e89 commit e70c9c8
Show file tree
Hide file tree
Showing 105 changed files with 512 additions and 361 deletions.
91 changes: 73 additions & 18 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check for changes
id: diff
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
needs: changesCheck

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -104,9 +104,16 @@ jobs:
echo ""
## avoids sed -i '' issue on MacOS, using gnu sed to have the same sed command lines as in linux
brew install gnu-sed
echo "PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" >> $GITHUB_ENV
echo "PATH=/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" >> $GITHUB_ENV
## OpenMP
echo "OMP_NUM_THREADS=2" >> $GITHUB_ENV
## MPI
echo
echo "MPI environment:"
echo "mpif90 on path: $(which mpif90)"
echo
# add OpenMPI path to have ./configure detect mpi.h
echo "MPI_INC=/opt/homebrew/include" >> $GITHUB_ENV
## avoids MPI issue with number of slots
echo "OMPI_MCA_rmaps_base_oversubscribe=1" >> $GITHUB_ENV
echo "OMPI_MCA_rmaps_base_inherit=1" >> $GITHUB_ENV
Expand Down Expand Up @@ -139,7 +146,7 @@ jobs:
os: [ubuntu-latest,ubuntu-20.04]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -158,7 +165,7 @@ jobs:
needs: changesCheck

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache Intel oneapi packages
id: cache-intel-oneapi
Expand Down Expand Up @@ -294,7 +301,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -312,7 +319,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -336,7 +343,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -361,7 +368,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -386,7 +393,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -410,7 +417,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -434,7 +441,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -459,7 +466,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -483,7 +490,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -507,7 +514,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -531,7 +538,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -556,7 +563,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -580,7 +587,7 @@ jobs:
needs: [linuxCheck]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install packages
run: ./.github/scripts/run_install.sh
Expand All @@ -598,4 +605,52 @@ jobs:
run: ./.github/scripts/run_tests.sh
shell: bash

linuxTest_13:
name: Test run example 13 - Gmsh w/ Stacey
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: --with-mpi
run: ./.github/scripts/run_build.sh
shell: bash

- name: Run test
env:
TESTDIR: EXAMPLES/Gmsh_example_Stacey_MPI
run: ./.github/scripts/run_tests.sh
shell: bash

linuxTest_14:
name: Test run example 14 - EM
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-debug
run: ./.github/scripts/run_build.sh
shell: bash

- name: Run test
env:
TESTDIR: EXAMPLES/electromagnetic_GPR_TM
DEBUG: true
run: ./.github/scripts/run_tests.sh
shell: bash

4 changes: 2 additions & 2 deletions DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DT = 1.1d-3
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
# set the type of calculation (P-SV (EM TE) or SH/membrane waves (EM TM))
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
Expand Down Expand Up @@ -96,7 +96,7 @@ freq0_poroelastic = 10 # frequency for viscous attenua
# for electromagnetic attenuation
ATTENUATION_PERMITTIVITY = .false. # turn permittivity (Zener model) attenuation on or off for electromagnetic material
ATTENUATION_CONDUCTIVITY = .false. # turn conductivity (Kelvin-Voigt model) attenuation on or off for electromagnetic material
f0_electromagnetic = 1d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file
f0_electromagnetic = 1.d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE_FORWARD
# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLES/BENCHIE_water_PVC/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DT = 4.5d-8
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
# set the type of calculation (P-SV (EM TE) or SH/membrane waves (EM TM))
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
Expand Down Expand Up @@ -96,7 +96,7 @@ freq0_poroelastic = 10 # frequency for viscous attenua
# for electromagnetic attenuation
ATTENUATION_PERMITTIVITY = .false. # turn permittivity (Zener model) attenuation on or off for electromagnetic material
ATTENUATION_CONDUCTIVITY = .false. # turn conductivity (Kelvin-Voigt model) attenuation on or off for electromagnetic material
f0_electromagnetic = 1d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file
f0_electromagnetic = 1.d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE_FORWARD
# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations
Expand Down Expand Up @@ -280,6 +280,7 @@ nbmodels = 2
# anisotropic: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 QKappa Qmu
# anisotropic in AXISYM: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 QKappa Qmu
# poroelastic: model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu
# electromagnetic: model_number 4 mu0 e0 e11(e0) e33(e0) sig11 sig33 Qe11 Qe33 Qs11 Qs33 0 0 0
# tomo: model_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0
#
# note: When viscoelasticity or viscoacousticity is turned on,
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DT = 0.00035
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
# set the type of calculation (P-SV (EM TE) or SH/membrane waves (EM TM))
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
Expand Down Expand Up @@ -96,7 +96,7 @@ freq0_poroelastic = 10 # frequency for viscous attenua
# for electromagnetic attenuation
ATTENUATION_PERMITTIVITY = .false. # turn permittivity (Zener model) attenuation on or off for electromagnetic material
ATTENUATION_CONDUCTIVITY = .false. # turn conductivity (Kelvin-Voigt model) attenuation on or off for electromagnetic material
f0_electromagnetic = 1d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file
f0_electromagnetic = 1.d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE_FORWARD
# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations
Expand Down Expand Up @@ -272,6 +272,7 @@ nbmodels = 1
# anisotropic: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 QKappa Qmu
# anisotropic in AXISYM: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 QKappa Qmu
# poroelastic: model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu
# electromagnetic: model_number 4 mu0 e0 e11(e0) e33(e0) sig11 sig33 Qe11 Qe33 Qs11 Qs33 0 0 0
# tomo: model_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0
#
# note: When viscoelasticity or viscoacousticity is turned on,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DT = 0.00025
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
# set the type of calculation (P-SV (EM TE) or SH/membrane waves (EM TM))
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
Expand Down Expand Up @@ -96,7 +96,7 @@ freq0_poroelastic = 10 # frequency for viscous attenua
# for electromagnetic attenuation
ATTENUATION_PERMITTIVITY = .false. # turn permittivity (Zener model) attenuation on or off for electromagnetic material
ATTENUATION_CONDUCTIVITY = .false. # turn conductivity (Kelvin-Voigt model) attenuation on or off for electromagnetic material
f0_electromagnetic = 1d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file
f0_electromagnetic = 1.d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE_FORWARD
# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations
Expand Down Expand Up @@ -272,6 +272,7 @@ nbmodels = 2
# anisotropic: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 QKappa Qmu
# anisotropic in AXISYM: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 QKappa Qmu
# poroelastic: model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu
# electromagnetic: model_number 4 mu0 e0 e11(e0) e33(e0) sig11 sig33 Qe11 Qe33 Qs11 Qs33 0 0 0
# tomo: model_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0
#
# note: When viscoelasticity or viscoacousticity is turned on,
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DT = 0.00035
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
# set the type of calculation (P-SV (EM TE) or SH/membrane waves (EM TM))
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
Expand Down Expand Up @@ -96,7 +96,7 @@ freq0_poroelastic = 10 # frequency for viscous attenua
# for electromagnetic attenuation
ATTENUATION_PERMITTIVITY = .false. # turn permittivity (Zener model) attenuation on or off for electromagnetic material
ATTENUATION_CONDUCTIVITY = .false. # turn conductivity (Kelvin-Voigt model) attenuation on or off for electromagnetic material
f0_electromagnetic = 1d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file
f0_electromagnetic = 1.d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE_FORWARD
# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations
Expand Down Expand Up @@ -272,6 +272,7 @@ nbmodels = 1
# anisotropic: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 QKappa Qmu
# anisotropic in AXISYM: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 QKappa Qmu
# poroelastic: model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu
# electromagnetic: model_number 4 mu0 e0 e11(e0) e33(e0) sig11 sig33 Qe11 Qe33 Qs11 Qs33 0 0 0
# tomo: model_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0
#
# note: When viscoelasticity or viscoacousticity is turned on,
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLES/Gmsh_example_CPML_MPI/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DT = 0.002
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
# set the type of calculation (P-SV (EM TE) or SH/membrane waves (EM TM))
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
Expand Down Expand Up @@ -96,7 +96,7 @@ freq0_poroelastic = 10 # frequency for viscous attenua
# for electromagnetic attenuation
ATTENUATION_PERMITTIVITY = .false. # turn permittivity (Zener model) attenuation on or off for electromagnetic material
ATTENUATION_CONDUCTIVITY = .false. # turn conductivity (Kelvin-Voigt model) attenuation on or off for electromagnetic material
f0_electromagnetic = 1d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file
f0_electromagnetic = 1.d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE_FORWARD
# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations
Expand Down Expand Up @@ -288,6 +288,7 @@ nbmodels = 2
# anisotropic: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 QKappa Qmu
# anisotropic in AXISYM: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 QKappa Qmu
# poroelastic: model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu
# electromagnetic: model_number 4 mu0 e0 e11(e0) e33(e0) sig11 sig33 Qe11 Qe33 Qs11 Qs33 0 0 0
# tomo: model_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0
#
# note: When viscoelasticity or viscoacousticity is turned on,
Expand Down
5 changes: 3 additions & 2 deletions EXAMPLES/Gmsh_example_Stacey_MPI/DATA/Par_file
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DT = 5.d-7
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
# set the type of calculation (P-SV (EM TE) or SH/membrane waves (EM TM))
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
Expand Down Expand Up @@ -96,7 +96,7 @@ freq0_poroelastic = 10 # frequency for viscous attenua
# for electromagnetic attenuation
ATTENUATION_PERMITTIVITY = .false. # turn permittivity (Zener model) attenuation on or off for electromagnetic material
ATTENUATION_CONDUCTIVITY = .false. # turn conductivity (Kelvin-Voigt model) attenuation on or off for electromagnetic material
f0_electromagnetic = 1d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file
f0_electromagnetic = 1.d9 # (Hz) relevant only if source is a Dirac or a Heaviside, otherwise it is f0 the dominant frequency of the source in the DATA/SOURCE file

# to undo attenuation and/or PMLs for sensitivity kernel calculations or forward runs with SAVE_FORWARD
# use the flag below. It performs undoing of attenuation and/or of PMLs in an exact way for sensitivity kernel calculations
Expand Down Expand Up @@ -280,6 +280,7 @@ nbmodels = 2
# anisotropic: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 QKappa Qmu
# anisotropic in AXISYM: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 QKappa Qmu
# poroelastic: model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu
# electromagnetic: model_number 4 mu0 e0 e11(e0) e33(e0) sig11 sig33 Qe11 Qe33 Qs11 Qs33 0 0 0
# tomo: model_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0
#
# note: When viscoelasticity or viscoacousticity is turned on,
Expand Down
Loading

0 comments on commit e70c9c8

Please sign in to comment.