Skip to content

Commit bfcc9b6

Browse files
authored
Merge pull request #1256 from danielpeter/devel
moves and updates examples, adding new categorizations in EXAMPLES/ folder
2 parents bb147c8 + 9eed386 commit bfcc9b6

File tree

1,147 files changed

+2535
-1210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,147 files changed

+2535
-1210
lines changed

.azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,6 @@ jobs:
216216
BUILD: true
217217
- template: .azure-pipelines/test-template.yml
218218
parameters:
219-
workingDirectory: EXAMPLES/simple_topography_and_also_a_simple_fluid_layer/
219+
workingDirectory: EXAMPLES/applications/simple_topography_and_also_a_simple_fluid_layer/
220220

221221

.github/scripts/run_tests.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ cd $dir
4040
#sed -i "s:^NTSTEP_BETWEEN_OUTPUT_INFO .*:NTSTEP_BETWEEN_OUTPUT_INFO = 50:" DATA/Par_file
4141

4242
# specific example setups
43-
if [ "${TESTDIR}" == "EXAMPLES/moving_sources_acoustic" ]; then
43+
if [ "${TESTDIR}" == "EXAMPLES/applications/moving_sources_acoustic" ]; then
4444
sed -i "s:^NSTEP .*:NSTEP = 3000:" DATA/Par_file
4545
fi
46-
if [ "${TESTDIR}" == "EXAMPLES/Industrial_Format_SEP" ]; then
46+
if [ "${TESTDIR}" == "EXAMPLES/real_world/Industrial_Format_SEP" ]; then
4747
sed -i "s:^NPROC .*:NPROC = 2:" DATA/Par_file
4848
fi
49-
if [ "${TESTDIR}" == "EXAMPLES/axisymmetric_case_AXISYM_option" ]; then
49+
if [ "${TESTDIR}" == "EXAMPLES/applications/axisymmetric_examples/axisymmetric_case_AXISYM_option" ]; then
5050
sed -i "s:^NPROC .*:NPROC = 2:" DATA/Par_file
5151
sed -i "s:^NSTEP .*:NSTEP = 1400:" DATA/Par_file
5252
fi
@@ -61,12 +61,12 @@ fi
6161
# selects kernel script for kernel benchmark examples
6262
do_kernel_script=0
6363

64-
if [ "${TESTDIR}" == "EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC" ]; then do_kernel_script=1; fi
65-
if [ "${TESTDIR}" == "EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC" ]; then do_kernel_script=1; fi
66-
if [ "${TESTDIR}" == "EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC_ELASTIC" ]; then do_kernel_script=1; fi
64+
if [ "${TESTDIR}" == "EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC" ]; then do_kernel_script=1; fi
65+
if [ "${TESTDIR}" == "EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC" ]; then do_kernel_script=1; fi
66+
if [ "${TESTDIR}" == "EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC_ELASTIC" ]; then do_kernel_script=1; fi
6767

6868
# setup elastic kernel for SH simulations
69-
if [ "${TESTDIR}" == "EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC" ] && [ "${TESTCASE}" == "SH" ]; then
69+
if [ "${TESTDIR}" == "EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC" ] && [ "${TESTCASE}" == "SH" ]; then
7070
# sets simulation type for SH-waves
7171
sed -i "s:^SIM_TYPE.*:SIM_TYPE=3:" run_this_example_kernel.sh
7272
fi

.github/workflows/CI.yml

Lines changed: 146 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
#sudo -E apt-cache pkgnames intel | grep intel-oneapi
188188
#echo ""
189189
echo "installing packages intel oneapi:"
190-
sudo apt-get install -y intel-oneapi-compiler-fortran-2023.2.2 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.2 intel-oneapi-mpi intel-oneapi-mpi-devel
190+
sudo apt-get install -y intel-oneapi-compiler-fortran-2023.2.2 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.2 intel-oneapi-mpi-2021.14 intel-oneapi-mpi-devel-2021.14
191191
echo ""
192192
193193
- name: compiler infos
@@ -294,6 +294,137 @@ jobs:
294294
run: |
295295
make tests
296296
297+
linuxCheck-Intel-ifx:
298+
name: Test Intel ifx on ubuntu-latest
299+
runs-on: ubuntu-latest
300+
needs: changesCheck
301+
302+
steps:
303+
- uses: actions/checkout@v4
304+
305+
- name: Cache Intel oneapi packages
306+
id: cache-intel-oneapi-ifx
307+
uses: actions/cache@v4
308+
with:
309+
path: /opt/intel/oneapi
310+
key: install-${{ runner.os }}-ifx-all
311+
312+
- name: Install packages
313+
if: steps.cache-intel-oneapi-ifx.outputs.cache-hit != 'true'
314+
run: |
315+
# new way
316+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
317+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
318+
echo ""
319+
sudo apt-get update
320+
echo ""
321+
# info
322+
#sudo -E apt-cache pkgnames intel | grep intel-oneapi
323+
#echo ""
324+
echo "installing packages intel oneapi:"
325+
sudo apt-get install -y intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mpi intel-oneapi-mpi-devel
326+
echo ""
327+
328+
- name: compiler infos
329+
run: |
330+
echo ""
331+
source /opt/intel/oneapi/setvars.sh
332+
echo ""
333+
echo "compiler versions:"
334+
echo "icx --version"
335+
which icx
336+
icx --version
337+
echo ""
338+
echo "ifx --version"
339+
which ifx
340+
ifx --version
341+
echo ""
342+
echo "mpiifx --version"
343+
which mpiifx
344+
mpiifx --version
345+
echo ""
346+
echo "mpif90 --version"
347+
which mpif90
348+
mpif90 --version
349+
echo ""
350+
# infos
351+
which ifx
352+
which icx
353+
which mpiifx
354+
echo "mpirun:"
355+
which mpirun
356+
echo ""
357+
# intel setup for running tests
358+
echo ""
359+
echo "replacing mpif90 with mpiifx link:"
360+
sudo ln -sf $(which mpiifx) $(which mpif90)
361+
mpif90 --version
362+
echo ""
363+
# debug
364+
#export I_MPI_DEBUG=5,pid,host
365+
#export I_MPI_LIBRARY_KIND=debug
366+
# remove -ftrapuv which leads to issues for running tests
367+
sed -i "s/-ftrapuv//g" flags.guess
368+
# environment setting
369+
export TERM=xterm
370+
# export info
371+
echo "exports:"
372+
export
373+
echo ""
374+
echo ""
375+
printenv >> $GITHUB_ENV
376+
echo "CXX=icx" >> $GITHUB_ENV
377+
echo "CC=icx" >> $GITHUB_ENV
378+
echo "FC=ifx" >> $GITHUB_ENV
379+
echo ""
380+
381+
- name: configure debug
382+
run: |
383+
set +e # revert the default `set -e`
384+
./configure --enable-debug FC=ifx CC=icx
385+
if [[ $? -ne 0 ]]; then echo "configuration failed:"; cat config.log; echo ""; echo "exiting..."; exit 1; fi
386+
387+
- name: make debug
388+
run: |
389+
make -j2 all
390+
make -j2 all --always-make
391+
make clean
392+
393+
- name: configure
394+
run: |
395+
./configure FC=ifx CC=icx
396+
397+
- name: make
398+
run: |
399+
make -j2 all
400+
make clean
401+
402+
- name: configure parallel debug
403+
run: |
404+
set +e # revert the default `set -e`
405+
./configure --enable-debug --with-mpi FC=ifx CC=icx MPIFC=mpiifx MPI_INC="${I_MPI_ROOT}/include"
406+
if [[ $? -ne 0 ]]; then echo "configuration failed:"; cat config.log; echo ""; echo "exiting..."; exit 1; fi
407+
408+
- name: make parallel debug
409+
run: |
410+
make -j2 all
411+
make -j2 all --always-make
412+
make clean
413+
414+
- name: configure parallel
415+
run: |
416+
./configure --with-mpi FC=ifx CC=icx MPIFC=mpiifx MPI_INC="${I_MPI_ROOT}/include"
417+
418+
- name: make parallel
419+
run: |
420+
make -j2 all
421+
make clean
422+
423+
# note: fails with -ftrapuv flag due to MPI issue on virtual nodes
424+
- name: make tests
425+
run: |
426+
make tests
427+
297428
298429
linuxTest_0:
299430
name: Test run example 0 - make tests
@@ -333,7 +464,7 @@ jobs:
333464

334465
- name: Run test
335466
env:
336-
TESTDIR: EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC
467+
TESTDIR: EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC
337468
run: ./.github/scripts/run_tests.sh
338469
shell: bash
339470

@@ -357,7 +488,7 @@ jobs:
357488

358489
- name: Run test
359490
env:
360-
TESTDIR: EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC
491+
TESTDIR: EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC
361492
TESTCASE: P-SV
362493
run: ./.github/scripts/run_tests.sh
363494
shell: bash
@@ -382,7 +513,7 @@ jobs:
382513

