Skip to content

Commit

Permalink
Merge pull request #3234 from GEOS-ESM/hotfix/atrayano/#3232_uninitia…
Browse files Browse the repository at this point in the history
…lized_counter_pointers

Fixes #3232. Properly initialized per-cell counters
  • Loading branch information
tclune authored Dec 10, 2024
2 parents 7f63dbe + 1aa8fb8 commit 7bf00c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Fixed
Properly nullified the pointers to the per-grid-cell counters

### Removed

Expand Down
6 changes: 6 additions & 0 deletions generic/GenericCplComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ subroutine Initialize(CC, SRC, DST, CLOCK, RC)
_VERIFY(STATUS)
allocate(STATE%ARRAY_COUNT (NCPLS), STAT=STATUS)
_VERIFY(STATUS)
DO J = 1, NCPLS
NULLIFY(STATE%ARRAY_COUNT(J)%ptr1c)
NULLIFY(STATE%ARRAY_COUNT(J)%ptr2c)
NULLIFY(STATE%ARRAY_COUNT(J)%ptr3c)
NULLIFY(STATE%ARRAY_COUNT(J)%ptr4c)
END DO
allocate(STATE%ACCUM_RANK (NCPLS), STAT=STATUS)
_VERIFY(STATUS)
allocate(STATE%couplerType(NCPLS), STAT=STATUS)
Expand Down

0 comments on commit 7bf00c9

Please sign in to comment.