New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1436 (Possible invalid call to oasis_get_freqs) – NEMO

Opened 9 years ago

Closed 7 years ago

#1436 closed Bug (wontfix)

Possible invalid call to oasis_get_freqs

Reported by: ufla Owned by: smasson
Priority: normal Milestone:
Component: OCE Version: trunk
Severity: Keywords:
Cc:

Description

The code in sbccpl.F90 calls oasis_get_freqs (via cpl_freq from cpl_oasis3.F90). This should only happen if ln_dm2dc is false, as in:

IF( ln_dm2dc .AND. ( cpl_freq( jpr_qsroce ) + cpl_freq( jpr_qsrmix ) /= 86400 ) ) &
&   ...

However, the compiler may decide to evaluate the terms on the right hand side of the AND operator anyway, not only if ln_dm2dc is false. This leads to an invalid OASIS call if not both the qsroce and qsrmix coupling fields are definded.

In other words, the above code assumes that the qsroce and qsrmix coupling fields are both defined and may terminate the model run if not.

This has happened with Intel compilers at O2 optimisation level.

The proposed solution is to split the above line into two separate IF statements.

Note that, in order to maintain a robust coupling interface, the code should not even assume that qsroce and qsrmix are always set together. In EC-Earth, we have qsroce and qsrice.

Commit History (0)

(No commits)

Change History (2)

comment:1 Changed 9 years ago by clevy

  • Owner changed from NEMO team to smasson

comment:2 Changed 7 years ago by clevy

  • Resolution set to wontfix
  • Status changed from new to closed

Suppressing tickets opened on the trunk since more than 2 years... cleaning started!

Note: See TracTickets for help on using tickets.