Skip to content

Import state nuopc state_diagnose call is not under dbug_flag > 1, causing ESMF logfile flood #1667

Description

@jimmielin

What happened?

In a run that has a preceding unrelated ESMF error (which creates the PET.. ESMF_LogFile), the run will get flooded with state diagnosis checks that take up CPU time and significant disk space

This is because this call

! Unpack import state
if (mediator_present) then
call t_startf ('CAM_import')
call State_diagnose(importState, string=subname//':IS', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

does not have a dbug_flag > 1 gate like the others, e.g.,

! diagnostics
if (dbug_flag > 1) then
call State_diagnose(exportState, string=subname//':ES',rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (masterproc) then
call log_clock_advance(clock, 'CAM', iulog, rc)

one should be added to match the others

What are the steps to reproduce the bug?

See above

the logfile will be flooded with stuff like this on every core

20260831 160442.916 INFO             PET00  (med_methods_Field_GeomPrint):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_
anidr: dataptr bounds dim=1            1         144
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
: distGrid=element
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
:    dimCount=           1
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
:    tileCount=           1
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
:    deCount=          96
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
:    localDeCount=           1
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
:    minIndexPTile=           1
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
:    maxIndexPTile=       13824
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
: distGrid=nodal
20260831 160442.916 INFO             PET00  (med_methods_Mesh_Print):(/home/hplin/260831_sima_cam4_fhist/CAM-SIMA.dev/components/cmeps/cime_config/../mediator/med.F90:completeFieldInitialization):Sl_avsdf
:    dimCount=           1

What CAM tag were you using?

cam6_4_199

What machine were you running CAM on?

CISL machine (e.g. derecho)

What compiler were you using?

Intel

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

Any CAM SE can do this

Extra info

assisted-by: claude-fable:5 when working on CAM-SIMA FHIST_C4
the equivalent bug is present in CAM-SIMA as well and will be fixed in another PR

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Must have CESM3bugSomething isn't working correctlymisc tagissue or PR candidate for upcoming misc tag

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions