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 14537 for NEMO/branches/2021 – NEMO

Changeset 14537 for NEMO/branches/2021


Ignore:
Timestamp:
2021-02-23T15:18:28+01:00 (3 years ago)
Author:
hadcv
Message:

#2600: Reorganise dom_tile code

Location:
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE
Files:
29 edited

Legend:

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

    r14090 r14537  
    2626   USE par_oce         ! Ocean space and time domain variables 
    2727   USE dom_oce         ! Ocean space and time domain 
     28   ! TEMP: [tiling] This change not necessary after extended haloes development 
    2829   USE domtile 
    2930   USE domvvl          ! domain: variable volume level 
     
    519520      ! 
    520521      INTEGER  :: ji, jj, jk 
    521       INTEGER  :: it, itile 
     522      INTEGER  :: it 
    522523      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    523524      REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: fzptnz ! 3d freezing point values 
     
    541542            zincwgt = wgtiau(it) / rn_Dt   ! IAU weight for the current time step 
    542543            ! 
    543             IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     544            IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    544545               IF(lwp) THEN 
    545546                  WRITE(numout,*) 
     
    578579         ENDIF 
    579580         ! 
    580          IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     581         IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    581582            IF ( kt == nitiaufin_r + 1  ) THEN   ! For bias crcn to work 
    582583               DEALLOCATE( t_bkginc ) 
     
    625626 
    626627            ! TEMP: [tiling] This change not necessary after extra haloes development (lbc_lnk removed from zps_hde*) 
    627             IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    628                itile = ntile 
    629                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )            ! Use full domain 
     628            IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
     629               IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE., cstr='asminc' )             ! Use full domain 
    630630 
    631631               IF( ln_zps .AND. .NOT. lk_c1d .AND. .NOT. ln_isfcav)           & 
     
    636636                  &                                  rhd, gru , grv , grui, grvi          )  ! of t, s, rd at the last ocean level 
    637637 
    638                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )            ! Revert to tile domain 
     638               IF( ln_tile ) CALL dom_tile_start( ldhold=.TRUE., cstr='asminc' )            ! Revert to tile domain 
    639639            ENDIF 
    640640 
    641             IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     641            IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    642642               DEALLOCATE( t_bkginc ) 
    643643               DEALLOCATE( s_bkginc ) 
     
    683683            zincwgt = wgtiau(it) / rn_Dt   ! IAU weight for the current time step 
    684684            ! 
    685             IF(lwp) THEN 
    686                WRITE(numout,*) 
    687                WRITE(numout,*) 'dyn_asm_inc : Dynamics IAU at time step = ', kt,' with IAU weight = ', wgtiau(it) 
    688                WRITE(numout,*) '~~~~~~~~~~~~' 
    689             ENDIF 
     685               IF(lwp) THEN 
     686                  WRITE(numout,*) 
     687                  WRITE(numout,*) 'dyn_asm_inc : Dynamics IAU at time step = ', kt,' with IAU weight = ', wgtiau(it) 
     688                  WRITE(numout,*) '~~~~~~~~~~~~' 
     689               ENDIF 
    690690            ! 
    691691            ! Update the dynamic tendencies 
     
    695695            END DO 
    696696            ! 
    697             IF ( kt == nitiaufin_r ) THEN 
    698                DEALLOCATE( u_bkginc ) 
    699                DEALLOCATE( v_bkginc ) 
     697               IF ( kt == nitiaufin_r ) THEN 
     698                  DEALLOCATE( u_bkginc ) 
     699                  DEALLOCATE( v_bkginc ) 
     700               ENDIF 
     701            ! 
    700702            ENDIF 
    701             ! 
    702          ENDIF 
    703703         !                          !----------------------------------------- 
    704704      ELSEIF ( ln_asmdin ) THEN     ! Direct Initialization 
     
    754754            zincwgt = wgtiau(it) / rn_Dt   ! IAU weight for the current time step 
    755755            ! 
    756             IF(lwp) THEN 
    757                WRITE(numout,*) 
    758                WRITE(numout,*) 'ssh_asm_inc : SSH IAU at time step = ', & 
    759                   &  kt,' with IAU weight = ', wgtiau(it) 
    760                WRITE(numout,*) '~~~~~~~~~~~~' 
    761             ENDIF 
     756               IF(lwp) THEN 
     757                  WRITE(numout,*) 
     758                  WRITE(numout,*) 'ssh_asm_inc : SSH IAU at time step = ', & 
     759                     &  kt,' with IAU weight = ', wgtiau(it) 
     760                  WRITE(numout,*) '~~~~~~~~~~~~' 
     761               ENDIF 
    762762            ! 
    763763            ! Save the tendency associated with the IAU weighted SSH increment 
     
    770770            ! 
    771771            ! test on ssh_bkginc needed as ssh_asm_inc is called twice by time step 
    772             IF (ALLOCATED(ssh_bkginc)) DEALLOCATE( ssh_bkginc ) 
     772               IF (ALLOCATED(ssh_bkginc)) DEALLOCATE( ssh_bkginc ) 
    773773            ! 
    774774#if defined key_asminc 
     
    832832         ALLOCATE( ztim(jpi,jpj) ) 
    833833         ztim(:,:) = ssh_iau(:,:) / ( ht(:,:) + 1.0 - ssmask(:,:) ) 
    834          DO jk = 1, jpkm1 
     834            DO jk = 1, jpkm1 
    835835            phdivn(:,:,jk) = phdivn(:,:,jk) - ztim(:,:) * tmask(:,:,jk) 
    836          END DO 
     836            END DO 
    837837         ! 
    838838         DEALLOCATE(ztim) 
     
    876876            ! note this is not a tendency so should not be divided by rn_Dt (as with the tracer and other increments) 
    877877            ! 
    878             IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     878            IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    879879               IF(lwp) THEN 
    880880                  WRITE(numout,*) 
     
    920920#endif 
    921921            ! 
    922             IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     922            IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    923923               IF ( kt == nitiaufin_r ) THEN 
    924924                  DEALLOCATE( seaice_bkginc ) 
     
    979979            END_2D 
    980980#endif 
    981             IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     981            IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    982982               IF ( .NOT. PRESENT(kindic) ) THEN 
    983983                  DEALLOCATE( seaice_bkginc ) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/BDY/bdytra.F90

    r14072 r14537  
    157157      INTEGER  ::   ib_bdy         ! Loop index 
    158158      !!---------------------------------------------------------------------- 
    159       IF( ntile /= 0 .AND. ntile /= 1 ) RETURN                        ! Do only for the full domain 
     159      IF( l_istiled .AND. ntile /= 1 ) RETURN                        ! Do only for the full domain 
    160160      ! 
    161161      IF( ln_timing )   CALL timing_start('bdy_tra_dmp') 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DIA/diaptr.F90

    r14229 r14537  
    9393 
    9494         ! Calculate diagnostics only when zonal integrals have finished 
    95          IF( ntile == 0 .OR. ntile == nijtile ) CALL dia_ptr_iom(kt, Kmm, pvtr) 
     95         IF( .NOT. l_istiled .OR. ntile == nijtile ) CALL dia_ptr_iom(kt, Kmm, pvtr) 
    9696      ENDIF 
    9797 
     
    317317         ! 
    318318         IF( iom_use( 'uocetr_vsum_cumul' ) ) THEN 
    319             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain 
     319            IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE., cstr='diaptr' )             ! Use full domain 
    320320            CALL iom_get_var(  'uocetr_vsum_op', z2d ) ! get uocetr_vsum_op from xml 
    321321            z2d(:,:) = ptr_ci_2d( z2d(:,:) ) 
    322322            CALL iom_put( 'uocetr_vsum_cumul', z2d ) 
    323             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain 
     323            IF( ln_tile ) CALL dom_tile_start( ldhold=.TRUE., cstr='diaptr' )            ! Revert to tile domain 
    324324         ENDIF 
    325325         ! 
     
    589589 
    590590#if ! defined key_mpi_off 
    591       IF( ntile == 0 .OR. ntile == nijtile ) THEN 
     591      IF( .NOT. l_istiled .OR. ntile == nijtile ) THEN 
    592592         ish1d(1) = jpj*nbasin 
    593593         ish2d(1) = jpj ; ish2d(2) = nbasin 
     
    627627 
    628628#if ! defined key_mpi_off 
    629       IF( ntile == 0 .OR. ntile == nijtile ) THEN 
     629      IF( .NOT. l_istiled .OR. ntile == nijtile ) THEN 
    630630         ish1d(1) = jpj*jpk*nbasin 
    631631         ish3d(1) = jpj ; ish3d(2) = jpk ; ish3d(3) = nbasin 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DOM/dom_oce.F90

    r14223 r14537  
    7878   INTEGER         ::   nn_ltile_i, nn_ltile_j 
    7979 
    80    ! Domain tiling (all tiles) 
     80   ! Domain tiling 
    8181   INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ntsi_a       !: start of internal part of tile domain 
    8282   INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ntsj_a       ! 
    8383   INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ntei_a       !: end of internal part of tile domain 
    8484   INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ntej_a       ! 
     85   LOGICAL, PUBLIC                                  ::   l_istiled    ! whether tiling is currently active or not 
    8586 
    8687   !                             !: domain MPP decomposition parameters 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DOM/domain.F90

    r14255 r14537  
    133133      !           !==  Reference coordinate system  ==! 
    134134      ! 
    135       CALL dom_glo                            ! global domain versus local domain 
    136       CALL dom_nam                            ! read namelist ( namrun, namdom ) 
    137       CALL dom_tile( ntsi, ntsj, ntei, ntej ) ! Tile domain 
     135      CALL dom_glo                      ! global domain versus local domain 
     136      CALL dom_nam                      ! read namelist ( namrun, namdom ) 
     137      CALL dom_tile_init                ! Tile domain 
    138138 
    139139      ! 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DOM/domtile.F90

    r14090 r14537  
    1313   ! 
    1414   USE prtctl         ! Print control (prt_ctl_info routine) 
     15   USE lib_mpp , ONLY : ctl_stop, ctl_warn 
    1516   USE in_out_manager ! I/O manager 
    1617 
     
    1819   PRIVATE 
    1920 
    20    PUBLIC dom_tile   ! called by step.F90 
     21   PUBLIC dom_tile         ! called by step.F90 
     22   PUBLIC dom_tile_start   ! called by various 
     23   PUBLIC dom_tile_stop    ! "      " 
     24   PUBLIC dom_tile_init    ! called by domain.F90 
     25 
     26   LOGICAL, ALLOCATABLE, DIMENSION(:) ::   l_tilefin    ! whether a tile is finished or not 
    2127 
    2228   !!---------------------------------------------------------------------- 
     
    2733CONTAINS 
    2834 
    29    SUBROUTINE dom_tile( ktsi, ktsj, ktei, ktej, ktile ) 
     35   SUBROUTINE dom_tile_init 
     36      !!---------------------------------------------------------------------- 
     37      !!                     ***  ROUTINE dom_tile_init  *** 
     38      !! 
     39      !! ** Purpose :   Initialise tile domain variables 
     40      !! 
     41      !! ** Action  : - ntsi, ntsj     : start of internal part of domain 
     42      !!              - ntei, ntej     : end of internal part of domain 
     43      !!              - ntile          : current tile number 
     44      !!              - nijtile        : total number of tiles 
     45      !!              - nthl, nthr     : modifier on DO loop macro bound offset (left, right) 
     46      !!              - nthb, ntht     :              "         "               (bottom, top) 
     47      !!              - l_istiled      : whether tiling is currently active or not 
     48      !!              - l_tilefin      : whether a tile is finished or not 
     49      !!---------------------------------------------------------------------- 
     50      INTEGER ::   jt                                     ! dummy loop argument 
     51      INTEGER ::   iitile, ijtile                         ! Local integers 
     52      !!---------------------------------------------------------------------- 
     53      ntile = 0                     ! Initialise to full domain 
     54      nijtile = 1 
     55      ntsi = Nis0 
     56      ntsj = Njs0 
     57      ntei = Nie0 
     58      ntej = Nje0 
     59      nthl = 0 
     60      nthr = 0 
     61      nthb = 0 
     62      ntht = 0 
     63      l_istiled = .FALSE. 
     64 
     65      IF( ln_tile ) THEN            ! Calculate tile domain indices 
     66         iitile = Ni_0 / nn_ltile_i       ! Number of tiles 
     67         ijtile = Nj_0 / nn_ltile_j 
     68         IF( MOD( Ni_0, nn_ltile_i ) /= 0 ) iitile = iitile + 1 
     69         IF( MOD( Nj_0, nn_ltile_j ) /= 0 ) ijtile = ijtile + 1 
     70 
     71         nijtile = iitile * ijtile 
     72         ALLOCATE( ntsi_a(0:nijtile), ntsj_a(0:nijtile), ntei_a(0:nijtile), ntej_a(0:nijtile), l_tilefin(nijtile) ) 
     73 
     74         l_tilefin(:) = .FALSE. 
     75 
     76         ntsi_a(0) = Nis0                 ! Full domain 
     77         ntsj_a(0) = Njs0 
     78         ntei_a(0) = Nie0 
     79         ntej_a(0) = Nje0 
     80 
     81         DO jt = 1, nijtile               ! Tile domains 
     82            ntsi_a(jt) = Nis0 + nn_ltile_i * MOD(jt - 1, iitile) 
     83            ntsj_a(jt) = Njs0 + nn_ltile_j * ((jt - 1) / iitile) 
     84            ntei_a(jt) = MIN(ntsi_a(jt) + nn_ltile_i - 1, Nie0) 
     85            ntej_a(jt) = MIN(ntsj_a(jt) + nn_ltile_j - 1, Nje0) 
     86         ENDDO 
     87      ENDIF 
     88 
     89      IF(lwp) THEN                  ! control print 
     90         WRITE(numout,*) 
     91         WRITE(numout,*) 'dom_tile : Domain tiling decomposition' 
     92         WRITE(numout,*) '~~~~~~~~' 
     93         IF( ln_tile ) THEN 
     94            WRITE(numout,*) iitile, 'tiles in i' 
     95            WRITE(numout,*) '    Starting indices' 
     96            WRITE(numout,*) '        ', (ntsi_a(jt), jt=1, iitile) 
     97            WRITE(numout,*) '    Ending indices' 
     98            WRITE(numout,*) '        ', (ntei_a(jt), jt=1, iitile) 
     99            WRITE(numout,*) ijtile, 'tiles in j' 
     100            WRITE(numout,*) '    Starting indices' 
     101            WRITE(numout,*) '        ', (ntsj_a(jt), jt=1, nijtile, iitile) 
     102            WRITE(numout,*) '    Ending indices' 
     103            WRITE(numout,*) '        ', (ntej_a(jt), jt=1, nijtile, iitile) 
     104         ELSE 
     105            WRITE(numout,*) 'No domain tiling' 
     106            WRITE(numout,*) '    i indices =', ntsi, ':', ntei 
     107            WRITE(numout,*) '    j indices =', ntsj, ':', ntej 
     108         ENDIF 
     109      ENDIF 
     110   END SUBROUTINE dom_tile_init 
     111 
     112 
     113   SUBROUTINE dom_tile( ktsi, ktsj, ktei, ktej, ktile, ldhold, cstr ) 
    30114      !!---------------------------------------------------------------------- 
    31115      !!                     ***  ROUTINE dom_tile  *** 
    32116      !! 
    33       !! ** Purpose :   Set tile domain variables 
     117      !! ** Purpose :   Set the current tile and its domain indices 
    34118      !! 
    35119      !! ** Action  : - ktsi, ktsj     : start of internal part of domain 
    36120      !!              - ktei, ktej     : end of internal part of domain 
    37       !!              - ntile          : current tile number 
    38       !!              - nijtile        : total number of tiles 
     121      !!              - nthl, nthr     : modifier on DO loop macro bound offset (left, right) 
     122      !!              - nthb, ntht     :              "         "               (bottom, top) 
     123      !!              - ktile          : set the current tile number (ntile) 
    39124      !!---------------------------------------------------------------------- 
    40125      INTEGER, INTENT(out) :: ktsi, ktsj, ktei, ktej      ! Tile domain indices 
    41       INTEGER, INTENT(in), OPTIONAL :: ktile              ! Tile number 
    42       INTEGER ::   jt                                     ! dummy loop argument 
    43       INTEGER ::   iitile, ijtile                         ! Local integers 
    44       CHARACTER (len=11) ::   charout 
    45       !!---------------------------------------------------------------------- 
    46       IF( PRESENT(ktile) .AND. ln_tile ) THEN 
    47          ntile = ktile                 ! Set domain indices for tile 
    48          ktsi = ntsi_a(ktile) 
    49          ktsj = ntsj_a(ktile) 
    50          ktei = ntei_a(ktile) 
    51          ktej = ntej_a(ktile) 
    52  
     126      INTEGER, INTENT(in)  :: ktile                       ! Tile number 
     127      LOGICAL, INTENT(in), OPTIONAL :: ldhold             ! Pause/resume (.true.) or set (.false.) current tile 
     128      ! TEMP: [tiling] DEBUG 
     129      CHARACTER(len=*), INTENT(in), OPTIONAL   :: cstr 
     130      CHARACTER(len=23) :: clstr 
     131      LOGICAL :: llhold 
     132      CHARACTER(len=11)   :: charout 
     133      !!---------------------------------------------------------------------- 
     134      llhold = .FALSE. 
     135      IF( PRESENT(ldhold) ) llhold = ldhold 
     136      clstr = '' 
     137      IF( PRESENT(cstr) ) clstr = TRIM(' ('//TRIM(cstr)//')') 
     138 
     139      IF( .NOT. ln_tile ) CALL ctl_stop('Cannot use dom_tile with ln_tile = .false.') 
     140      IF( .NOT. llhold ) THEN 
     141         IF( .NOT. l_istiled ) THEN 
     142            CALL ctl_warn('Cannot call dom_tile when tiling is inactive'//clstr) 
     143            RETURN 
     144         ENDIF 
     145 
     146         IF( ntile /= 0 ) l_tilefin(ntile) = .TRUE.         ! If setting a new tile, the current tile is complete 
     147 
     148         ntile = ktile                                      ! Set the new tile 
    53149         IF(sn_cfctl%l_prtctl) THEN 
    54             WRITE(charout, FMT="('ntile =', I4)") ktile 
     150            WRITE(charout, FMT="('ntile =', I4)") ntile 
    55151            CALL prt_ctl_info( charout ) 
    56152         ENDIF 
    57       ELSE 
    58          ntile = 0                     ! Initialise to full domain 
    59          nijtile = 1 
    60          ktsi = Nis0 
    61          ktsj = Njs0 
    62          ktei = Nie0 
    63          ktej = Nje0 
    64  
    65          IF( ln_tile ) THEN            ! Calculate tile domain indices 
    66             iitile = Ni_0 / nn_ltile_i       ! Number of tiles 
    67             ijtile = Nj_0 / nn_ltile_j 
    68             IF( MOD( Ni_0, nn_ltile_i ) /= 0 ) iitile = iitile + 1 
    69             IF( MOD( Nj_0, nn_ltile_j ) /= 0 ) ijtile = ijtile + 1 
    70  
    71             nijtile = iitile * ijtile 
    72             ALLOCATE( ntsi_a(0:nijtile), ntsj_a(0:nijtile), ntei_a(0:nijtile), ntej_a(0:nijtile) ) 
    73  
    74             ntsi_a(0) = ktsi                 ! Full domain 
    75             ntsj_a(0) = ktsj 
    76             ntei_a(0) = ktei 
    77             ntej_a(0) = ktej 
    78  
    79             DO jt = 1, nijtile               ! Tile domains 
    80                ntsi_a(jt) = Nis0 + nn_ltile_i * MOD(jt - 1, iitile) 
    81                ntsj_a(jt) = Njs0 + nn_ltile_j * ((jt - 1) / iitile) 
    82                ntei_a(jt) = MIN(ntsi_a(jt) + nn_ltile_i - 1, Nie0) 
    83                ntej_a(jt) = MIN(ntsj_a(jt) + nn_ltile_j - 1, Nje0) 
    84             ENDDO 
    85          ENDIF 
    86  
    87          IF(lwp) THEN                  ! control print 
    88             WRITE(numout,*) 
    89             WRITE(numout,*) 'dom_tile : Domain tiling decomposition' 
    90             WRITE(numout,*) '~~~~~~~~' 
    91             IF( ln_tile ) THEN 
    92                WRITE(numout,*) iitile, 'tiles in i' 
    93                WRITE(numout,*) '    Starting indices' 
    94                WRITE(numout,*) '        ', (ntsi_a(jt), jt=1, iitile) 
    95                WRITE(numout,*) '    Ending indices' 
    96                WRITE(numout,*) '        ', (ntei_a(jt), jt=1, iitile) 
    97                WRITE(numout,*) ijtile, 'tiles in j' 
    98                WRITE(numout,*) '    Starting indices' 
    99                WRITE(numout,*) '        ', (ntsj_a(jt), jt=1, nijtile, iitile) 
    100                WRITE(numout,*) '    Ending indices' 
    101                WRITE(numout,*) '        ', (ntej_a(jt), jt=1, nijtile, iitile) 
    102             ELSE 
    103                WRITE(numout,*) 'No domain tiling' 
    104                WRITE(numout,*) '    i indices =', ktsi, ':', ktei 
    105                WRITE(numout,*) '    j indices =', ktsj, ':', ktej 
    106             ENDIF 
    107          ENDIF 
    108       ENDIF 
     153      ENDIF 
     154 
     155      ktsi = ntsi_a(ktile)                                  ! Set the domain indices 
     156      ktsj = ntsj_a(ktile) 
     157      ktei = ntei_a(ktile) 
     158      ktej = ntej_a(ktile) 
     159 
     160      ! Calculate the modifying factor on DO loop bounds (1 = do not work on halo of a tile that has already been processed) 
     161      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    "  " 
    109166   END SUBROUTINE dom_tile 
    110167 
     168 
     169   SUBROUTINE dom_tile_start( ldhold, cstr ) 
     170      !!---------------------------------------------------------------------- 
     171      !!                     ***  ROUTINE dom_tile_start  *** 
     172      !! 
     173      !! ** Purpose : Start or resume the use of tiling 
     174      !! 
     175      !! ** Method  : dom_tile_start & dom_tile_stop are used to declare a tiled region of code. 
     176      !! 
     177      !!              Tiling is active/inactive (l_istiled = .true./.false.) within/outside of this code region. 
     178      !!              After enabling tiling, no tile will initially be set (the full domain will be used) and dom_tile must 
     179      !!              be called to set a specific tile to work on. Furthermore, all tiles will be marked as incomplete 
     180      !!              (ln_tilefin(:) = .false.). 
     181      !! 
     182      !!              Tiling can be paused/resumed within the tiled code region by calling dom_tile_stop/dom_tile_start 
     183      !!              with ldhold = .true.. This can be used to temporarily revert back to using the full domain. 
     184      !! 
     185      !!                 CALL dom_tile_start                                  ! Enable tiling 
     186      !!                    CALL dom_tile(ntsi, ntei, ntsj, ntej, ktile=n)    ! Set current tile "n" 
     187      !!                    ... 
     188      !!                    CALL dom_tile_stop(.TRUE.)                        ! Pause tiling (temporarily disable) 
     189      !!                    ... 
     190      !!                    CALL dom_tile_start(.TRUE.)                       ! Resume tiling 
     191      !!                 CALL dom_tile_stop                                   ! Disable tiling 
     192      !!---------------------------------------------------------------------- 
     193      LOGICAL, INTENT(in), OPTIONAL :: ldhold      ! Resume (.true.) or start (.false.) 
     194      LOGICAL :: llhold 
     195      ! TEMP: [tiling] DEBUG 
     196      CHARACTER(len=*), INTENT(in), OPTIONAL   :: cstr 
     197      CHARACTER(len=23) :: clstr 
     198      !!---------------------------------------------------------------------- 
     199      llhold = .FALSE. 
     200      IF( PRESENT(ldhold) ) llhold = ldhold 
     201      clstr = '' 
     202      IF( PRESENT(cstr) ) clstr = TRIM(' ('//TRIM(cstr)//')') 
     203 
     204      IF( .NOT. ln_tile ) CALL ctl_stop('Cannot resume/start tiling as ln_tile = .false.') 
     205      IF( l_istiled ) THEN 
     206         CALL ctl_warn('Cannot resume/start tiling as it is already active'//clstr) 
     207         RETURN 
     208      ! TODO: This warning will always be raised outside a tiling loop (cannot check for pause rather than stop) 
     209      ELSE IF( llhold .AND. ntile == 0 ) THEN 
     210         CALL ctl_warn('Cannot resume tiling as it is not paused'//clstr) 
     211         RETURN 
     212      ENDIF 
     213 
     214      ! Whether resumed or started, the tiling is made active. If resumed, the domain indices for the current tile are used. 
     215      IF( llhold ) CALL dom_tile(ntsi, ntsj, ntei, ntej, ktile=ntile, ldhold=.TRUE., cstr='dom_tile_start'//clstr) 
     216      l_istiled = .TRUE. 
     217   END SUBROUTINE dom_tile_start 
     218 
     219 
     220   SUBROUTINE dom_tile_stop( ldhold, cstr ) 
     221      !!---------------------------------------------------------------------- 
     222      !!                     ***  ROUTINE dom_tile_stop  *** 
     223      !! 
     224      !! ** Purpose : End or pause the use of tiling 
     225      !! 
     226      !! ** Method  : See dom_tile_start 
     227      !!---------------------------------------------------------------------- 
     228      LOGICAL, INTENT(in), OPTIONAL :: ldhold      ! Pause (.true.) or stop (.false.) 
     229      LOGICAL :: llhold 
     230      ! TEMP: [tiling] DEBUG 
     231      CHARACTER(len=*), INTENT(in), OPTIONAL   :: cstr 
     232      CHARACTER(len=23) :: clstr 
     233      !!---------------------------------------------------------------------- 
     234      llhold = .FALSE. 
     235      IF( PRESENT(ldhold) ) llhold = ldhold 
     236      clstr = '' 
     237      IF( PRESENT(cstr) ) clstr = TRIM(' ('//TRIM(cstr)//')') 
     238 
     239      IF( .NOT. ln_tile ) CALL ctl_stop('Cannot pause/stop tiling as ln_tile = .false.') 
     240      IF( .NOT. l_istiled ) THEN 
     241         CALL ctl_warn('Cannot pause/stop tiling as it is inactive'//clstr) 
     242         RETURN 
     243      ENDIF 
     244 
     245      ! Whether paused or stopped, the tiling is made inactive and the full domain indices are used. 
     246      ! If stopped, there is no active tile (ntile = 0) and the finished tile indicators are reset 
     247      CALL dom_tile(ntsi, ntsj, ntei, ntej, ktile=0, ldhold=llhold, cstr='dom_tile_stop'//clstr) 
     248      IF( .NOT. llhold ) l_tilefin(:) = .FALSE. 
     249      l_istiled = .FALSE. 
     250   END SUBROUTINE dom_tile_stop 
    111251   !!====================================================================== 
    112252END MODULE domtile 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DOM/dtatsd.F90

    r14189 r14537  
    141141      INTEGER ::   ji, jj, jk, jl, jkk   ! dummy loop indicies 
    142142      INTEGER ::   ik, il0, il1, ii0, ii1, ij0, ij1   ! local integers 
    143       INTEGER ::   itile 
    144143      INTEGER, DIMENSION(jpts), SAVE :: irec_b, irec_n 
    145144      REAL(wp)::   zl, zi                             ! local scalars 
     
    147146      !!---------------------------------------------------------------------- 
    148147      ! 
    149       IF( ntile == 0 .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
    150          itile = ntile 
    151          IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )            ! Use full domain 
     148      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
     149         IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE., cstr='dtatsd' )             ! Use full domain 
    152150            CALL fld_read( kt, 1, sf_tsd )   !==   read T & S data at kt time step   ==! 
    153151      ! 
     
    195193         ENDIF 
    196194!!gm end 
    197          IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )            ! Revert to tile domain 
     195         IF( ln_tile ) CALL dom_tile_start( ldhold=.TRUE., cstr='dtatsd' )            ! Revert to tile domain 
    198196      ENDIF 
    199197      ! 
     
    205203      IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==! 
    206204         ! 
    207          IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     205         IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    208206            IF( kt == nit000 .AND. lwp )THEN 
    209207               WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/LDF/ldftra.F90

    r14201 r14537  
    739739      !!---------------------------------------------------------------------- 
    740740      ! 
    741       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     741      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    742742         IF( kt == kit000 )  THEN 
    743743            IF(lwp) WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traadv.F90

    r14189 r14537  
    105105 
    106106      ! TEMP: [tiling] These changes not necessary if using XIOS (subdomain support) 
    107       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     107      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    108108         ALLOCATE( zuu(jpi,jpj,jpk), zvv(jpi,jpj,jpk), zww(jpi,jpj,jpk) ) 
    109109      ENDIF 
     
    113113         IF( ln_tile ) THEN 
    114114            IF( ntile == 1 ) THEN 
    115                CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) 
     115               CALL dom_tile_stop( ldhold=.TRUE., cstr='traadv' ) 
    116116            ELSE 
    117117               lskip = .TRUE. 
     
    157157         ! 
    158158         ! TEMP: [tiling] This change not necessary if using XIOS (subdomain support) 
    159          IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     159         IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    160160            CALL iom_put( "uocetr_eff", zuu )                                        ! output effective transport 
    161161            CALL iom_put( "vocetr_eff", zvv ) 
     
    226226 
    227227         ! TEMP: [tiling] This change not necessary after extra haloes development (lbc_lnk removed from tra_adv_*) and if XIOS has subdomain support (ldf_eiv_dia) 
    228          IF( ln_tile .AND. ntile == 0 ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 1 ) 
    229  
     228         IF( ln_tile .AND. .NOT. l_istiled ) CALL dom_tile_start( ldhold=.TRUE., cstr='traadv' ) 
    230229      ENDIF 
    231230      !                                              ! print mean trends (used for debugging) 
     
    234233 
    235234      ! TEMP: [tiling] This change not necessary if using XIOS (subdomain support) 
    236       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
     235      IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    237236         DEALLOCATE( zuu, zvv, zww ) 
    238237      ENDIF 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_cen.F90

    r14072 r14537  
    8282      !!---------------------------------------------------------------------- 
    8383      ! 
    84       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     84      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    8585         IF( kt == kit000 )  THEN 
    8686            IF(lwp) WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_fct.F90

    r14189 r14537  
    9595      !!---------------------------------------------------------------------- 
    9696      ! 
    97       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     97      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    9898         IF( kt == kit000 )  THEN 
    9999            IF(lwp) WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_mus.F90

    r14072 r14537  
    9393      !!---------------------------------------------------------------------- 
    9494      ! 
    95       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     95      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    9696         IF( kt == kit000 )  THEN 
    9797            IF(lwp) WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_qck.F90

    r14215 r14537  
    9696      !!---------------------------------------------------------------------- 
    9797      ! 
    98       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     98      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    9999         IF( kt == kit000 )  THEN 
    100100            IF(lwp) WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_ubs.F90

    r14072 r14537  
    103103      !!---------------------------------------------------------------------- 
    104104      ! 
    105       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     105      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    106106         IF( kt == kit000 )  THEN 
    107107            IF(lwp) WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/trabbl.F90

    r14215 r14537  
    127127            &          tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2=           ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    128128         IF( ntile == 0 .OR. ntile == nijtile ) THEN                       ! Do only on the last tile 
    129             CALL iom_put( "ahu_bbl", ahu_bbl )   ! bbl diffusive flux i-coef 
    130             CALL iom_put( "ahv_bbl", ahv_bbl )   ! bbl diffusive flux j-coef 
     129         CALL iom_put( "ahu_bbl", ahu_bbl )   ! bbl diffusive flux i-coef 
     130         CALL iom_put( "ahv_bbl", ahv_bbl )   ! bbl diffusive flux j-coef 
    131131         ENDIF 
    132132         ! 
     
    139139         CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' bbl_adv  - Ta: ', mask1=tmask, & 
    140140            &          tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2=           ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    141          IF( ntile == 0 .OR. ntile == nijtile ) THEN                       ! Do only on the last tile 
     141         IF( .NOT. l_istiled .OR. ntile == nijtile ) THEN                       ! Do only on the last tile 
    142142            ! lateral boundary conditions ; just need for outputs 
    143143            CALL lbc_lnk_multi( 'trabbl', utr_bbl, 'U', 1.0_wp , vtr_bbl, 'V', 1.0_wp ) 
    144             CALL iom_put( "uoce_bbl", utr_bbl )  ! bbl i-transport 
    145             CALL iom_put( "voce_bbl", vtr_bbl )  ! bbl j-transport 
     144         CALL iom_put( "uoce_bbl", utr_bbl )  ! bbl i-transport 
     145         CALL iom_put( "voce_bbl", vtr_bbl )  ! bbl j-transport 
    146146         ENDIF 
    147147         ! 
     
    238238      INTEGER  ::   iis , iid , ijs , ijd    ! local integers 
    239239      INTEGER  ::   ikus, ikud, ikvs, ikvd   !   -       - 
    240       INTEGER  ::   isi, isj                 !   -       - 
    241240      REAL(wp) ::   zbtr, ztra               ! local scalars 
    242241      REAL(wp) ::   zu_bbl, zv_bbl           !   -      - 
    243242      !!---------------------------------------------------------------------- 
    244       ! 
    245       IF( ntsi == Nis0 ) THEN ; isi = 1 ; ELSE ; isi = 0 ; ENDIF    ! Avoid double-counting when using tiling 
    246       IF( ntsj == Njs0 ) THEN ; isj = 1 ; ELSE ; isj = 0 ; ENDIF 
    247243      !                                                          ! =========== 
    248244      DO jn = 1, kjpt                                            ! tracer loop 
    249245         !                                                       ! =========== 
    250          DO_2D( isi, 0, isj, 0 )            ! CAUTION start from i=1 to update i=2 when cyclic east-west 
     246         DO_2D_OVR( 1, 0, 1, 0 )            ! CAUTION start from i=1 to update i=2 when cyclic east-west 
    251247            IF( utr_bbl(ji,jj) /= 0.e0 ) THEN            ! non-zero i-direction bbl advection 
    252248               ! down-slope i/k-indices (deep)      &   up-slope i/k indices (shelf) 
     
    340336      !!---------------------------------------------------------------------- 
    341337      ! 
    342       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     338      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    343339         IF( kt == kit000 )  THEN 
    344340            IF(lwp)  WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traisf.F90

    r14072 r14537  
    4747      IF( ln_timing )   CALL timing_start('tra_isf') 
    4848      ! 
    49       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     49      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    5050         IF( kt == nit000 ) THEN 
    5151            IF(lwp) WRITE(numout,*) 
     
    7979      ! 
    8080      IF ( ln_isfdebug ) THEN 
    81          IF( ntile == 0 .OR. ntile == nijtile ) THEN                       ! Do only for the full domain 
     81         IF( .NOT. l_istiled .OR. ntile == nijtile ) THEN                       ! Do only for the full domain 
    8282            CALL debug('tra_isf: pts(:,:,:,:,Krhs) T', pts(:,:,:,1,Krhs)) 
    8383            CALL debug('tra_isf: pts(:,:,:,:,Krhs) S', pts(:,:,:,2,Krhs)) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traldf.F90

    r14189 r14537  
    7676         IF( ln_tile ) THEN 
    7777            IF( ntile == 1 ) THEN 
    78                CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) 
     78               CALL dom_tile_stop( ldhold=.TRUE., cstr='traldf' ) 
    7979            ELSE 
    8080               lskip = .TRUE. 
     
    105105 
    106106         ! TEMP: [tiling] This change not necessary after extra haloes development (lbc_lnk removed from tra_ldf_blp, zps_hde*) 
    107          IF( ln_tile .AND. ntile == 0 ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 1 ) 
     107         IF( ln_tile .AND. .NOT. l_istiled ) CALL dom_tile_start( ldhold=.TRUE., cstr='traldf' ) 
    108108      ENDIF 
    109109      !                                        !* print mean trends (used for debugging) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_iso.F90

    r14072 r14537  
    141141      ! 
    142142      IF( kpass == 1 .AND. kt == kit000 )  THEN 
    143          IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     143         IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    144144            IF(lwp) WRITE(numout,*) 
    145145            IF(lwp) WRITE(numout,*) 'tra_ldf_iso : rotated laplacian diffusion operator on ', cdtype 
     
    153153      ENDIF 
    154154      ! 
    155       IF( ntile == 0 .OR. ntile == 1 )  THEN                           ! Do only on the first tile 
     155      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                           ! Do only on the first tile 
    156156         l_hst = .FALSE. 
    157157         l_ptr = .FALSE. 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_lap_blp.F90

    r14215 r14537  
    103103      ! 
    104104      INTEGER  ::   ji, jj, jk, jn      ! dummy loop indices 
    105       INTEGER  ::   isi, iei, isj, iej  ! local integers 
    106105      REAL(wp) ::   zsign               ! local scalars 
    107106      REAL(wp), DIMENSION(A2D(nn_hls),jpk) ::   ztu, ztv, zaheeu, zaheev 
    108107      !!---------------------------------------------------------------------- 
    109108      ! 
    110       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     109      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    111110         IF( kt == nit000 .AND. lwp )  THEN 
    112111            WRITE(numout,*) 
     
    126125      ELSE                    ;   zsign = -1._wp 
    127126      ENDIF 
    128  
    129       IF( ntsi == Nis0 ) THEN ; isi = nn_hls - 1 ; ELSE ; isi = 0 ; ENDIF    ! Avoid double-counting when using tiling 
    130       IF( ntsj == Njs0 ) THEN ; isj = nn_hls - 1 ; ELSE ; isj = 0 ; ENDIF 
    131       IF( ntei == Nie0 ) THEN ; iei = nn_hls - 1 ; ELSE ; iei = 0 ; ENDIF 
    132       IF( ntej == Nje0 ) THEN ; iej = nn_hls - 1 ; ELSE ; iej = 0 ; ENDIF 
    133127 
    134128      DO_3D( nn_hls, nn_hls-1, nn_hls, nn_hls-1, 1, jpkm1 )            !== First derivative (gradient)  ==! 
     
    158152         ENDIF 
    159153         ! 
    160          DO_3D( isi, iei, isj, iej, 1, jpkm1 )            !== Second derivative (divergence) added to the general tracer trends  ==! 
     154         DO_3D_OVR( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 )        !== Second derivative (divergence) added to the general tracer trends  ==! 
    161155            pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn) + (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)     & 
    162156               &                                      +    ztv(ji,jj,jk) - ztv(ji,jj-1,jk) )   & 
     
    211205      !!--------------------------------------------------------------------- 
    212206      ! 
    213       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     207      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    214208         IF( kt == kit000 .AND. lwp )  THEN 
    215209            WRITE(numout,*) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_triad.F90

    r14215 r14537  
    126126      !!---------------------------------------------------------------------- 
    127127      ! 
    128       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     128      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    129129         IF( kpass == 1 .AND. kt == kit000 )  THEN 
    130130            IF(lwp) WRITE(numout,*) 
     
    219219         ! 
    220220         ! TEMP: [tiling] These changes not necessary if XIOS has subdomain support 
    221          IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
     221         IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    222222            IF( ln_ldfeiv_dia .AND. cdtype == 'TRA' ) THEN 
    223                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) 
     223               IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE., cstr='traldf_triad' ) 
    224224 
    225225               zpsi_uw(:,:,:) = 0._wp 
     
    238238               CALL ldf_eiv_dia( zpsi_uw, zpsi_vw, Kmm ) 
    239239 
    240                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile ) 
     240               IF( ln_tile .AND. .NOT. l_istiled ) CALL dom_tile_start( ldhold=.TRUE., cstr='traldf_triad' ) 
    241241            ENDIF 
    242242         ENDIF 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/tranpc.F90

    r14215 r14537  
    8181      LOGICAL, PARAMETER :: l_LB_debug = .FALSE. ! set to true if you want to follow what is 
    8282      INTEGER :: ilc1, jlc1, klc1, nncpu         ! actually happening in a water column at point "ilc1, jlc1" 
    83       INTEGER :: isi, isj, iei, iej 
    8483      LOGICAL :: lp_monitor_point = .FALSE.      ! in CPU domain "nncpu" 
    8584      !!---------------------------------------------------------------------- 
     
    105104         CALL bn2    ( pts(:,:,:,:,Kaa), zab, zn2, Kmm )    ! after Brunt-Vaisala  (given on W-points) 
    106105         ! 
    107          IF( ntile == 0 .OR. ntile == 1 ) nnpcc = 0         ! Do only on the first tile 
    108          ! 
    109          IF( ntsi == Nis0 ) THEN ; isi = nn_hls ; ELSE ; isi = 0 ; ENDIF    ! Avoid double-counting when using tiling 
    110          IF( ntsj == Njs0 ) THEN ; isj = nn_hls ; ELSE ; isj = 0 ; ENDIF 
    111          IF( ntei == Nie0 ) THEN ; iei = nn_hls ; ELSE ; iei = 0 ; ENDIF 
    112          IF( ntej == Nje0 ) THEN ; iej = nn_hls ; ELSE ; iej = 0 ; ENDIF 
    113          ! 
    114          DO_2D( isi, iei, isj, iej )                        ! interior column only 
     106         IF( .NOT. l_istiled .OR. ntile == 1 ) nnpcc = 0         ! Do only on the first tile 
     107         ! 
     108         DO_2D_OVR( 0, 0, 0, 0 )                        ! interior column only 
    115109            ! 
    116110            IF( tmask(ji,jj,2) == 1 ) THEN      ! At least 2 ocean points 
     
    319313         ENDIF 
    320314         ! 
    321          IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
     315         IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    322316            IF( lwp .AND. l_LB_debug ) THEN 
    323317               WRITE(numout,*) 'Exiting tra_npc , kt = ',kt,', => numb. of statically instable water-columns: ', nnpcc 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traqsr.F90

    r14215 r14537  
    108108      ! 
    109109      INTEGER  ::   ji, jj, jk               ! dummy loop indices 
    110       INTEGER  ::   irgb, isi, iei, isj, iej ! local integers 
     110      INTEGER  ::   irgb                    ! local integers 
    111111      REAL(wp) ::   zchl, zcoef, z1_2        ! local scalars 
    112112      REAL(wp) ::   zc0 , zc1 , zc2 , zc3    !    -         - 
     
    121121      IF( ln_timing )   CALL timing_start('tra_qsr') 
    122122      ! 
    123       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     123      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    124124         IF( kt == nit000 ) THEN 
    125125            IF(lwp) WRITE(numout,*) 
     
    137137      !                         !  before qsr induced heat content  ! 
    138138      !                         !-----------------------------------! 
    139       IF( ntsi == Nis0 ) THEN ; isi = nn_hls ; ELSE ; isi = 0 ; ENDIF    ! Avoid double-counting when using tiling 
    140       IF( ntsj == Njs0 ) THEN ; isj = nn_hls ; ELSE ; isj = 0 ; ENDIF 
    141       IF( ntei == Nie0 ) THEN ; iei = nn_hls ; ELSE ; iei = 0 ; ENDIF 
    142       IF( ntej == Nje0 ) THEN ; iej = nn_hls ; ELSE ; iej = 0 ; ENDIF 
    143  
    144139      IF( kt == nit000 ) THEN          !==  1st time step  ==! 
    145140         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN    ! read in restart 
    146141            z1_2 = 0.5_wp 
    147             IF( ntile == 0 .OR. ntile == 1 )  THEN                        ! Do only on the first tile 
     142            IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                        ! Do only on the first tile 
    148143               IF(lwp) WRITE(numout,*) '          nit000-1 qsr tracer content forcing field read in the restart file' 
    149144               CALL iom_get( numror, jpdom_auto, 'qsr_hc_b', qsr_hc_b )   ! before heat content trend due to Qsr flux 
     
    151146         ELSE                                           ! No restart or Euler forward at 1st time step 
    152147            z1_2 = 1._wp 
    153             DO_3D( isi, iei, isj, iej, 1, jpk ) 
     148            DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
    154149               qsr_hc_b(ji,jj,jk) = 0._wp 
    155150            END_3D 
     
    157152      ELSE                             !==  Swap of qsr heat content  ==! 
    158153         z1_2 = 0.5_wp 
    159          DO_3D( isi, iei, isj, iej, 1, jpk ) 
     154         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
    160155            qsr_hc_b(ji,jj,jk) = qsr_hc(ji,jj,jk) 
    161156         END_3D 
     
    168163      CASE( np_BIO )                   !==  bio-model fluxes  ==! 
    169164         ! 
    170          DO_3D( isi, iei, isj, iej, 1, nksr ) 
     165         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr ) 
    171166            qsr_hc(ji,jj,jk) = r1_rho0_rcp * ( etot3(ji,jj,jk) - etot3(ji,jj,jk+1) ) 
    172167         END_3D 
     
    179174         ! 
    180175         IF( nqsr == np_RGBc ) THEN          !*  Variable Chlorophyll 
    181             IF( ntile == 0 .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
    182                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )            ! Use full domain 
     176            IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
     177               IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE., cstr='traqsr' )             ! Use full domain 
    183178               CALL fld_read( kt, 1, sf_chl )         ! Read Chl data and provides it at the current time step 
    184                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 1 )            ! Revert to tile domain 
     179               IF( ln_tile ) CALL dom_tile_start( ldhold=.TRUE., cstr='traqsr' )            ! Revert to tile domain 
    185180            ENDIF 
    186181            ! 
     
    190185            ! most expensive calculations) 
    191186            ! 
    192             DO_2D( isi, iei, isj, iej ) 
     187            DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    193188                       ! zlogc = log(zchl) 
    194189               zlogc = LOG ( MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) ) 
     
    209204 
    210205! 
    211             DO_3D( isi, iei, isj, iej, 1, nksr + 1 ) 
     206            DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr + 1 ) 
    212207               ! zchl    = ALOG( ze0(ji,jj) ) 
    213208               zlogc = ze0(ji,jj) 
     
    239234         ! 
    240235         zcoef  = ( 1. - rn_abs ) / 3._wp    !* surface equi-partition in R-G-B 
    241          DO_2D( isi, iei, isj, iej ) 
     236         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    242237            ze0(ji,jj) = rn_abs * qsr(ji,jj) 
    243238            ze1(ji,jj) = zcoef  * qsr(ji,jj) 
     
    250245         ! 
    251246         !                                    !* interior equi-partition in R-G-B depending on vertical profile of Chl 
    252          DO_3D( isi, iei, isj, iej, 2, nksr + 1 ) 
     247         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 2, nksr + 1 ) 
    253248            ze3t = e3t(ji,jj,jk-1,Kmm) 
    254249            irgb = NINT( ztmp3d(ji,jj,jk) ) 
     
    264259         END_3D 
    265260         ! 
    266          DO_3D( isi, iei, isj, iej, 1, nksr )          !* now qsr induced heat content 
     261         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr )          !* now qsr induced heat content 
    267262            qsr_hc(ji,jj,jk) = r1_rho0_rcp * ( ztmp3d(ji,jj,jk) - ztmp3d(ji,jj,jk+1) ) 
    268263         END_3D 
     
    274269         zz0 =        rn_abs   * r1_rho0_rcp      ! surface equi-partition in 2-bands 
    275270         zz1 = ( 1. - rn_abs ) * r1_rho0_rcp 
    276          DO_3D( isi, iei, isj, iej, 1, nksr )          !* now qsr induced heat content 
     271         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr )          !* now qsr induced heat content 
    277272            zc0 = zz0 * EXP( -gdepw(ji,jj,jk  ,Kmm)*xsi0r ) + zz1 * EXP( -gdepw(ji,jj,jk  ,Kmm)*xsi1r ) 
    278273            zc1 = zz0 * EXP( -gdepw(ji,jj,jk+1,Kmm)*xsi0r ) + zz1 * EXP( -gdepw(ji,jj,jk+1,Kmm)*xsi1r ) 
     
    292287      ! 
    293288      ! sea-ice: store the 1st ocean level attenuation coefficient 
    294       DO_2D( isi, iei, isj, iej ) 
     289      DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    295290         IF( qsr(ji,jj) /= 0._wp ) THEN   ;   fraqsr_1lev(ji,jj) = qsr_hc(ji,jj,1) / ( r1_rho0_rcp * qsr(ji,jj) ) 
    296291         ELSE                             ;   fraqsr_1lev(ji,jj) = 1._wp 
     
    299294      ! 
    300295      ! TEMP: [tiling] This change not necessary and working array can use A2D(nn_hls) if using XIOS (subdomain support) 
    301       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
     296      IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    302297         IF( iom_use('qsr3d') ) THEN      ! output the shortwave Radiation distribution 
    303298            ALLOCATE( zetot(jpi,jpj,jpk) ) 
     
    311306      ENDIF 
    312307      ! 
    313       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     308      IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    314309         IF( lrst_oce ) THEN     ! write in the ocean restart file 
    315310            CALL iom_rstput( kt, nitrst, numrow, 'qsr_hc_b'   , qsr_hc      ) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/trasbc.F90

    r14215 r14537  
    7777      ! 
    7878      INTEGER  ::   ji, jj, jk, jn               ! dummy loop indices 
    79       INTEGER  ::   ikt, ikb, isi, iei, isj, iej ! local integers 
     79      INTEGER  ::   ikt, ikb                    ! local integers 
    8080      REAL(wp) ::   zfact, z1_e3t, zdep, ztim    ! local scalar 
    8181      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  ztrdt, ztrds 
     
    8484      IF( ln_timing )   CALL timing_start('tra_sbc') 
    8585      ! 
    86       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     86      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    8787         IF( kt == nit000 ) THEN 
    8888            IF(lwp) WRITE(numout,*) 
     
    9898      ENDIF 
    9999      ! 
    100       IF( ntsi == Nis0 ) THEN ; isi = nn_hls ; ELSE ; isi = 0 ; ENDIF    ! Avoid double-counting when using tiling 
    101       IF( ntsj == Njs0 ) THEN ; isj = nn_hls ; ELSE ; isj = 0 ; ENDIF 
    102       IF( ntei == Nie0 ) THEN ; iei = nn_hls ; ELSE ; iei = 0 ; ENDIF 
    103       IF( ntej == Nje0 ) THEN ; iej = nn_hls ; ELSE ; iej = 0 ; ENDIF 
    104  
    105100!!gm  This should be moved into sbcmod.F90 module ? (especially now that ln_traqsr is read in namsbc namelist) 
    106101      IF( .NOT.ln_traqsr ) THEN     ! no solar radiation penetration 
    107          DO_2D( isi, iei, isj, iej ) 
     102         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    108103            qns(ji,jj) = qns(ji,jj) + qsr(ji,jj)      ! total heat flux in qns 
    109104            qsr(ji,jj) = 0._wp                        ! qsr set to zero 
     
    118113         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN      ! Restart: read in restart file 
    119114            zfact = 0.5_wp 
    120             IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     115            IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    121116               IF(lwp) WRITE(numout,*) '          nit000-1 sbc tracer content field read in the restart file' 
    122117               sbc_tsc(:,:,:) = 0._wp 
     
    126121         ELSE                                             ! No restart or restart not found: Euler forward time stepping 
    127122            zfact = 1._wp 
    128             DO_2D( isi, iei, isj, iej ) 
     123            DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    129124               sbc_tsc(ji,jj,:) = 0._wp 
    130125               sbc_tsc_b(ji,jj,:) = 0._wp 
     
    133128      ELSE                                !* other time-steps: swap of forcing fields 
    134129         zfact = 0.5_wp 
    135          DO_2D( isi, iei, isj, iej ) 
     130         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    136131            sbc_tsc_b(ji,jj,:) = sbc_tsc(ji,jj,:) 
    137132         END_2D 
    138133      ENDIF 
    139134      !                             !==  Now sbc tracer content fields  ==! 
    140       DO_2D( isi, iei, isj, iej ) 
     135      DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    141136         sbc_tsc(ji,jj,jp_tem) = r1_rho0_rcp * qns(ji,jj)   ! non solar heat flux 
    142137         sbc_tsc(ji,jj,jp_sal) = r1_rho0     * sfx(ji,jj)   ! salt flux due to freezing/melting 
    143138      END_2D 
    144139      IF( ln_linssh ) THEN                !* linear free surface 
    145          DO_2D( isi, iei, isj, iej )                    !==>> add concentration/dilution effect due to constant volume cell 
     140         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls )                    !==>> add concentration/dilution effect due to constant volume cell 
    146141            sbc_tsc(ji,jj,jp_tem) = sbc_tsc(ji,jj,jp_tem) + r1_rho0 * emp(ji,jj) * pts(ji,jj,1,jp_tem,Kmm) 
    147142            sbc_tsc(ji,jj,jp_sal) = sbc_tsc(ji,jj,jp_sal) + r1_rho0 * emp(ji,jj) * pts(ji,jj,1,jp_sal,Kmm) 
    148143         END_2D                                 !==>> output c./d. term 
    149          IF( ntile == 0 .OR. ntile == nijtile )  THEN             ! Do only on the last tile 
     144         IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN             ! Do only on the last tile 
    150145            IF( iom_use('emp_x_sst') )   CALL iom_put( "emp_x_sst", emp (:,:) * pts(:,:,1,jp_tem,Kmm) ) 
    151146            IF( iom_use('emp_x_sss') )   CALL iom_put( "emp_x_sss", emp (:,:) * pts(:,:,1,jp_sal,Kmm) ) 
     
    160155      END DO 
    161156      ! 
    162       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     157      IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    163158         IF( lrst_oce ) THEN           !==  write sbc_tsc in the ocean restart file  ==! 
    164159            CALL iom_rstput( kt, nitrst, numrow, 'sbc_hc_b', sbc_tsc(:,:,jp_tem) ) 
     
    186181      ENDIF 
    187182 
    188       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    189          IF( iom_use('rnf_x_sst') )   CALL iom_put( "rnf_x_sst", rnf*pts(:,:,1,jp_tem,Kmm) )   ! runoff term on sst 
    190          IF( iom_use('rnf_x_sss') )   CALL iom_put( "rnf_x_sss", rnf*pts(:,:,1,jp_sal,Kmm) )   ! runoff term on sss 
     183      IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     184          IF( iom_use('rnf_x_sst') )   CALL iom_put( "rnf_x_sst", rnf*pts(:,:,1,jp_tem,Kmm) )   ! runoff term on sst 
     185          IF( iom_use('rnf_x_sss') )   CALL iom_put( "rnf_x_sss", rnf*pts(:,:,1,jp_sal,Kmm) )   ! runoff term on sss 
    191186      ENDIF 
    192187 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/trazdf.F90

    r14189 r14537  
    6464      ! 
    6565      IF( kt == nit000 )  THEN 
    66          IF( ntile == 0 .OR. ntile == 1 )  THEN                   ! Do only on the first tile 
     66         IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                   ! Do only on the first tile 
    6767            IF(lwp)WRITE(numout,*) 
    6868            IF(lwp)WRITE(numout,*) 'tra_zdf : implicit vertical mixing on T & S' 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRD/trdini.F90

    r14090 r14537  
    9393         CALL ctl_warn('Tiling is not yet implemented for the trends diagnostics; ln_tile is forced to FALSE') 
    9494         ln_tile = .FALSE. 
    95          CALL dom_tile( ntsi, ntsj, ntei, ntej ) 
     95         CALL dom_tile_init 
    9696      ENDIF 
    9797 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/do_loop_substitute.h90

    r14215 r14537  
    5959#endif 
    6060 
    61 #define DO_2D(L, R, B, T) DO jj = ntsj-(B), ntej+(T)   ;   DO ji = ntsi-(L), ntei+(R) 
     61#define DO_2D(L, R, B, T) DO jj = ntsj-(B), ntej+(T) ; DO ji = ntsi-(L), ntei+(R) 
     62! NOTE: This easily exceeds 132 characters. ifort compiles OK, but it is against the NEMO coding standard. 
     63! TODO: To consider alternatives (and revise name) 
     64#define DO_2D_OVR(L, R, B, T) DO_2D(L-(L+R)*nthl, R-(R+L)*nthr, B-(B+T)*nthb, T-(T+B)*ntht) 
    6265#define A1Di(H) ntsi-H:ntei+H 
    6366#define A1Dj(H) ntsj-H:ntej+H 
     
    7073#define KJPT  : 
    7174 
    72 #define DO_3D(L, R, B, T, ks, ke) DO jk = ks, ke   ;   DO_2D(L, R, B, T) 
     75#define DO_3D(L, R, B, T, ks, ke) DO jk = ks, ke ; DO_2D(L, R, B, T) 
     76#define DO_3D_OVR(L, R, B, T, ks, ke) DO jk = ks, ke ; DO_2D_OVR(L, R, B, T) 
    7377 
    74 #define DO_3DS(L, R, B, T, ks, ke, ki) DO jk = ks, ke, ki   ;   DO_2D(L, R, B, T) 
     78#define DO_3DS(L, R, B, T, ks, ke, ki) DO jk = ks, ke, ki ; DO_2D(L, R, B, T) 
     79#define DO_3DS_OVR(L, R, B, T, ks, ke, ki) DO jk = ks, ke, ki ; DO_2D_OVR(L, R, B, T) 
    7580 
    7681#define END_2D   END DO   ;   END DO 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/module_example.F90

    r14041 r14537  
    102102      !!-------------------------------------------------------------------- 
    103103      ! 
    104       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     104      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    105105         IF( kt == nit000  )   CALL exa_mpl_init    ! Initialization (first time-step only) 
    106106 
     
    177177      IF( exa_mpl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'exa_mpl_init : unable to allocate arrays' ) 
    178178      !                              ! Parameter control 
    179       IF( ln_tile .AND. ntile > 0 ) CALL ctl_stop( 'exa_mpl_init: tiling is not supported in this module by default, see manual for how to adapt your code' ) 
     179      IF( ln_tile ) CALL ctl_stop( 'exa_mpl_init: tiling is not supported in this module by default, see manual for how to adapt your code' ) 
    180180      IF( ln_opt      )   CALL ctl_stop( 'exa_mpl_init: this work and option xxx are incompatible'   ) 
    181181      IF( nn_opt == 2 )   CALL ctl_stop( 'STOP',  'exa_mpl_init: this work and option yyy may cause problems'  ) 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/par_oce.F90

    r14072 r14537  
    7272   INTEGER, PUBLIC ::   ntei       !: end of internal part of tile domain 
    7373   INTEGER, PUBLIC ::   ntej       ! 
     74   INTEGER, PUBLIC ::   nthl, nthr !: Modifier on DO loop macro bound offset (left, right) 
     75   INTEGER, PUBLIC ::   nthb, ntht !:              "         "               (bottom, top) 
    7476 
    7577   !!--------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/timing.F90

    r14229 r14537  
    109109 
    110110      s_timer%l_tdone = .FALSE. 
    111       IF( ntile == 0 .OR. ntile == 1 ) s_timer%niter = s_timer%niter + 1      ! All tiles count as one iteration 
     111      IF( .NOT. l_istiled .OR. ntile == 1 ) s_timer%niter = s_timer%niter + 1      ! All tiles count as one iteration 
    112112      s_timer%t_cpu = 0. 
    113113      s_timer%t_clock = 0. 
Note: See TracChangeset for help on using the changeset viewer.