LFRic PSyIR datatypes are really for kernel arguments currently

Open
#2,425 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
fortran, python
Domain
compilers

Research direction

Start by tracing the LFRic PSy layer code around symbol_table.find_or_create_tag and LFRicTypes("DofMapDataSymbol"), then compare how kernel arguments and PSy-layer arrays represent rank. The issue does not name a file or test; done would require an agreed datatype distinction and correct dof-map rank handling in both contexts.

Written by the indexing model from the issue text.

Description

LFRic

I've been trying to add some 'proper' Symbols into the code that creates the LFRic PSy layer. I tried to add a dof-map array but found that that gives me a rank 1 array whereas in the PSy layer, it is a rank 2 array - a 1D slice of it is passed down to a kernel.

sym = self._symbol_table.find_or_create_tag(
                            map_name, fs=fs_name,
                            symbol_type=LFRicTypes("DofMapDataSymbol"),
                            dims=[Reference(ndf_symbol)])

Perhaps we need to prefix the existing type names with "Kernel" to distinguish them from those in the PSy layer? What do you think @rupertford?

Dominant language
Python
Stars
137
Forks
36
Avg merge
6d 16h
Merged PRs (30d)
18

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stfc/PSyclone

All issues in stfc/PSyclone

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.