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

fix format string overflow in diag_integral test #1624

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rem1776
Copy link
Contributor

@rem1776 rem1776 commented Dec 5, 2024

Description
The diag_integral test failing from the issue below ended up being from overflow due to the xtime variable's value having more digits before the decimal than the given width of 10 will allow. With this PR it'll check the count of digits before the decimal, and if its greater than ten it'll just output using the exponent notation instead.

I cleaned up the format_data_init routine a bit by adjusting the indices used when it sets the data format string so it won't have additional spaces throughout. Also changed it's arguments to required (its private and only called with args) and removed some unused variables.

Fixes #1623

How Has This Been Tested?
oneapi 2024.2 on the amd box.

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

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.

diag integral error during output with intel 2024.2
2 participants