Skip to content

Commit

Permalink
Merge #1422 #1426
Browse files Browse the repository at this point in the history
1422: Remove getindex overload in test r=charleskawczynski a=charleskawczynski

This PR removes the `getindex` overloading (which we don't really need) in the test directory.

1426: Update bors.toml r=charleskawczynski a=charleskawczynski

Comment out Mac OS tests

Co-authored-by: Charles Kawczynski <[email protected]>
  • Loading branch information
bors[bot] and charleskawczynski authored Aug 11, 2023
3 parents 38c8535 + d4e22e0 + 481833c commit 57eb72b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
status = [
"test-os (ubuntu-20.04)",
"test-os (windows-latest)",
"test-os (macos-latest)",
# "test-os (macos-latest)",
"lib-climacore-vtk",
"lib-climacore-makie",
"lib-climacore-plots",
Expand Down
23 changes: 8 additions & 15 deletions test/Operators/finitedifference/opt_examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ import ClimaCore.Operators: half, PlusHalf

const n_tuples = 3

# Hack we're using in TurbulenceConvection
# for handling ntuple fields:
Base.@propagate_inbounds Base.getindex(
field::Fields.FiniteDifferenceField,
i::Integer,
) = Base.getproperty(field, i)

a_bcs(::Type{FT}, i::Int) where {FT} =
(; bottom = Operators.SetValue(FT(0)), top = Operators.Extrapolate())

Expand Down Expand Up @@ -337,8 +330,8 @@ function alloc_test_nested_expressions_12(cfield, ffield, ntcfield, ntffield)

# Compile first
@inbounds for i in 1:n_tuples
cnt_i = cnt[i]
fnt_i = fnt[i]
cnt_i = cnt.:($i)
fnt_i = fnt.:($i)
cxnt = cnt_i.cx
fxnt = fnt_i.fx
cynt = cnt_i.cy
Expand All @@ -354,8 +347,8 @@ function alloc_test_nested_expressions_12(cfield, ffield, ntcfield, ntffield)

@inbounds for i in 1:n_tuples
p_i = @allocated begin
cnt_i = cnt[i]
fnt_i = fnt[i]
cnt_i = cnt.:($i)
fnt_i = fnt.:($i)
end
@test p_i == 0
cxnt = cnt_i.cx
Expand Down Expand Up @@ -402,8 +395,8 @@ function alloc_test_nested_expressions_13(

# Compile first
@inbounds for i in 1:n_tuples
cnt_i = cnt[i]
fnt_i = fnt[i]
cnt_i = cnt.:($i)
fnt_i = fnt.:($i)
cxnt = cnt_i.cx
fxnt = fnt_i.fx
fynt = fnt_i.fy
Expand All @@ -417,8 +410,8 @@ function alloc_test_nested_expressions_13(
end

@inbounds for i in 1:n_tuples
cnt_i = cnt[i]
fnt_i = fnt[i]
cnt_i = cnt.:($i)
fnt_i = fnt.:($i)
cxnt = cnt_i.cx
fxnt = fnt_i.fx
fynt = fnt_i.fy
Expand Down

0 comments on commit 57eb72b

Please sign in to comment.