[PSyData] In kernel extraction don't write constants out

Open
#2,153 0 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

Research direction

Start by tracing the PSyData extraction and driver paths, including dependency analysis and user-defined values. Then inspect the Fortran binary writer's expected variable order. Done means extraction and driver use the same ordered list, constants are excluded, and binary output remains aligned with driver input.

Written by the indexing model from the issue text.

Description

PSyData

While #1990 ignores constant values in the driver, this solution only works with NetCDF (since NetCDF uses the name of the variables, and will therefore just skip unused values in the kernel data file). But the Fortran binary file writer relies on reading the variables in the right order, so writing constants to the file will not work since the driver will not skip these values. Additionally, there is no need to make the output files bigger by adding the constants in.

  • Make sure the extraction and driver use the same list of variables names in the same order. ATM there is still code that might re-run the dependency analysis (or accept user-defined values), which could break things.
  • Exclude all constants from the list of variables
  • Verify this esp. with the binary Fortran writer (since it is sensitive to a mismatch in the extracted data and the read-in code in the driver).
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.