Opened 10 years ago
Closed 8 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 10 years ago by clevy
- Owner changed from NEMO team to smasson
comment:2 Changed 8 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!