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

data_override_init: Initialize both r4 and r8 modes by default #1638

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

J-Lentz
Copy link
Contributor

@J-Lentz J-Lentz commented Jan 27, 2025

Description
If data_override_init is called with no mode argument, initialize both the r4_kind and r8_kind versions of the module by default.

How Has This Been Tested?
Github CI

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

Jesse Lentz added 2 commits January 27, 2025 11:23
If `data_override_init` is called with no `mode` argument, initialize
both the r4_kind and r8_kind versions of the module by default.
Replace all occurrences of `if (iand(___, r4_kind))` with
`if (iand(___, r4_kind).eq.r4_kind)`
Copy link
Contributor

@uramirez8707 uramirez8707 left a comment

Choose a reason for hiding this comment

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

Just a question. Please update/add the unit tests.


if (present(mode)) then
mode_selector = mode
if (mode.eq.r4_kind .or. mode.eq.r8_kind) then
mode_flags = mode
Copy link
Contributor

Choose a reason for hiding this comment

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

What if I call data_override twice, once with the mode as r4_kind and another time as r8_kind? I think this model_flags will be overridden. Does this matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's correct. Lines 146-149 should update atm_mode, etc. using bitwise or rather than just assign mode_flags as the value.

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.

2 participants