Skip to content

Incorrect assumptions in gtc:numpy backend #632

@jdahm

Description

@jdahm

I have observed the gtc:numpy backend generating code that emits run-time errors in a few cases lately. On further inspection, these can be traced back to a few incorrect assumptions in the backend:

  • LocalScalars are sized with _domain_ (the compute domain shape), even though they can be set in a horizontal execution that is over a different shape
  • When LocalScalars are assigned to inside a mask statement, they operate on the entire field, which might not be valid. This might not actually lead to run-time errors, but could emit warnings and extra computation.
  • When LocalScalars are referenced in RHS expressions in MaskStmts, they do not use a mask, which can lead to sizing errors.

Metadata

Metadata

Assignees

Labels

module: backendRelated to analysis/backend subpackagestriage: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions