Skip to content

FADIAB test on Derecho GNU failure due to use-before-initialize dbuf3 in se/dyn_comp.F90::read_inidat #509

Description

@jimmielin

What happened?

SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam has been failing for a while.

What are the steps to reproduce the bug?

Run the Derecho GNU regression tests or this test individually SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam.

What CAM-SIMA hash were you using?

sima0_15_000

What machine were you running CAM-SIMA on?

CISL machine (e.g. cheyenne)

What compiler were you using?

GNU

Path to a case directory, if applicable

No response

Will you be addressing this bug yourself?

No

Extra info

shr_reprosum_calc call crashes due to commented out cnst_init_default (constituent default value initialization) in src/dynamics/se/dyn_comp.F90

adding initialization for dbuf3 will fix the runtime crash

         ! Constituent not found in IC file (or se_read_trace disabled):
         ! initialize the read buffer so that the minimum-value clamp below
         ! yields a well-defined value (const_qmin) instead of reading
         ! uninitialized memory.
         ! TODO: replace with constituent default-value initialization once
         ! that infrastructure is available (see commented-out call below,
         ! inherited from CAM):
         !call cnst_init_default(m_cnst, latvals, lonvals, dbuf3, pmask)
         dbuf3 = 0.0_r8
         if (par%masterproc) then
            write(iulog,*) subname//': constituent "', trim(const_name(m_cnst)), &
                 '" not found in IC file; initializing to minimum value'
         end if

investigated by claude-fable-5[1m]

I think #344 will fix this, but I opened this issue to be sure we know about the root cause of the current failure in case it is not addressed after #344 is merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions