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

update macros and build options for mixed precision #1383

Merged
merged 10 commits into from
Oct 6, 2023

Conversation

rem1776
Copy link
Contributor

@rem1776 rem1776 commented Oct 3, 2023

Description
Some mixed precision clean up of the build systems and macros. Removes the mixed mode option from autotools(always compiles r8 default).

I was unsure whether to change the CMake builds kind options just yet. Since it builds a distinct copy of the library per kind option enabled, this will cause issues in existing cmake builds since the library name includes the kind default. The r4/r8 libraries should both support mixed precision regardless of default so we may want to test with that first and then modify to only build with r8_kind (current cmake default is to only build with r4_kind).

Also cleans up some macros:

  • use_Netcdf was removed; it was always set by autotools and only used in the diag manager
  • NO_QUAD_PRECISION was already not in the code, just removed it from platform.h in favor of ENABLE_QUAD_PRECISION
  • NO_F95 and NO_F2000 were removed, they set macros with the intention of being able to replace features from those fortrans standards (ie. macro _ALLOCATABLE that is set to either pointer or allocatable) but were removed
  • no_4byte_reals was removed
  • no_8byte_integers macro was left in since its not really related to the mixed precision updates. Complex overrides were left in as well.

Lastly I added a comment for the cray pointer flag since its only used in one module so can be misleading, and removed an unused include file that somehow snuck in.

partial fix for #1330 (leaving it open for cray pointer macros)

How Has This Been Tested?
make distcheck with oneapi 23 on amd

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

@rem1776 rem1776 marked this pull request as draft October 3, 2023 20:49
@rem1776 rem1776 marked this pull request as ready for review October 5, 2023 17:09
thomas-robinson
thomas-robinson previously approved these changes Oct 6, 2023
bensonr
bensonr previously approved these changes Oct 6, 2023
@rem1776 rem1776 dismissed stale reviews from bensonr and thomas-robinson via bcd6a9d October 6, 2023 13:52
thomas-robinson
thomas-robinson previously approved these changes Oct 6, 2023
@rem1776 rem1776 merged commit 03ee7de into NOAA-GFDL:main Oct 6, 2023
17 of 19 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.

3 participants