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.
Changeset 14664 for NEMO – NEMO

Changeset 14664 for NEMO


Ignore:
Timestamp:
2021-03-31T19:02:29+02:00 (3 years ago)
Author:
hadcv
Message:

#2600: Fix domtile bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DOM/domtile.F90

    r14537 r14664  
    131131      LOGICAL :: llhold 
    132132      CHARACTER(len=11)   :: charout 
     133      INTEGER :: iitile 
    133134      !!---------------------------------------------------------------------- 
    134135      llhold = .FALSE. 
     
    160161      ! Calculate the modifying factor on DO loop bounds (1 = do not work on halo of a tile that has already been processed) 
    161162      nthl = 0 ; nthr = 0 ; nthb = 0 ; ntht = 0 
    162       IF( ktsi > Nis0 ) THEN ; IF( l_tilefin(ktile - 1         ) ) nthl = 1 ; ENDIF    ! Left adjacent tile 
    163       IF( ktei < Nie0 ) THEN ; IF( l_tilefin(ktile + 1         ) ) nthr = 1 ; ENDIF    ! Right  "  " 
    164       IF( ktsj > Njs0 ) THEN ; IF( l_tilefin(ktile - nn_ltile_i) ) nthb = 1 ; ENDIF    ! Bottom "  " 
    165       IF( ktej < Nje0 ) THEN ; IF( l_tilefin(ktile + nn_ltile_i) ) ntht = 1 ; ENDIF    ! Top    "  " 
     163      iitile = Ni_0 / nn_ltile_i 
     164      IF( MOD( Ni_0, nn_ltile_i ) /= 0 ) iitile = iitile + 1 
     165      IF( ktsi > Nis0 ) THEN ; IF( l_tilefin(ktile - 1     ) ) nthl = 1 ; ENDIF    ! Left adjacent tile 
     166      IF( ktei < Nie0 ) THEN ; IF( l_tilefin(ktile + 1     ) ) nthr = 1 ; ENDIF    ! Right  "  " 
     167      IF( ktsj > Njs0 ) THEN ; IF( l_tilefin(ktile - iitile) ) nthb = 1 ; ENDIF    ! Bottom "  " 
     168      IF( ktej < Nje0 ) THEN ; IF( l_tilefin(ktile + iitile) ) ntht = 1 ; ENDIF    ! Top    "  " 
    166169   END SUBROUTINE dom_tile 
    167170 
     
    206209         CALL ctl_warn('Cannot resume/start tiling as it is already active'//clstr) 
    207210         RETURN 
    208       ! TODO: This warning will always be raised outside a tiling loop (cannot check for pause rather than stop) 
     211      ! TODO: [tiling] this warning will always be raised outside a tiling loop (cannot check for pause rather than stop) 
    209212      ELSE IF( llhold .AND. ntile == 0 ) THEN 
    210213         CALL ctl_warn('Cannot resume tiling as it is not paused'//clstr) 
Note: See TracChangeset for help on using the changeset viewer.