Skip to content

Commit e632e4c

Browse files
committed
add initial CUDA pipeline
1 parent 7f1f731 commit e632e4c

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

.buildkite/pipeline.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
env:
2+
13
steps:
24
- label: "CUDA Julia {{matrix.version}}"
35
matrix:
@@ -7,12 +9,13 @@ steps:
79
plugins:
810
- JuliaCI/julia#v1:
911
version: "{{matrix.version}}"
10-
command: |
11-
true
12+
- JuliaCI/julia-test#v1: ~
13+
env:
14+
TRIXI_TEST: "CUDA"
1215
agents:
1316
queue: "juliagpu"
1417
cuda: "*"
1518
if: build.message !~ /\[skip ci\]/
1619
timeout_in_minutes: 60
1720
soft_fail:
18-
- exit_status: 3
21+
- exit_status: 3

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
44
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
55
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
66
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
7+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
78
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
89
DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78"
910
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

test/runtests.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,13 @@ const TRIXI_NTHREADS = clamp(Sys.CPU_THREADS, 2, 3)
116116
@time if TRIXI_TEST == "all" || TRIXI_TEST == "paper_self_gravitating_gas_dynamics"
117117
include("test_paper_self_gravitating_gas_dynamics.jl")
118118
end
119+
120+
@time if TRIXI_TEST == "all" || TRIXI_TEST == "CUDA"
121+
import CUDA
122+
if CUDA.functional()
123+
include("test_cuda.jl")
124+
else
125+
@warn "Unable to run CUDA tests on this machine"
126+
end
127+
end
119128
end

test/test_cuda.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module TestCUDA
2+
3+
using CUDA
4+
using Test
5+
using Trixi
6+
7+
include("test_trixi.jl")
8+
9+
# EXAMPLES_DIR = joinpath(examples_dir(), "dgmulti_1d")
10+
11+
# Start with a clean environment: remove Trixi.jl output directory if it exists
12+
outdir = "out"
13+
isdir(outdir) && rm(outdir, recursive = true)
14+
15+
# TODO:
16+
17+
# Clean up afterwards: delete Trixi.jl output directory
18+
@test_nowarn isdir(outdir) && rm(outdir, recursive = true)
19+
20+
end # module

0 commit comments

Comments
 (0)