|
1 | 1 | #=
|
2 | 2 | julia --project=.buildkite
|
| 3 | +ENV["CLIMACOMMS_DEVICE"] = "CUDA"; |
3 | 4 | using Revise; include(joinpath("test", "Spaces", "opt_spaces.jl"))
|
4 | 5 | =#
|
5 | 6 | import ClimaCore
|
6 |
| -import ClimaCore: Spaces, Grids |
| 7 | +import ClimaCore: Spaces, Grids, Topologies |
7 | 8 | using Test
|
8 | 9 | include(
|
9 | 10 | joinpath(pkgdir(ClimaCore), "test", "TestUtilities", "TestUtilities.jl"),
|
|
34 | 35 | #! format: off
|
35 | 36 | if ClimaComms.device(context) isa ClimaComms.CUDADevice
|
36 | 37 | test_n_failures(86, TU.PointSpace, context)
|
37 |
| - test_n_failures(144, TU.SpectralElementSpace1D, context) |
| 38 | + test_n_failures(141, TU.SpectralElementSpace1D, context) |
38 | 39 | test_n_failures(1141, TU.SpectralElementSpace2D, context)
|
39 |
| - test_n_failures(123, TU.ColumnCenterFiniteDifferenceSpace, context) |
40 |
| - test_n_failures(123, TU.ColumnFaceFiniteDifferenceSpace, context) |
41 |
| - test_n_failures(1131, TU.SphereSpectralElementSpace, context) |
42 |
| - test_n_failures(1139, TU.CenterExtrudedFiniteDifferenceSpace, context) |
43 |
| - test_n_failures(1139, TU.FaceExtrudedFiniteDifferenceSpace, context) |
| 40 | + test_n_failures(3, TU.ColumnCenterFiniteDifferenceSpace, context) |
| 41 | + test_n_failures(4, TU.ColumnFaceFiniteDifferenceSpace, context) |
| 42 | + test_n_failures(1147, TU.SphereSpectralElementSpace, context) |
| 43 | + test_n_failures(1146, TU.CenterExtrudedFiniteDifferenceSpace, context) |
| 44 | + test_n_failures(1146, TU.FaceExtrudedFiniteDifferenceSpace, context) |
44 | 45 | else
|
45 | 46 | test_n_failures(0, TU.PointSpace, context)
|
46 | 47 | test_n_failures(137, TU.SpectralElementSpace1D, context)
|
47 | 48 | test_n_failures(310, TU.SpectralElementSpace2D, context)
|
48 |
| - test_n_failures(118, TU.ColumnCenterFiniteDifferenceSpace, context) |
49 |
| - test_n_failures(118, TU.ColumnFaceFiniteDifferenceSpace, context) |
| 49 | + test_n_failures(4, TU.ColumnCenterFiniteDifferenceSpace, context) |
| 50 | + test_n_failures(5, TU.ColumnFaceFiniteDifferenceSpace, context) |
50 | 51 | test_n_failures(316, TU.SphereSpectralElementSpace, context)
|
51 | 52 | test_n_failures(321, TU.CenterExtrudedFiniteDifferenceSpace, context)
|
52 | 53 | test_n_failures(321, TU.FaceExtrudedFiniteDifferenceSpace, context)
|
|
56 | 57 | # separately:
|
57 | 58 |
|
58 | 59 | space = TU.CenterExtrudedFiniteDifferenceSpace(Float32; context=ClimaComms.context())
|
59 |
| - # @test_opt Grids._SpectralElementGrid2D(Spaces.topology(space), Spaces.quadrature_style(space); enable_bubble=false) |
60 |
| - |
61 |
| - result = JET.@report_opt Grids._SpectralElementGrid2D(Spaces.topology(space), Spaces.quadrature_style(space); enable_bubble=false) |
| 60 | + Nh = Val(Topologies.nlocalelems(Spaces.topology(space))) |
| 61 | + result = JET.@report_opt Grids._SpectralElementGrid2D(Spaces.topology(space), Spaces.quadrature_style(space), Val(Nh); enable_bubble=false) |
62 | 62 | n_found = length(JET.get_reports(result.analyzer, result.result))
|
63 |
| - n_allowed = 187 |
| 63 | + n_allowed = 0 |
64 | 64 | @test n_found ≤ n_allowed
|
65 | 65 | if n_found < n_allowed
|
66 | 66 | @info "Inference may have improved for _SpectralElementGrid2D: (n_found, n_allowed) = ($n_found, $n_allowed)"
|
|
0 commit comments