Skip to content

Conversation

adcroft
Copy link
Member

@adcroft adcroft commented Aug 7, 2025

These commits fix two uninitialized jump conditions detected using valgrind on tc4

  • Restart of MEKE%Le
  • assert() checks in MOM_diag_mediator.F90

@adcroft adcroft added the bug Something isn't working label Aug 7, 2025
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

I agree that these changes are correct and necessary.

The function query_initialized() expects the argument to be a target
array, but when passed an allocatable it leads to a uninitialized
jump condition when "restarting" MEKE%Le. Rearranging the logic
to only query if the array is allocated avoids the error.
In two functions wihtin MOM_diag_mediator.F90, a "msg" string is
declared and passed to error check (assertion), but was never filled
with characters. I've removed the errant string and changed the
error message to use already available information, namely the name
of the field being configured.
@Hallberg-NOAA
Copy link
Member

Hallberg-NOAA commented Aug 12, 2025

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/28519 .

@Hallberg-NOAA Hallberg-NOAA merged commit 45140df into NOAA-GFDL:dev/gfdl Aug 12, 2025
52 checks passed
@adcroft adcroft deleted the memory-bugfixes branch September 18, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants