Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

ESMF time calculations produce strange results

Hello,

I have the following problem when running CLM3.5:

In file ESMF_TimeMod.F90, line 473, the subroutine ESMF_TimeSet is called. If I set a breakpoint there, the debugger tells me:

Breakpoint 1, __esmf_timemod__esmf_timeget (time=@0x7fffdd5da420, yy=0x0, yrl=0x0, mm=0x0, dd=0x0, d=0x0, dl=0x0, h=0x0, m=0x0, s=0x0,
sl=0x0, ms=0x0, us=0x0, ns=0x0, d_=0x0, h_=0x0, m_=0x0, s_=0x0, ms_=0x0, us_=0x0, ns_=0x0, sn=0x0, sd=0x0, dayofyear=0x0,
dayofyear_r8=0x7fffdd5da490, dayofyear_intvl=0x0, timestring=0x0, rc=0x7fffdd5da4a4, _timestring=0)

In the next step, the program enters this subroutine and the debugger reports:

(gdb) s
__esmf_timemod__esmf_timeset (time=@0x7fffdd5da230, yy=0x7fffdd5da2c8, yrl=0x0, mm=0x7ba9e4, dd=0x7ba9e4, d=0x0, dl=0x0, h=0x0, m=0x0,
s=0x7ba9e8, sl=0x0, ms=0x0, us=0x0, ns=0x0, d_=0x0, h_=0x0, m_=0x0, s_=0x0, ms_=0x0, us_=0x0, ns_=0x0, sn=0x0, sd=0x0,
calendar=0x9fede0, rc=0x7fffdd5da2d8) at /home/klaueckh/clm3.5/src/utils/esmf_wrf_timemgr/ESMF_TimeMod.F90:608

Later on, CLM crashes with

ESMF_TimeIntervalGet: -1438803588265
ESMF_TimeIntervalGet: -45624 0 0 -1438803588265
calday = -16652819.3086227
ENDRUN:get_curr_calday: error get_curr_calday out of bounds
MPI_Abort: error code = 1

Program exited with code 01.

I suspect that this error could be caused by the fact that some of the arguments of subroutine ESMF_TimeSet change their values in a rather strange way when entering this subroutine. For example, the debugger shows me that yy is 0x0 (=0) when ESMF_TimeSet is called. After entering ESMF_TimeSet, however, yy is suddenly 0x7fff40dcdac8 (=140734281603784).

Does anybody have an explanation for this behaviour? I have compiled the source code with gfortran.

KlausE
 
Top