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.
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:
_domain_(the compute domain shape), even though they can be set in a horizontal execution that is over a different shape