Skip to content

Commit 6c289fd

Browse files
authored
Merge pull request #91 from OpenSEMBA/validating-pws-with-bcs
Validating Planewaves together with Boundary Conditions.
2 parents a57ae37 + 5a81d63 commit 6c289fd

File tree

217 files changed

+233008
-16379
lines changed

Some content is hidden

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

217 files changed

+233008
-16379
lines changed

.github/workflows/build_windows.bat

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@ IF "%VS_VER%"=="2017_build_tools" (
1818

1919
for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f"
2020
@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"
21-
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DSEMBA_FDTD_ENABLE_MPI=NO FC=ifx CC=icx
21+
cmake -S . -B build -GNinja ^
22+
-DCMAKE_BUILD_TYPE=Release ^
23+
-DSEMBA_FDTD_ENABLE_MPI=NO ^
24+
-DCMAKE_C_COMPILER=icx ^
25+
-DCMAKE_CXX_COMPILER=icx
2226
cmake --build build -j
27+

.github/workflows/run_tests_windows.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ IF "%VS_VER%"=="2017_build_tools" (
1919
for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f"
2020
@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat"
2121

22-
build\bin\fdtd_tests.exe
2322
python -m pytest test

.github/workflows/ubuntu-gnu.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
11
name: ubuntu-gnu
22

3-
permissions:
4-
actions: write
5-
63
on:
7-
push:
8-
branches:
9-
- dev
104
pull_request:
115
branches:
126
- main
137
- dev
14-
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
1513
jobs:
1614

1715
builds-and-test:
1816
runs-on: ubuntu-latest
1917
strategy:
2018
matrix:
2119
build-type: ["Debug", "Release"]
22-
mpi-build: ["No", "Yes"]
20+
mpi: ["No", "Yes"]
21+
mtln: ["Yes"]
22+
hdf: ["Yes"]
23+
24+
include:
25+
- build-type: "Release"
26+
mpi: "Yes"
27+
mtln: "No"
28+
hdf: "Yes"
29+
30+
name: ${{matrix.build-type}}- mpi ${{matrix.mpi}} - mtln ${{matrix.mtln}} - hdf ${{matrix.hdf}}
31+
2332
steps:
2433
- name: Checkout
2534
uses: actions/checkout@v4
@@ -30,10 +39,14 @@ jobs:
3039
run: |
3140
sudo apt update
3241
sudo apt install libhdf5-dev libopenmpi-dev
33-
42+
3443
- name: Build application
3544
run: |
36-
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi-build}} -DSEMBA_FDTD_ENABLE_HDF=YES
45+
cmake -S . -B build \
46+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
47+
-DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi}} \
48+
-DSEMBA_FDTD_ENABLE_HDF=${{matrix.hdf}} \
49+
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}}
3750
cmake --build build -j
3851
3952
- name: Run fdtd unit tests
@@ -44,8 +57,12 @@ jobs:
4457
run: |
4558
python -m pip install -r requirements.txt
4659
47-
- name: Run wrapper tests
48-
run: |
49-
python -m pytest test
60+
- name: Run all wrapper tests
61+
if: matrix.mtln=='Yes'
62+
run: python -m pytest test/
63+
64+
- name: Run non-mtln wrapper tests
65+
if: matrix.mtln=='No'
66+
run: python -m pytest -m 'not mtln' test/
5067

5168

.github/workflows/ubuntu-intel.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: ubuntu-intel
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- dev
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
15+
builds-and-tests:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
build-type: ["Debug", "Release"]
20+
mpi: ["No"]
21+
mtln: ["No"]
22+
hdf: ["Yes"]
23+
24+
25+
name: ${{matrix.build-type}}- mpi ${{matrix.mpi}} - mtln ${{matrix.mtln}} - hdf ${{matrix.hdf}}
26+
27+
steps:
28+
29+
- uses: actions/checkout@v4
30+
with:
31+
submodules: 'recursive'
32+
33+
- name: Setup MPI
34+
uses: mpi4py/setup-mpi@v1
35+
with:
36+
mpi: 'intelmpi'
37+
38+
- name: Setup intel fortran
39+
uses: fortran-lang/setup-fortran@v1
40+
id: setup-fortran
41+
with:
42+
compiler: intel-classic
43+
version: '2021.10'
44+
45+
- name: CMake build
46+
run: |
47+
cmake -S . -B build \
48+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
49+
-DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi}} \
50+
-DSEMBA_FDTD_ENABLE_HDF=${{matrix.hdf}} \
51+
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}}
52+
cmake --build build -j
53+
54+
- name: Run fdtd unit tests
55+
timeout-minutes: 60
56+
run: |
57+
build/bin/fdtd_tests
58+
59+
- name: Install python wrapper requirements
60+
run: |
61+
python -m pip install -r requirements.txt
62+
63+
- name: Run all wrapper tests
64+
if: matrix.mtln=='Yes'
65+
run: python -m pytest test/
66+
67+
- name: Run non-mtln wrapper tests
68+
if: matrix.mtln=='No'
69+
run: python -m pytest -m 'not mtln' test/

.github/workflows/ubuntu-intelLLVM.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
name: ubuntu-intelLLVM
22

33
on:
4-
push:
5-
branches:
6-
- dev
7-
4+
85
pull_request:
96
branches:
107
- main
118
- dev
129

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
1314
jobs:
1415

