-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add back uniform_vertical_levels #2016
Conversation
cc @kmdeck |
Im not sure if it matters for this, but just in case: we had to make some changes to CC MatrixFields to even create the Jacobian on the spectral element space :#1884 |
Can we add a unit test covering this case? Maybe a separate PR with a broken test first, and then we can re-base this PR. |
Sorry about the regression! |
e85dad4
to
520090b
Compare
Hi @juliasloan25, I tried running the reproducer with this branch, and it seems like this PR doesn't fix the issue. I did see that if I define function _single_field_solve!(
::ClimaComms.CUDADevice,
cache,
x,
A,
b,
)
end the kernel does run. So, it seems related to dispatch. |
Looking at the types, I see that this passes: @testset "types" begin
@test column_A(xs[1], 1, 1, 1) isa Fields.ColumnField
@test column_A(As[1], 1, 1, 1) isa Fields.ColumnField
@test column_A(bs[1], 1, 1, 1) isa Fields.ColumnField
@test column_A(xs[2], 1, 1, 1) isa Fields.ColumnField
@test column_A(As[2], 1, 1, 1) isa Fields.ColumnField
@test column_A(bs[2], 1, 1, 1) isa Fields.ColumnField
@test column_A(xs[3], 1, 1, 1) isa Fields.PointDataField
@test column_A(As[3], 1, 1, 1) isa Fields.PointDataField
@test column_A(bs[3], 1, 1, 1) isa Fields.PointDataField
@test column_A(xs[4], 1, 1, 1) isa Fields.ColumnField
@test column_A(As[4], 1, 1, 1) isa UniformScaling
@test column_A(bs[4], 1, 1, 1) isa Fields.ColumnField
@test column_A(xs[5], 1, 1, 1) isa Fields.ColumnField
@test column_A(As[5], 1, 1, 1) isa UniformScaling
@test column_A(bs[5], 1, 1, 1) isa Fields.ColumnField
@test column_A(xs[6], 1, 1, 1) isa Fields.PointDataField
@test column_A(As[6], 1, 1, 1) isa UniformScaling
@test column_A(bs[6], 1, 1, 1) isa Fields.PointDataField
end |
So, it seems like we need to define function _single_field_solve!(
::ClimaComms.CUDADevice,
cache::Fields.PointDataField,
x::Fields.PointDataField,
A::Fields.PointDataField,
b::Fields.PointDataField,
)
end |
#1992 removed the
uniform_vertical_levels
function. This led to a GPU error downstream in ClimaLand (see error message below). This PR reverts that change and makes a patch release - this has been tested from ClimaLand (see run here).The error came up in ClimaLand in a PR switching the canopy temperature variable from being stepped explicitly to implicitly. We also step soil water content implicitly, but there has been no error with that case. In the soil-only case, our implicit variable is defined on a
ExtrudedFiniteDifferenceSpace
. In the new combined soil/canopy case, we have one implicit variable on aExtrudedFiniteDifferenceSpace
, and the other on aSpectralElementSpace2D
. Maybe the bug comes from having two variables on two different spaces, or from theSpectralElementSpace2D
specifically?Here is the error (e.g. from this failing run):