Skip to content

Commit fc3c499

Browse files
Merge pull request #2122 from CliMA/ck/broken_gpu_test
Add high resolution space construction tests
2 parents 229e427 + c340f90 commit fc3c499

File tree

3 files changed

+39
-23
lines changed

3 files changed

+39
-23
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,15 @@ steps:
259259
command:
260260
- "julia --color=yes --check-bounds=yes --project=.buildkite test/Spaces/unit_spaces.jl"
261261
- "julia --color=yes --check-bounds=yes --project=.buildkite test/Spaces/opt_spaces.jl"
262+
- "julia --color=yes --check-bounds=yes --project=.buildkite test/Spaces/unit_high_resolution_space.jl"
262263

263264
- label: "Unit: cuda spaces"
264265
key: "gpu_cuda_spaces"
265266
command:
266267
- "julia --project=.buildkite -e 'using CUDA; CUDA.versioninfo()'"
267268
- "srun julia --color=yes --check-bounds=yes --project=.buildkite test/Spaces/unit_spaces.jl"
268269
- "srun julia --color=yes --check-bounds=yes --project=.buildkite test/Spaces/opt_spaces.jl"
269-
- "julia --color=yes --check-bounds=yes --project=.buildkite test/Spaces/high_resolution_space.jl"
270+
- "julia --color=yes --check-bounds=yes --project=.buildkite test/Spaces/unit_high_resolution_space.jl"
270271
env:
271272
CLIMACOMMS_DEVICE: "CUDA"
272273
agents:

test/Spaces/high_resolution_space.jl

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#=
2+
julia --project=.buildkite
3+
using Revise; include("test/Spaces/unit_high_resolution_space.jl")
4+
=#
5+
using Test
6+
import ClimaComms
7+
ClimaComms.@import_required_backends
8+
using ClimaCore.CommonSpaces
9+
using ClimaCore: Spaces
10+
11+
# TODO: we should probably move these to datalayouts and just test high resolution kernels.
12+
@testset "Construct high resolution space" begin
13+
space = ExtrudedCubedSphereSpace(
14+
Float32;
15+
radius = 1.0,
16+
h_elem = 105,
17+
z_elem = 10,
18+
z_min = 1.0,
19+
z_max = 2.0,
20+
n_quad_points = 4,
21+
staggering = CellCenter(),
22+
)
23+
@test space isa Spaces.CenterExtrudedFiniteDifferenceSpace
24+
25+
space =
26+
CubedSphereSpace(Float32; radius = 1.0, n_quad_points = 4, h_elem = 105)
27+
@test space isa Spaces.SpectralElementSpace2D
28+
29+
space = ColumnSpace(
30+
Float32;
31+
z_elem = 500,
32+
z_min = 0,
33+
z_max = 10,
34+
staggering = CellCenter(),
35+
)
36+
@test space isa Spaces.FiniteDifferenceSpace
37+
end

0 commit comments

Comments
 (0)