Skip to content

Conversation

bartgol
Copy link
Contributor

@bartgol bartgol commented May 27, 2025

Add parent of source field to the newly created fields. Add test to ensure this works as expected.

[BFB]


This bug was sneaky to find. Should not affect any existing code, since if this affected your code, it would have likely caused a crash somewhere (not guaranteed, though, so it may indeed improve someone's life).

@bartgol bartgol requested a review from mahf708 May 27, 2025 22:35
@bartgol bartgol self-assigned this May 27, 2025
@bartgol bartgol added BFB PR leaves answers BFB EAMxx Issues related to EAMxx bug fix PR labels May 27, 2025
Copy link
Contributor

@mahf708 mahf708 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you find it though 👀 asking for science

@bartgol
Copy link
Contributor Author

bartgol commented May 27, 2025

How did you find it though 👀 asking for science

I was calling

  print_field_hyperslab(f.alias("blah"));

where f was a subfield. This caused problems when we access the view, since, without a parent field, the code tries to happily use get_view instead of get_strided_view, which leads to errors due to wrong calculation of view sizes from the allocation.

bartgol added a commit that referenced this pull request May 28, 2025
Add parent of source field to the newly created fields.
Add test to ensure this works as expected.

[BFB]
@bartgol bartgol merged commit 278c23e into master May 28, 2025
19 of 20 checks passed
@bartgol bartgol deleted the bartgol/eamxx/field-header-bugfix branch May 28, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFB PR leaves answers BFB bug fix PR EAMxx Issues related to EAMxx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants