Skip to content

Commit 5dd4faf

Browse files
authored
Merge pull request #1333 from peverwhee/fix-memory-leak
cam6_4_100: Memory leak fixes
2 parents 386175d + 08db703 commit 5dd4faf

4 files changed

Lines changed: 66 additions & 4 deletions

File tree

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
[submodule "atmos_phys"]
3737
path = src/atmos_phys
3838
url = https://github.com/ESCOMP/atmospheric_physics
39-
fxtag = atmos_phys0_14_000
39+
fxtag = atmos_phys0_14_001
4040
fxrequired = AlwaysRequired
4141
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
4242

doc/ChangeLog

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,66 @@
11
===============================================================
22

3+
Tag name: cam6_4_100
4+
Originator(s): peverwhee, gdicker1
5+
Date: 26 June 2025
6+
One-line Summary: Memory leak fixes
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1333
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
11+
- closes #1318 - NVHPC compilers have a memory leak due to valid code being treated as allocation on assign in coords_1d.F90
12+
- brings in new atmospheric_physics tag to address the leak
13+
14+
- fixes leak in RRTMGP and modifies interfaces
15+
16+
Describe any changes made to build system: none
17+
18+
Describe any changes made to the namelist: none
19+
20+
List any changes to the defaults for the boundary datasets: none
21+
22+
Describe any substantial timing or memory changes: none
23+
24+
Code reviewed by: cacraig
25+
26+
List all files eliminated: n/a
27+
28+
List all files added and what they do: n/a
29+
30+
List all existing files that have been modified, and describe the changes:
31+
32+
.gitmodules
33+
- update to atmospheric_physics tag atmos_phys0_14_001
34+
35+
src/atmos_phys
36+
- update submodule
37+
38+
src/physics/rrtmgp/radiation.F90
39+
- modify calling list to rrtmgp_post to match new atmospheric_physics tag
40+
41+
If there were any failures reported from running test_driver.sh on any test
42+
platform, and checkin with these failures has been OK'd by the gatekeeper,
43+
then copy the lines from the td.*.status files for the failed tests to the
44+
appropriate machine below. All failed tests must be justified.
45+
46+
derecho/intel/aux_cam:
47+
48+
SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL)
49+
- pre-existing failure due to build-namelist error requiring CLM/CTSM external update
50+
51+
derecho/nvhpc/aux_cam: All PASS
52+
53+
izumi/nag/aux_cam: All PASS
54+
55+
izumi/gnu/aux_cam: All PASS
56+
57+
CAM tag used for the baseline comparison tests if different than previous
58+
tag:
59+
60+
Summarize any changes to answers: BFB
61+
62+
===============================================================
63+
364
Tag name: cam6_4_099
465
Originator(s): eaton
566
Date: 24 June 2025

src/physics/rrtmgp/radiation.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,8 +1463,9 @@ subroutine radiation_tend( &
14631463
cam_out%netsw(:) = 0._r8
14641464

14651465
! Calculate radiative heating (Q*dp), set netsw flux, and do object cleanup
1466-
call rrtmgp_post_run(qrs_prime(:ncol,:), qrl_prime(:ncol,:), fsns(:ncol), state%pdel(:ncol,:), atm_optics_sw, cloud_sw, aer_sw, &
1467-
fsw, fswc, sources_lw, cloud_lw, aer_lw, flw, flwc, qrs(:ncol,:), qrl(:ncol,:), cam_out%netsw(:ncol), errmsg, errflg)
1466+
call rrtmgp_post_run(qrs_prime(:ncol,:), qrl_prime(:ncol,:), fsns(:ncol), state%pdel(:ncol,:), atm_optics_sw, cloud_sw, &
1467+
aer_sw, fsw, fswc, atm_optics_lw, sources_lw, cloud_lw, aer_lw, flw, flwc, qrs(:ncol,:), qrl(:ncol,:), &
1468+
cam_out%netsw(:ncol), errmsg, errflg)
14681469
if (errflg /= 0) then
14691470
call endrun(sub//': '//errmsg)
14701471
end if

0 commit comments

Comments
 (0)