Opened 2 years ago

Closed 2 years ago

#722 closed defect (fixed)

Crash when passing c0_alloc to XIOS

Reported by: mmcgrath Owned by: somebody
Priority: major Milestone: ORCHIDEE 4.1
Component: Biogeochemical processes Version:
Keywords: Functional allocation Cc:

Description

On Irene, using a single pixel, 1 CPU, and the executable compiled in debug mode for r6868. On the first year in FG1, there is a crash on the first day.

[irene1022:51851:0] Caught signal 8 (Floating point exception)
!==== backtrace ====
! 2 0x000000000006bc9c mxm_handle_error() /var/tmp/OFED_topdir/BUILD/mxm-3.7.3112/src/mxm/util/debug/debug.c:641
! 3 0x000000000006c1ec mxm_error_signal_handler() /var/tmp/OFED_topdir/BUILD/mxm-3.7.3112/src/mxm/util/debug/debug.c:616
! 4 0x00000000000363f0 killpg() ??:0
! 5 0x00000000050463f3 _ZN4xios13CSourceFilter10streamDataILi2EEEvNS_5CDateERKNS_6CArrayIdXT_EEE() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/XIOS/src/filter/source_filter.cpp:82
! 6 0x0000000003eae924 _ZN4xios6CField7setDataILi2EEEvRKNS_6CArrayIdXT_EEE() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/XIOS/src/node/field_impl.hpp:24
! 7 0x0000000004707ed5 cxios_write_data_k82() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/XIOS/src/interface/c/icdata.cpp:466
! 8 0x00000000032ab0bc idata_mp_xios_send_field_r8_2d_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/XIOS/ppsrc/xios/interface/fortran/idata.f90:467
! 9 0x0000000001996015 xios_orchidee_mp_xios_orchidee_send_field_r2d_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/parallel/xios_orchidee.f90:837
!10 0x0000000002d8557e stomate_growth_fun_all_mp_growth_fun_all_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/stomate/stomate_growth_fun_all.f90:5715
!11 0x0000000000fd130d stomate_lpj_mp_stomate_lpj_vegetation_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/stomate/stomate_lpj.f90:1093
!12 0x0000000000babe2c stomate_mp_stomate_main_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/stomate/stomate.f90:2993
!13 0x00000000009e81e9 slowproc_mp_slowproc_main_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/sechiba/slowproc.f90:936
!14 0x0000000000933fcd sechiba_mp_sechiba_main_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/sechiba/sechiba.f90:1211
!15 0x00000000005b2158 intersurf_mp_intersurf_main_2d_() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/sechiba/intersurf.f90:584
!16 0x0000000000511ef1 MAIN() /ccc/work/cont003/gen6328/mcgrathm/TRUNK.HEAD/modeles/ORCHIDEE/build/ppsrc/orchidee_ol/dim2_driver.f90:1285
!17 0x000000000044d1ce main() ??:0
!18 0x0000000000022545
libc_start_main() ??:0
!19 0x000000000044d0e9 _start() ??:0

The configuration is different from the svn configuration of SPINUP_ANALYTIC_FG1 only in the following ways:

****************************
Running diff for orchidee.def.
16a17,19

USE_RESERVE_N = y
OK_DYNROOT_HA = y
HACK_E_FRAC = y

112c115
< RIVER_ROUTING = y
---

RIVER_ROUTING = n

189,190c192,193
< OK_READ_FM_MAP=y
<
---

OK_READ_FM_MAP=n
FOREST_MANAGED_FORCED=1

****************************
Running diff for run.def.
31,34c31,34
< #LIMIT_WEST=8
< #LIMIT_NORTH=48
< #LIMIT_SOUTH=46
< #LIMIT_EAST=10
---

LIMIT_WEST=-22
LIMIT_NORTH=82
LIMIT_SOUTH=80
LIMIT_EAST=-20

35a36

PRINTLEV_stomate_lpj=5

Change History (2)

comment:1 Changed 2 years ago by mmcgrath

Latest test with r6870, shows results have changed.

c0_alloc for PFT 1 is now NaN when it tries to write with XIOS, which clearly will cause an XIOS error. This is because c0_alloc is never set for bare soil in growth_fun_all. I initialized the value of c0_alloc(:,1)=zero at the beginning of the routine, and now it runs.

c0_alloc is used as a local variable in several other routines, but is not always an array. I did the same thing when it is an array (in prescribe) to prevent a similar crash from occurring.

Changes committed in r6871.

comment:2 Changed 2 years ago by mmcgrath

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.