Skip to content

Commit ed3c40a

Browse files
authored
Merge pull request #678 from CliMA/he/fix-p3-gpu-compatibility
fix: P3 gpu compatibility, bump to v0.31.6
2 parents 72abc40 + b61ed33 commit ed3c40a

File tree

2 files changed

+7
-44
lines changed

2 files changed

+7
-44
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CloudMicrophysics"
22
uuid = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b"
33
authors = ["Climate Modeling Alliance"]
4-
version = "0.31.5"
4+
version = "0.31.6"
55

66
[deps]
77
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
@@ -31,7 +31,7 @@ LazyArtifacts = "1"
3131
LogExpFunctions = "0.3.29"
3232
MLJ = "0.20"
3333
RootSolvers = "0.3, 0.4, 1"
34-
SpecialFunctions = "1, 2"
34+
SpecialFunctions = "2.7.1"
3535
StaticArrays = "1.9"
3636
Thermodynamics = "0.15.4"
3737
UnrolledUtilities = "0.1"

test/gpu_tests.jl

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -980,50 +980,13 @@ function test_gpu(FT)
980980

981981
kernel! = test_bulk_tendencies_2m_p3_kernel!(backend, work_groups)
982982
TT.@testset "2M+P3" begin
983-
# kernel!(mp_2m_p3, tps, output, ρ, T, q_tot, q_lcl, n_lcl, q_rai, n_rai, q_ice, n_ice, q_rim, b_rim; ndrange)
984-
# TT.@test allequal(Array(output))
985-
# tendencies = Array(output)[1]
986-
# TT.@test all(isfinite, tendencies)
987-
# TT.@test !iszero(tendencies.dq_ice_dt)
988-
# Skip P3 GPU test - P3 uses gamma_inc_inv which is not GPU-compatible
989-
TT.@test_broken false # P3 bulk tendencies kernel not GPU-safe yet
983+
kernel!(mp_2m_p3, tps, output, ρ, T, q_tot, q_lcl, n_lcl, q_rai, n_rai, q_ice, n_ice, q_rim, b_rim; ndrange)
984+
TT.@test allequal(Array(output))
985+
tendencies = Array(output)[1]
986+
TT.@test all(isfinite, tendencies)
987+
TT.@test !iszero(tendencies.dq_ice_dt)
990988
end
991989
end # TT.@testset "Bulk microphysics tendencies kernels"
992-
993-
# TT.@testset "P3 scheme kernels" begin
994-
# dims = (2, 2)
995-
# (; output, ndrange) = setup_output(dims, FT)
996-
997-
# F_rim = ArrayType([FT(0.5), FT(0.95)])
998-
# ρ_r = ArrayType([FT(400), FT(800)])
999-
1000-
# kernel! = P3_scheme_kernel!(backend, work_groups)
1001-
# kernel!(p3, output, F_rim, ρ_r; ndrange)
1002-
1003-
# # test if all output is positive...
1004-
# TT.@test all(Array(output) .> FT(0))
1005-
# #... and returns reasonable numbers
1006-
# TT.@test isapprox(
1007-
# Array(output)[1, 1],
1008-
# FT(0.4946323381999426 * 1e-3),
1009-
# rtol = 1e-2,
1010-
# )
1011-
# TT.@test isapprox(
1012-
# Array(output)[2, 1],
1013-
# FT(0.26151186272014415 * 1e-3),
1014-
# rtol = 1e-2,
1015-
# )
1016-
# TT.@test isapprox(
1017-
# Array(output)[1, 2],
1018-
# FT(1.7400778369620664 * 1e-3),
1019-
# rtol = 1e-2,
1020-
# )
1021-
# TT.@test isapprox(
1022-
# Array(output)[2, 2],
1023-
# FT(0.11516682512848 * 1e-3),
1024-
# rtol = 1e-2,
1025-
# )
1026-
# end
1027990
end # function test_gpu(FT)
1028991

1029992
TT.@testset "GPU tests ($FT)" for FT in (Float64, Float32)

0 commit comments

Comments
 (0)