Skip to content

Commit 87d4fdb

Browse files
Bug fix, and possible perf bugfix
1 parent 983a5a4 commit 87d4fdb

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

ext/cuda/matrix_fields_single_field_solve.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ function band_matrix_solve_local_mem!(
115115
b_local[v] = b[vi(v)]
116116
end
117117
cache_local = (Ux_local, U₊₁_local)
118-
Aⱼs_local = (A₋₁, A₀, A₊₁)
119-
band_matrix_solve!(t, cache_local, x_local, Aⱼs_local, b_local, vi)
118+
Aⱼs_local = (A₋₁_local, A₀_local, A₊₁_local)
119+
band_matrix_solve!(t, cache_local, x_local, Aⱼs_local, b_local, identity)
120120
@inbounds for v in 1:Nv
121121
x[vi(v)] = x_local[v]
122122
end
@@ -153,8 +153,8 @@ function band_matrix_solve_local_mem!(
153153
b_local[v] = b[vi(v)]
154154
end
155155
cache_local = (Ux_local, U₊₁_local, U₊₂_local)
156-
Aⱼs_local = (A₋₂, A₋₁, A₀, A₊₁, A₊₂)
157-
band_matrix_solve!(t, cache_local, x_local, Aⱼs_local, b_local, vi)
156+
Aⱼs_local = (A₋₂_local, A₋₁_local, A₀_local, A₊₁_local, A₊₂_local)
157+
band_matrix_solve!(t, cache_local, x_local, Aⱼs_local, b_local, identity)
158158
@inbounds for v in 1:Nv
159159
x[vi(v)] = x_local[v]
160160
end

src/Operators/Operators.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Base.Broadcast: Broadcasted
99
import ..slab, ..slab_args, ..column, ..column_args
1010
import ClimaComms
1111
import ..DataLayouts: DataLayouts, Data2D, DataSlab2D
12+
import ..DataLayouts: vindex
1213
import ..Geometry: Geometry, Covariant12Vector, Contravariant12Vector,
1314
import ..Spaces: Spaces, Quadratures, AbstractSpace
1415
import ..Topologies

src/Operators/finitedifference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,7 @@ Base.@propagate_inbounds function getidx(
31443144
field_data = Fields.field_values(bc)
31453145
space = reconstruct_placeholder_space(axes(bc), parent_space)
31463146
v = vidx(space, idx)
3147-
return @inbounds field_data[CartesianIndex(1, 1, 1, v, 1)]
3147+
return @inbounds field_data[vindex(v)]
31483148
end
31493149
Base.@propagate_inbounds function getidx(
31503150
parent_space,

0 commit comments

Comments
 (0)