383514
- name: Run test
384515
env:
385-
TESTDIR: EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC
516+
TESTDIR: EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ELASTIC
386517
TESTCASE: SH
387518
run: ./.github/scripts/run_tests.sh
388519
shell: bash
@@ -407,7 +538,7 @@ jobs:
407538

408539
- name: Run test
409540
env:
410-
TESTDIR: EXAMPLES/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC_ELASTIC
541+
TESTDIR: EXAMPLES/benchmarks/BENCHMARK_CLAERBOUT_ADJOINT/ACOUSTIC_ELASTIC
411542
run: ./.github/scripts/run_tests.sh
412543
shell: bash
413544

@@ -431,7 +562,7 @@ jobs:
431562

432563
- name: Run test
433564
env:
434-
TESTDIR: EXAMPLES/moving_sources_acoustic
565+
TESTDIR: EXAMPLES/applications/moving_sources_acoustic
435566
run: ./.github/scripts/run_tests.sh
436567
shell: bash
437568

@@ -455,7 +586,7 @@ jobs:
455586

456587
- name: Run test
457588
env:
458-
TESTDIR: EXAMPLES/anisotropic_isotropic_model
589+
TESTDIR: EXAMPLES/applications/anisotropy/anisotropic_isotropic_model
459590
run: ./.github/scripts/run_tests.sh
460591
shell: bash
461592

@@ -480,7 +611,7 @@ jobs:
480611

481612
- name: Run test
482613
env:
483-
TESTDIR: EXAMPLES/Industrial_Format_SEP
614+
TESTDIR: EXAMPLES/real_world/Industrial_Format_SEP
484615
run: ./.github/scripts/run_tests.sh
485616
shell: bash
486617

@@ -504,7 +635,7 @@ jobs:
504635

505636
- name: Run test
506637
env:
507-
TESTDIR: EXAMPLES/axisymmetric_case_AXISYM_option
638+
TESTDIR: EXAMPLES/applications/axisymmetric_examples/axisymmetric_case_AXISYM_option
508639
run: ./.github/scripts/run_tests.sh
509640
shell: bash
510641

@@ -528,7 +659,7 @@ jobs:
528659

529660
- name: Run test
530661
env:
531-
TESTDIR: EXAMPLES/simple_topography_and_also_a_simple_fluid_layer
662+
TESTDIR: EXAMPLES/applications/simple_topography_and_also_a_simple_fluid_layer
532663
run: ./.github/scripts/run_tests.sh
533664
shell: bash
534665

@@ -552,7 +683,7 @@ jobs:
552683

553684
- name: Run test
554685
env:
555-
TESTDIR: EXAMPLES/simple_topography_and_also_a_simple_fluid_layer
686+
TESTDIR: EXAMPLES/applications/simple_topography_and_also_a_simple_fluid_layer
556687
run: ./.github/scripts/run_tests.sh
557688
shell: bash
558689

@@ -577,7 +708,7 @@ jobs:
577708

578709
- name: Run test
579710
env:
580-
TESTDIR: EXAMPLES/tomographic_ocean_model
711+
TESTDIR: EXAMPLES/applications/ocean_acoustics/tomographic_ocean_model
581712
run: ./.github/scripts/run_tests.sh
582713
shell: bash
583714

@@ -601,7 +732,7 @@ jobs:
601732

602733
- name: Run test
603734
env:
604-
TESTDIR: EXAMPLES/Marmousi2
735+
TESTDIR: EXAMPLES/real_world/Marmousi2
605736
run: ./.github/scripts/run_tests.sh
606737
shell: bash
607738

@@ -625,7 +756,7 @@ jobs:
625756

626757
- name: Run test
627758
env:
628-
TESTDIR: EXAMPLES/Gmsh_example_Stacey_MPI
759+
TESTDIR: EXAMPLES/applications/meshing/Gmsh_example_Stacey_MPI
629760
run: ./.github/scripts/run_tests.sh
630761
shell: bash
631762

@@ -649,7 +780,7 @@ jobs:
649780

650781
- name: Run test
651782
env:
652-
TESTDIR: EXAMPLES/electromagnetic_GPR_TM
783+
TESTDIR: EXAMPLES/reproducible_study/Morency2020_electromagnetic_GPR_TM
653784
DEBUG: true
654785
run: ./.github/scripts/run_tests.sh
655786
shell: bash

0 commit comments

Comments
 (0)