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 test failures with ifx due to use of host associated arrays #1606

Merged
merged 8 commits into from
Dec 5, 2024

Conversation

abrooks1085
Copy link
Contributor

@abrooks1085 abrooks1085 commented Oct 24, 2024

Description
Adds save attribute to host associated arrays in test_topography and test_diag_integral so that these tests now pass with the ifx compiler.

How Has This Been Tested?
The Topography and Diag_integral unit tests successfully build and pass using the Intel oneAPI 2024.2 IFX compiler on an 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

uramirez8707
uramirez8707 previously approved these changes Oct 24, 2024
Copy link
Contributor

@rem1776 rem1776 left a comment

Choose a reason for hiding this comment

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

Just curious, what error is being fixed by adding the save attributes?

test_fms/diag_integral/test_diag_integral.F90 Outdated Show resolved Hide resolved
@bensonr
Copy link
Contributor

bensonr commented Oct 24, 2024

Same question as @rem1776.

@laurenchilutti
Copy link
Contributor

Can you rewrite this test to pass the arrays into the subroutines rather than keep them as program level variables? From our group discussions, this seems to be agreed upon as a path forward with this unit test.

Copy link
Contributor Author

@abrooks1085 abrooks1085 left a comment

Choose a reason for hiding this comment

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

Updated my branch and removed the save attribute in favor of passing arrays to subroutine directly

@abrooks1085 abrooks1085 changed the title Added save attribute to Host Associated Arrays Fix test failures with ifx due to use of host associated arrays Nov 7, 2024
immadeuph=1.0_lkind
weight=1.0_lkind

end subroutine initialize_arrays
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not get rid of initialize_arrays and initialize these in the declaration statements at the top of the program instead? As a bonus, that would give them an implicit save attribute.

@rem1776 rem1776 merged commit 899ea6e into NOAA-GFDL:main Dec 5, 2024
26 of 28 checks passed
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.

6 participants