ukaea / ukaea/PROCESS

Investigate sign flipping of ric(nohc) in regression tests

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

@mkovari is already working on this.

Since Feb 11, 2026.

Testing
Dominant language
Python
Stars
71
Forks
27
Avg merge
2d 18h
Merged PRs (30d)
33

Description

The ric(nohc) variable is currently ignored in regression tests (on the 1092 python conversion branch) because in the i_mode scenario the sign of the value is consistently different between local and CI test runs of this scenario. This is documented further in #1118.

This seems to be due to a comparison of two identical values, where the rounding error on them can result in a sign flip of the value of ric(nohc). The magnitude does not change, only the sign. The sign of the value has been seen to alternate between positive and negative at least twice during a run of the i_mode test on the CI system.

This failure seems to be a product of a bug (or at least weakness) in Process itself that appears to be longstanding, and was possibly masked in the old test suite due to a problem detecting negative diffs, although I am not certain of that.

Ideally an explanation for the difference between the local (i.e. my machine) and CI system results for the value of ric(nohc) needs to be found. My theory of "random" rounding errors (which consistently produce opposing results) does not sit well with me. If this can be explained, then a better solution for the sign of this value should be found, perhaps by using a rounding-error tolerant comparison.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.