1516
builds-and-tests:
1617
runs-on: ubuntu-latest
1718
strategy:
1819
matrix:
19-
optimization-type: ["Debug", "Release"]
20-
mpi-build: ["No", "Yes"]
20+
build-type: ["Debug", "Release"]
21+
mpi: ["No", "Yes"]
22+
mtln: ["Yes"]
23+
hdf: ["Yes"]
24+
25+
name: ${{matrix.build-type}}- mpi ${{matrix.mpi}} - mtln ${{matrix.mtln}} - hdf ${{matrix.hdf}}
2126

2227
steps:
2328

@@ -39,10 +44,11 @@ jobs:
3944

4045
- name: CMake build
4146
run: |
42-
export FC=ifx
43-
export CC=icx
44-
export CXX=icpx
45-
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.optimization-type}} -DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi-build}} -DSEMBA_FDTD_ENABLE_HDF=YES
47+
cmake -S . -B build \
48+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
49+
-DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi}} \
50+
-DSEMBA_FDTD_ENABLE_HDF=${{matrix.hdf}} \
51+
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}}
4652
cmake --build build -j
4753
4854
- name: Run fdtd unit tests
@@ -57,4 +63,6 @@ jobs:
5763
- name: Run wrapper tests
5864
timeout-minutes: 60
5965
run: |
60-
python -m pytest test
66+
python -m pytest test
67+
68+
Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
name: ubuntu-nvhpc
22

33
on:
4-
push:
5-
branches:
6-
- dev
74
pull_request:
85
branches:
96
- main
107
- dev
118

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
1213
jobs:
1314
builds-and-test:
1415
runs-on: ubuntu-latest
1516

1617
strategy:
1718
matrix:
18-
optimization-type: ["Debug", "Release"]
19-
mpi-build: ["No"]
19+
build-type: ["Debug", "Release"]
20+
mpi: ["No"]
21+
mtln: ["No"]
22+
hdf: ["No"]
23+
24+
name: ${{matrix.build-type}}- mpi ${{matrix.mpi}} - mtln ${{matrix.mtln}} - hdf ${{matrix.hdf}}
2025

2126
timeout-minutes: 30
2227
steps:
@@ -30,13 +35,19 @@ jobs:
3035
with:
3136
compiler: nvidia-hpc
3237
version: '24.5'
38+
39+
- name: Install required packages
40+
run: |
41+
sudo apt update
42+
sudo apt install libhdf5-dev libopenmpi-dev
3343
3444
- name: Build application
3545
run: |
36-
# export CC=nvcc
37-
# export CXX=nvc++
38-
# export FC=nvfortran
39-
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.optimization-type}} -DSEMBA_FDTD_ENABLE_HDF=NO
46+
cmake -S . -B build \
47+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
48+
-DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi}} \
49+
-DSEMBA_FDTD_ENABLE_HDF=${{matrix.hdf}} \
50+
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}}
4051
cmake --build build -j
4152
4253
- name: Run fdtd unit tests
@@ -47,10 +58,9 @@ jobs:
4758
- name: Install python wrapper requirements
4859
run: |
4960
python -m pip install -r requirements.txt
50-
51-
# - name: Run wrapper tests
52-
# timeout-minutes: 60
53-
# run: |
54-
# python -m pytest test
61+
62+
- name: Run non-mtln and non-hdf wrapper tests
63+
if: matrix.mtln=='No' || matrix.hdf=='No'
64+
run: python -m pytest -m 'not mtln and not hdf5' test/
5565

5666

.github/workflows/windows-intelLLVM.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
name: windows-intelLLVM
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- dev
8-
4+
95
pull_request:
106
branches:
117
- main
128
- dev
139

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
1414
jobs:
1515

1616
builds-and-tests:
1717
runs-on: windows-latest
18+
strategy:
19+
matrix:
20+
build-type: ["Debug", "Release"]
21+
mpi: ["No"]
22+
mtln: ["Yes"]
23+
hdf: ["Yes"]
24+
25+
include:
26+
- build-type: "Release"
27+
mpi: "No"
28+
mtln: "No"
29+
hdf: "Yes"
30+
31+
name: windows-intelLLVM ${{matrix.build-type}} - mpi ${{matrix.mpi}} - mtln ${{matrix.mtln}}
1832

1933
steps:
2034

@@ -40,14 +54,21 @@ jobs:
4054
- name: CMake build
4155
shell: bash
4256
run: |
43-
.github/workflows/build_windows.bat
57+
cmake -S . -B build -G Ninja \
58+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
59+
-DSEMBA_FDTD_ENABLE_MPI=${{matrix.mpi}} \
60+
-DSEMBA_FDTD_ENABLE_HDF=${{matrix.hdf}} \
61+
-DSEMBA_FDTD_ENABLE_MTLN=${{matrix.mtln}}
62+
cmake --build build -j
4463
4564
- name: Install python wrapper requirements
4665
run: |
4766
python -m pip install -r requirements.txt
4867
49-
- name: Run all tests
50-
shell: bash
51-
timeout-minutes: 120
52-
run: |
53-
.github/workflows/run_tests_windows.bat
68+
- name: Run all wrapper tests (except codemodel)
69+
if: matrix.mtln=='Yes'
70+
run: python -m pytest -m 'not codemodel' test/
71+
72+
- name: Run non-mtln wrapper tests
73+
if: matrix.mtln=='No'
74+
run: python -m pytest -m 'not mtln' test/

0 commit comments

Comments
 (0)