Skip to content

Commit

Permalink
#1010 Revert some Compilation deletion and fix some coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sergisiso committed Feb 14, 2025
1 parent ada35dc commit 71f85e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/psyclone/domain/lfric/lfric_kern.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,6 @@ def gen_stub(self) -> Container:
arg_list = []
for argument_name in create_arg_list.arglist:
arg_list.append(stub_routine.symbol_table.lookup(argument_name))
# If a previous argument has not been given an order by KernStubArgList
# ignore it.
for argument in stub_routine.symbol_table.argument_list:
if argument not in arg_list:
argument.interface = UnknownInterface()
stub_routine.symbol_table.specify_argument_list(arg_list)

return stub_module
Expand Down
4 changes: 2 additions & 2 deletions src/psyclone/psyGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ def zero_reduction_variable(self):
f"'{var_arg.intrinsic_type}'.")

# Retrieve the variable and precision information
kind_str = f"kind={var_arg.precision}" if var_arg.precision else ""
kind_str = f"(kind={var_arg.precision})" if var_arg.precision else ""
variable = self.scope.symbol_table.lookup(variable_name)
insert_loc = self.ancestor(PSyLoop)
# If it has ancestor directive keep going up
Expand All @@ -1138,7 +1138,7 @@ def zero_reduction_variable(self):
local_var = self.scope.symbol_table.find_or_create_tag(
local_var_name, symbol_type=DataSymbol,
datatype=UnsupportedFortranType(
f"{var_data_type}({kind_str}), allocatable, "
f"{var_data_type}{kind_str}, allocatable, "
f"dimension(:,:) :: {local_var_name}"
))
nthreads = \
Expand Down
2 changes: 2 additions & 0 deletions src/psyclone/tests/dynamo0p3_basis_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ def test_two_qr_different_shapes(tmpdir):
"diff_basis_w2_qrf, ndf_w3, undf_w3, map_w3(:,cell), basis_w3_qrf,"
" diff_basis_w3_qrf, nfaces_qrf, np_xyz_qrf, weights_xyz_qrf)"
in code)
assert LFRicBuild(tmpdir).code_compiles(psy)


def test_anyw2(tmpdir, dist_mem):
Expand Down Expand Up @@ -864,6 +865,7 @@ def test_qr_plus_eval(tmpdir):
" DEALLOCATE(basis_w0_on_w0, basis_w1_qr, basis_w3_qr, "
"diff_basis_w1_on_w0, diff_basis_w2_qr, diff_basis_w3_qr)\n")
assert output_dealloc in code
assert LFRicBuild(tmpdir).code_compiles(psy)


def test_two_eval_same_space(tmpdir):
Expand Down

0 comments on commit 71f85e2

Please sign in to comment.