Skip to content

Add logic to reduce optimization for host-model provided GFS_typedefs.F90#869

Merged
grantfirl merged 2 commits into
NCAR:mainfrom
climbfuji:feature/reduce_opt_gfs_typedefs
Mar 4, 2022
Merged

Add logic to reduce optimization for host-model provided GFS_typedefs.F90#869
grantfirl merged 2 commits into
NCAR:mainfrom
climbfuji:feature/reduce_opt_gfs_typedefs

Conversation

@climbfuji
Copy link
Copy Markdown
Collaborator

Add logic to reduce optimization for multiple files, independent of their preceding paths, including the host-model provided GFS_typedefs.F90.

For GFS_typedefs.F90, this is slightly more complicated because the relative path to the file depends on the host model. The solution presented here will add -O1 to any GFS_typedefs.F90 when using Intel in release (PROD), regardless of the host model. We definitely do not want host-model specific code in CMakeLists.txt.

Duplicates for the auto-generated cmake include files need to be removed. This can also be done in the framework before writing the files, but even if that gets done having a second check here doesn't hurt.

This should fix the problem that @junwang-noaa reported (exceeding memory on wcoss_dell_p3 in compile jobs).

Tested to compile (and do the right thing) on Hera with Intel in PROD mode.

@junwang-noaa
Copy link
Copy Markdown
Contributor

The compile works with -o0 option. Let me try creating baseline for Ted's PR.

@grantfirl
Copy link
Copy Markdown
Collaborator

grantfirl commented Mar 3, 2022

@junwang-noaa Do you want this merged into #761 or brought in separately?

@junwang-noaa
Copy link
Copy Markdown
Contributor

@grantfirl Please merge Dom's change to PR#761. I manually copied the code. So far no compile jobs failed in the baseline creation.

@grantfirl
Copy link
Copy Markdown
Collaborator

@climbfuji The fact that a host model file needs changes to a ccpp-physics CMakeLists.txt file for compilation is not intuitive to me. I thought that the build system refactor done a while back was supposed to create the correct separation in the various CMakeLists.txt?

Copy link
Copy Markdown
Collaborator

@grantfirl grantfirl left a comment

Choose a reason for hiding this comment

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

Approved for fixing wcoss_dell compilation issue from ufs-community/ufs-weather-model#1032, but not understood why the compilation of GFS_typedefs.F90 is controlled via a ccpp-physics CMakeLists.txt.

@grantfirl
Copy link
Copy Markdown
Collaborator

@junwang-noaa I've provided instructions for the developer to bring in this bugfix: #761 (comment)

@junwang-noaa
Copy link
Copy Markdown
Contributor

Great! Once the baseline creation is done, I will check out a clean copy of your ufs-weather-model branch and run final RT on dell.

@grantfirl grantfirl merged commit dc5ed83 into NCAR:main Mar 4, 2022
@climbfuji climbfuji deleted the feature/reduce_opt_gfs_typedefs branch June 27, 2022 03:01
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