Opened 6 years ago

Closed 6 years ago

#1420 closed Bug (fixed)

Uninitialised array elements in zps_hde

Reported by: ufla Owned by: nemo
Priority: low Milestone:
Component: OCE Version: release-3.6
Severity: Keywords:
Cc:

Description

This is concerning dev_MERGE_2014@r4977:

I get a floating point overview in eos_insitu_2d, called via istate_init(line 139) —> zps_hde(line 306) —> eos_insitu_2d

It turns out that the ztj array (passed from zps_hde to eos) contains elements that are never initialised, because the loop that computes ztj contains an IF statement. However, ztj is never initialised to a default value.

The same applies to the zti array, but the error happened to be triggered by ztj in my case.

Steps to reproduce: Initialise ztj to HUGE(ztj) and compile with floating point exceptions on. (same for zti or both)

As far as my understanding goes expects the eos (eos_insitu_2d) subroutine all elements of pts to be valid.

Commit History (0)

(No commits)

Change History (3)

comment:1 Changed 6 years ago by ufla

It's actually a "floating point overflow", not an "overview" ;-)

comment:2 Changed 6 years ago by mathiot

The error is reproducible with debug options activated (-g -traceback -fpe0 -debug extended -ftz -ftrapuv -check all with ifort). I had initialisation to 0.0_wp for all uninitialised variables. I remove a useless IF statement.

SETTE test run with success. Results of SETTE tests (ie tracer.stat and solver.stat) are the same before and after correction.

Correction committed revision 4985. I think the ticket can be close.

comment:3 Changed 6 years ago by ufla

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