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

Adds an option to override the real precision to r4 #68

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

uramirez8707
Copy link
Collaborator

This can be used in an xmls by doing

<makeOverrides>USE_R4="ON"</makeOverrides>

For the component that you want to use r4 for.

This option will allow us to compile different components at different precisions (i.e compile fv3 in r4 and everything else in r8)

@uramirez8707
Copy link
Collaborator Author

@bensonr @underwoo

Copy link

@bensonr bensonr left a comment

Choose a reason for hiding this comment

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

While this looks good for Intel on c5, what about the other templates?

@uramirez8707
Copy link
Collaborator Author

While this looks good for Intel on c5, what about the other templates?

@bensonr Should all templates be updated?

@bensonr
Copy link

bensonr commented Jul 31, 2024

@uramirez8707 - I think we should make this available in the same manner for all compiler templates contained within the mkmf system. The SHiELD model and build system also support the NVidia HPC Toolkit and GCC compilers. As the SHiELD build system is phased out in favor of the updated fre-cli, we need to ensure any templates used by this new system have the proper support.

Comment on lines 83 to 89
ifdef USE_R4
REAL_PRECISION := -r4
CPPDEFS += -DOVERLOAD_R4
else
REAL_PRECISION := -r8
endif

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bensonr
should we be using -real-size 32 and real-size 64 instead?

Copy link

Choose a reason for hiding this comment

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

@uramirez8707 - Yes, I think we should be using the updated -real-size for both OneAPI and classic ifort.

@ceblanton ceblanton merged commit 9830f1a into NOAA-GFDL:main Oct 10, 2024
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