Missing types in LFRic infrastructure

Open
#2,018 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
fortran, python
Domain
compilers, hpc

Research direction

Start with the extraction-driver generation and LFRicConstants.PRECISION_MAP, then inspect infrastructure/source/utilities/constants_mod.F90, especially the definitions and exports for r_phys, r_quad, and the precision symbols. Confirm the intended r_quad behavior with the surrounding LFRic infrastructure. Done means the generated driver imports the required symbols and compiles without the reported type or export errors.

Written by the indexing model from the issue text.

Description

LFRic

Two types issues that need to be either fixed or resolved in LFric before we can change them in PSyclone:

  1. PSyclone defines r_phys (and other physics related types), but they are not defined in the infrastructure. This results in the extraction driver not compiling (since it imports all defined symbols). For now r_phys and r_quad are explicitly ignored, but this should be fixed.

  2. LFRicConstants defines:

        LFRicConstants.PRECISION_MAP = {"i_def": 4,
                                        "r_def": 8,
                                        "r_double": 8,
                                        "r_ncdf": 8,
                                        "r_quad": 16,
...

When I use the PRECISION_MAP to create a driver and import all precision symbols from the PRECISION_MAP, the created code does not compile. because constants_mod.F90 does define but not export the symbol.

This is the same in current LFRic (https://code.metoffice.gov.uk/svn/lfric/LFRic/trunk/infrastructure/source/utilities/constants_mod.F90). Since I am not sure how/if r_quad is supposed to be used, I explicitly do not import r_quad, and refer this ticket :)

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.