Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#2228 closed Bug (fixed)

out of bound in mpp_min/maxloc if land processor not removed

Reported by: mathiot Owned by: mathiot
Priority: low Milestone:
Component: TOP Version: release-4.0
Severity: minor Keywords:
Cc:

Description

BE CAREFUL !!! Due to dynamic behaviour of this ticket creation page, it is highly recommend to set first all other fields before writing the ticket description below.
If you have lost your draft after an unwanted reload, you can click on the link 'Restore Form' in the contextual menu upper right to recover it.
Remove these lines after reading.

Context

By looking of the job output in debug mode, I found some out of bound in mpp_minloc.

We can see it in the ocean.output of ORCA2_ICE_PISCES in a 8x4 decomposition (ie some land processors are present):

 dom_ctl : extrema of the masked scale factors
 ~~~~~~~
              e1t maxi:  222397.85 at i =     2 j=    74
              e1t mini:       0.00 at i =   182 j=   110
              e2t maxi:  209504.00 at i =     5 j=    92
              e2t mini:       0.00 at i =   182 j=   110

Instead of this in a 4x8 decomposition (no land processor):

 dom_ctl : extrema of the masked scale factors
 ~~~~~~~
              e1t maxi:  222397.85 at i =     2 j=    74
              e1t mini:   47096.05 at i =    51 j=     2
              e2t maxi:  209504.00 at i =     5 j=    92
              e2t mini:   47096.05 at i =    51 j=     2

Analysis

In case the whole local mask is 0, the MINLOC statement retrun (0,0) as indexes ⇒ out of bound later on.

It affect the trunk and version 4.0.

Fix

Set the min/max value for this domain to HUGE/TINY and the variable index0 to 0

Commit History (4)

ChangesetAuthorTimeChangeLog
10726mathiot2019-02-27T16:06:35+01:00

changes related to bug fixes described in tickets #2228, #2229, #2238 and #1595 in NEMO 4.0

10716mathiot2019-02-22T16:26:39+01:00

missing #undef ERRVAL in r10665 (ticket #2228)

10665mathiot2019-02-13T11:40:04+01:00

include fix for ticket #2228

10651mathiot2019-02-08T11:26:14+01:00

branch and suggested changes for ticket #2228 (mpp_loc issue if land processors)

Change History (7)

comment:1 Changed 17 months ago by mathiot

In 10651:

branch and suggested changes for ticket #2228 (mpp_loc issue if land processors)

comment:2 Changed 17 months ago by mathiot

In 10665:

include fix for ticket #2228

comment:3 Changed 17 months ago by mathiot

Branch branches/2019/fix_ticket2228 merged into trunk at revision r10665.

comment:4 Changed 17 months ago by mathiot

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

In 10668:

deleting branch fix_ticket2228

comment:5 Changed 17 months ago by mathiot

Commit r10665 leads to aew warning in the trunk (thank you Guillaume).

Fix: add #undef ERRVAL

comment:6 Changed 17 months ago by mathiot

In 10716:

missing #undef ERRVAL in r10665 (ticket #2228)

comment:7 Changed 17 months ago by mathiot

In 10726:

changes related to bug fixes described in tickets #2228, #2229, #2238 and #1595 in NEMO 4.0

Note: See TracTickets for help on using tickets.