Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid silent errors accessing Fieldset fields by ambiguous names #210

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

wdeconinck
Copy link
Member

This should address #194

An exception is thrown when accessing a field by name in the fieldset, when the name is ambiguous.
A unit-test is created that demonstrates the exception.

Copy link

Private downstream CI failed.
Workflow name: private-downstream-ci-hpc
View the logs at https://github.com/ecmwf-actions/private-downstream-ci/actions/runs/9482632345.

@DJDavies2
Copy link
Contributor

I seem to be getting a number of failures in downstream codes with this like so:

Exception: FieldSet: cannot get field with ambiguous name
height_levels". 2 fields are registered with same name. Access field by index or iterator instead. (/home/h01/david.davies/cylc-run/atlas-210/share/mo-bundle/atlas/src/atlas/field/FieldSet.cc +120 field)
FieldSet: cannot get field with ambiguous name
height_levels". 2 fields are registered with same name. Access field by index or iterator instead. caught in (/home/h01/david.davies/cylc-run/atlas-210/share/mo-bundle/oops/src/oops/runs/Run.cc +197 execute)
Exception: oops::ErrorCovarianceToolbox terminating...
Exception stack:
FieldSet: cannot get field with ambiguous name
height_levels". 2 fields are registered with same name. Access field by index or iterator instead.

@wdeconinck
Copy link
Member Author

Thanks @DJDavies2 , this are exactly the silent errors mentioned in #194 (notifying @fmahebert @svahl991)

@wdeconinck
Copy link
Member Author

@svahl991 I updated the testing :)

Copy link

Private downstream CI succeeded.
Workflow name: private-downstream-ci
View the logs at https://github.com/ecmwf-actions/private-downstream-ci/actions/runs/9543986415.

@wdeconinck wdeconinck merged commit ed9eb7e into develop Jun 17, 2024
145 of 149 checks passed
wdeconinck added a commit that referenced this pull request Jun 20, 2024
* release/0.38.0: (47 commits)
  Update Changelog
  Version 0.38.0
  implement a procedure to carry out a regridding from high to low resolution (binning) (#191)
  Fixes opposite pole coordinates (#202)
  Avoid silent errors accessing Fieldset fields by ambiguous names (#210)
  Made sure cubed-sphere interpolation method always sets metadata. (#208)
  Add fortran interface for node-to-edge connectivity building (#209)
  Removed redundant headers.
  Fixed SphericalVector.
  Fixed StructuredInterpolation2D.
  Added failing tests.
  Update ci.yml to fix notification (#207)
  Add notifications to github workflows
  Remove float in Triag2D intersection algorithm (#203)
  Fixup: use C++17 uncaught_exceptions (extra s in exceptions)
  Disable logging of ATLAS_TRACE during stack unwinding (e.g. when exception is thrown)
  Add GPU offloading capability with OpenACC support to Native WrappedDataStore
  Add C++ OpenACC test for some sanity
  Refactor OpenACC support and implement for Native arrays
  Enable use of CUDA for Native arrays
  ...
@fmahebert
Copy link
Contributor

@wdeconinck Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Risk of surprising behavior when adding multiple Fields of same name into FieldSet
3 participants