Skip to content

Commit 0fd8390

Browse files
committed
Add build tests
1 parent 82c7a8f commit 0fd8390

File tree

3 files changed

+102
-3
lines changed

3 files changed

+102
-3
lines changed

.github/workflows/test.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-FileCopyrightText: 2025 SeisSol Group
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
# SPDX-LicenseComments: Full text under /LICENSE and /LICENSES/
5+
#
6+
# SPDX-FileContributor: Author lists in /AUTHORS and /CITATION.cff
7+
8+
name: build-device
9+
on:
10+
- push
11+
12+
jobs:
13+
device-build-test:
14+
name: device-build-test
15+
runs-on: ${{ matrix.setup.runner }}
16+
container: ${{ matrix.setup.container }}
17+
continue-on-error: true
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
arch:
22+
- snb # <-- needed for the self-hosted CI node for now :/
23+
build_type:
24+
- Release
25+
- Debug
26+
setup:
27+
- arch: sm_60
28+
backend: cuda
29+
cc: gcc-13
30+
cxx: g++-13
31+
fc: gfortran-13
32+
container: seissol/gha-gpu-nv:davschneller-gpu-image
33+
runner: ubuntu-24.04
34+
pythonbreak: true
35+
- arch: sm_60
36+
backend: cuda
37+
cc: clang-18
38+
cxx: clang++-18
39+
fc: gfortran-13 # TODO?
40+
container: seissol/gha-gpu-nv:davschneller-gpu-image
41+
runner: ubuntu-24.04
42+
pythonbreak: true
43+
# TODO: needs a working GPU runner
44+
#- arch: sm_60
45+
# backend: cuda
46+
# cc: nvc
47+
# cxx: nvc++
48+
# fc: nvfortran
49+
# container: seissol/gha-gpu-nvhpc:davschneller-gpu-image
50+
# runner: sccs-ci-nv-sm60
51+
# pythonbreak: true
52+
- arch: gfx906
53+
backend: hip
54+
cc: gcc-13
55+
cxx: g++-13
56+
fc: gfortran-13
57+
container: seissol/gha-gpu-amd:davschneller-gpu-image
58+
runner: ubuntu-24.04
59+
pythonbreak: true
60+
- arch: gfx906
61+
backend: hip
62+
cc: clang-18
63+
cxx: clang++-18
64+
fc: gfortran-13 # TODO?
65+
container: seissol/gha-gpu-amd:davschneller-gpu-image
66+
runner: ubuntu-24.04
67+
pythonbreak: true
68+
- arch: skl
69+
backend: oneapi
70+
cc: icx
71+
cxx: icpx
72+
fc: ifx
73+
container: seissol/gha-gpu-intel:davschneller-gpu-image
74+
runner: ubuntu-24.04
75+
pythonbreak: false
76+
steps:
77+
- name: checkout-device
78+
uses: actions/checkout@v4
79+
with:
80+
submodules: recursive
81+
82+
- id: build
83+
name: build-seissol
84+
run: |
85+
cd tests
86+
mkdir build && cd build
87+
88+
# TODO: change to `-Wall -Werror` at some point
89+
EXTRA_FLAGS="-Wall"
90+
91+
export CFLAGS="${EXTRA_FLAGS} ${CFLAGS}"
92+
export CXXFLAGS="${EXTRA_FLAGS} ${CXXFLAGS}"
93+
export FFLAGS="${EXTRA_FLAGS} ${FFLAGS}"
94+
95+
export CC=${{matrix.setup.cc}}
96+
export CXX=${{matrix.setup.cxx}}
97+
export FC=${{matrix.setup.fc}}
98+
99+
cmake .. -GNinja -DDEVICE_BACKEND=${{matrix.setup.backend}} -DSM=${{matrix.setup.arch}} -DWITH_MPI=OFF -DWITH_TESTS=ON
100+
ninja

algorithms/Common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ int blockcount(F&& func, int blocksize) {
9797
return smCount * blocksPerSM;
9898
}
9999

100-
using LocalInt4 = int4;
101-
using LocalInt2 = int2;
100+
using LocalInt4 = __attribute__((vector_size(16))) int;
101+
using LocalInt2 = __attribute__((vector_size(8))) int;
102102
#else
103103
#define DEVICE_DEVICEFUNC
104104
template<typename T>

sycl.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ set(DEVICE_SOURCE_FILES device.cpp
1111
interfaces/sycl/Memory.cpp
1212
interfaces/sycl/Streams.cpp
1313
interfaces/sycl/DeviceContext.cpp
14-
interfaces/sycl/DeviceStack.cpp
1514
interfaces/sycl/DeviceCircularQueueBuffer.cpp
1615
interfaces/sycl/DeviceType.cpp
1716
algorithms/sycl/ArrayManip.cpp

0 commit comments

Comments
 (0)