-
Notifications
You must be signed in to change notification settings - Fork 687
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
Break out module_dm external subroutines into separate files #2069
Conversation
The regression test results:
|
I tested code before and after this PR, and model produces identical results in my test. Also with 4 processors, the compile time is about 12 minutes! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't yet done any nested runs to test these changes. The only potential issue that I can see so far is related to the use of .F90
suffixes for files that are compiled based on rules in configure.wrf
. Specifically, configure.wrf
has a rule for turning .F90
files into .o
files: https://github.com/wrf-model/WRF/blob/v4.6.0/arch/postamble#L206-L212 . For case-insensitive filesystems, the intermediate .f90
files could be problematic, and so it may be better to use .F
as the suffix for the new feedback_domain_em_part1.F90
, etc. files.
Note that other .F90
files in RSL_LITE (e.g., f_xpose.F90
) are compiled with RSL_LITE's rules that don't generate intermediate .f90
files.
After cleaning the build, it looks like the following processed source files aren't being removed:
|
I removed the |
TYPE: enhancement
KEYWORDS: intel, compilation, llvm, memory
SOURCE: internal
DESCRIPTION OF CHANGES:
Problem:
The Intel oneAPI compilers (and others like nvhpc) struggle with some of the larger (15k+ lines of code) files within WRF. This causes intense memory usage that is not often available to the average user not in a resource-rich environment. This often limits compilation to single threaded if even possible or to a dedicated environment with enough memory if available. If neither of those is available to a user, they will be unable to use these configurations entirely.
Solution:
This PR focuses on the
module_dm
sections of code to reduce its individual file size to manageable levels. This and its helper subroutines are instead broken out into many smaller files.TESTS CONDUCTED:
Attached to this PR are plots of the respective effects of theses changes. Changes were tested with intel and gcc compilers, but only intel memory usage is shown as it exacerbates the memory usage issue.