Restructure alloc space calls into simpler smaller files (#2068)
commited585bda6457604d1867d29be8b4e9abaf649313
authorAnthony Islas <128631809+islas@users.noreply.github.com>
Thu, 26 Sep 2024 22:20:17 +0000 (26 15:20 -0700)
committerGitHub <noreply@github.com>
Thu, 26 Sep 2024 22:20:17 +0000 (26 15:20 -0700)
tree50a2c42f52520f344872c77c25dbf182e98dd945
parent958ce123c548645e56db9a2d6b143a69c75536c1
Restructure alloc space calls into simpler smaller files (#2068)

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_alloc_space*` sections of code to reduce
their individual file size to manageable levels. They are instead broken
out into many smaller files as external subroutines, not requiring a
wrapper module to house the subroutine call. The files are now fully
generated source code from the registry, with the calls to the
subroutines also being generated as well. This also makes it relatively
easy to change the number of files generated from a source code
perspective. Build rules would need to be modified accordingly as seen
in these changes.

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.
24 files changed:
arch/noopt_exceptions
arch/noopt_exceptions_f
clean
frame/CMakeLists.txt
frame/Makefile
frame/module_alloc_space.h [deleted file]
frame/module_alloc_space_0.F [deleted file]
frame/module_alloc_space_1.F [deleted file]
frame/module_alloc_space_2.F [deleted file]
frame/module_alloc_space_3.F [deleted file]
frame/module_alloc_space_4.F [deleted file]
frame/module_alloc_space_5.F [deleted file]
frame/module_alloc_space_6.F [deleted file]
frame/module_alloc_space_7.F [deleted file]
frame/module_alloc_space_8.F [deleted file]
frame/module_alloc_space_9.F [deleted file]
frame/module_domain.F
main/depend.common
tools/CMakeLists.txt
tools/gen_allocs.c
tools/protos.h
var/build/da.make
var/build/da_name_space.pl
var/build/depend.txt