Skip to content

Commit

Permalink
Minor fix, k is undeclared
Browse files Browse the repository at this point in the history
  • Loading branch information
rommelDB committed Sep 30, 2023
1 parent da56a26 commit 02e1258
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion transformations/tests/sources/projSccCuf/module/kernel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SUBROUTINE kernel(start, iend, nlon, nz, q, t, z)
c = 5.345
DO jk = 2, nz
DO jl = start, iend
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down
2 changes: 1 addition & 1 deletion transformations/tests/test_scc_cuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def test_scc_cuf_simple(frontend, horizontal, vertical, blocking):
c = 5.345
DO jk = 2, nz
DO jl = start, end
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down
4 changes: 2 additions & 2 deletions transformations/tests/test_single_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_extract_sca_horizontal(frontend, horizontal):
c = 5.345
DO jk = 2, nz
DO jl = 1, nlon
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand All @@ -52,7 +52,7 @@ def test_extract_sca_horizontal(frontend, horizontal):
exp_loop_nest = """
c = 5.345
DO jk=2,nz
t(jk) = c*k
t(jk) = c*jk
q(jk) = q(jk - 1) + t(jk)*c
END DO
"""
Expand Down
22 changes: 11 additions & 11 deletions transformations/tests/test_single_column_coalesced.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_scc_revector_transformation(frontend, horizontal):
c = 5.345
DO jk = 2, nz
DO jl = start, end
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down Expand Up @@ -105,7 +105,7 @@ def test_scc_revector_transformation(frontend, horizontal):

# Ensure all expressions and array indices are unchanged
assigns = FindNodes(Assignment).visit(kernel.body)
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*k'
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*jk'
assert fgen(assigns[2]).lower() == 'q(jl, jk) = q(jl, jk - 1) + t(jl, jk)*c'
assert fgen(assigns[3]).lower() == 'q(jl, nz) = q(jl, nz)*c'

Expand Down Expand Up @@ -137,7 +137,7 @@ def test_scc_base_resolve_vector_notation(frontend, horizontal):
c = 5.345
DO jk = 2, nz
t(start:end, jk) = c * k
t(start:end, jk) = c * jk
q(start:end, jk) = q(start:end, jk-1) + t(start:end, jk) * c
END DO
END SUBROUTINE compute_column
Expand Down Expand Up @@ -166,7 +166,7 @@ def test_scc_base_resolve_vector_notation(frontend, horizontal):

# Ensure all expressions and array indices are unchanged
assigns = FindNodes(Assignment).visit(kernel.body)
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*k'
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*jk'
assert fgen(assigns[2]).lower() == 'q(jl, jk) = q(jl, jk - 1) + t(jl, jk)*c'


Expand Down Expand Up @@ -245,7 +245,7 @@ def test_scc_demote_transformation(frontend, horizontal):
c = 5.345
DO jk = 2, nz
DO jl = start, end
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down Expand Up @@ -284,7 +284,7 @@ def test_scc_demote_transformation(frontend, horizontal):

# Ensure relevant expressions and array indices are unchanged
assigns = FindNodes(Assignment).visit(kernel.body)
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*k'
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*jk'
assert fgen(assigns[2]).lower() == 'q(jl, jk) = q(jl, jk - 1) + t(jl, jk)*c'
assert fgen(assigns[3]).lower() == 'a = q(jl, 1)'
assert fgen(assigns[4]).lower() == 'b(1) = q(jl, 2)'
Expand Down Expand Up @@ -328,7 +328,7 @@ def test_scc_hoist_multiple_kernels(frontend, horizontal, vertical, blocking):
c = 5.345
DO jk = 2, nz
DO jl = start, end
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down Expand Up @@ -358,7 +358,7 @@ def test_scc_hoist_multiple_kernels(frontend, horizontal, vertical, blocking):

# Ensure all expressions and array indices are unchanged
assigns = FindNodes(Assignment).visit(kernel.body)
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*k'
assert fgen(assigns[1]).lower() == 't(jl, jk) = c*jk'
assert fgen(assigns[2]).lower() == 'q(jl, jk) = q(jl, jk - 1) + t(jl, jk)*c'
assert fgen(assigns[3]).lower() == 'q(jl, nz) = q(jl, nz)*c'

Expand Down Expand Up @@ -430,7 +430,7 @@ def test_scc_annotate_openacc(frontend, horizontal, vertical, blocking):
c = 5.345
DO jk = 2, nz
DO jl = start, end
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down Expand Up @@ -523,7 +523,7 @@ def test_single_column_coalesced_hoist_openacc(frontend, horizontal, vertical, b
c = 5.345
DO jk = 2, nz
DO jl = start, end
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down Expand Up @@ -644,7 +644,7 @@ def test_single_column_coalesced_nested(frontend, horizontal, vertical, blocking
DO jk = 2, nz
DO jl = start, end
t(jl, jk) = c * k
t(jl, jk) = c * jk
q(jl, jk) = q(jl, jk-1) + t(jl, jk) * c
END DO
END DO
Expand Down

0 comments on commit 02e1258

Please sign in to comment.