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 14644 for NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lnk_icb_generic.h90 – NEMO

Ignore:
Timestamp:
2021-03-26T15:33:49+01:00 (3 years ago)
Author:
sparonuz
Message:

Merge trunk -r14642:HEAD

Location:
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final

    • Property svn:externals
      •  

        old new  
        99 
        1010# SETTE 
        11 ^/utils/CI/sette_wave@13990         sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lnk_icb_generic.h90

    r13286 r14644  
    2424      !!                    jpi    : first dimension of the local subdomain 
    2525      !!                    jpj    : second dimension of the local subdomain 
     26      !!                    mpinei : number of neighboring domains (starting at 0, -1 if no neighbourg) 
    2627      !!                    kexti  : number of columns for extra outer halo 
    2728      !!                    kextj  : number of rows for extra outer halo 
    28       !!                    nbondi : mark for "east-west local boundary" 
    29       !!                    nbondj : mark for "north-south local boundary" 
    30       !!                    noea   : number for local neighboring processors 
    31       !!                    nowe   : number for local neighboring processors 
    32       !!                    noso   : number for local neighboring processors 
    33       !!                    nono   : number for local neighboring processors 
    3429      !!---------------------------------------------------------------------- 
    3530      CHARACTER(len=*)                                        , INTENT(in   ) ::   cdname      ! name of the calling subroutine 
    3631      REAL(PRECISION), DIMENSION(1-kexti:jpi+kexti,1-kextj:jpj+kextj), INTENT(inout) ::   pt2d     ! 2D array with extra halo 
    3732      CHARACTER(len=1)                                        , INTENT(in   ) ::   cd_type  ! nature of ptab array grid-points 
    38       REAL(wp)                                                , INTENT(in   ) ::   psgn     ! sign used across the north fold 
     33      REAL(PRECISION)                                         , INTENT(in   ) ::   psgn     ! sign used across the north fold 
    3934      INTEGER                                                 , INTENT(in   ) ::   kexti    ! extra i-halo width 
    4035      INTEGER                                                 , INTENT(in   ) ::   kextj    ! extra j-halo width 
     
    9085      ! north fold treatment 
    9186      ! ----------------------- 
    92       IF( npolj /= 0 ) THEN 
     87      IF( l_IdoNFold ) THEN 
    9388         ! 
    9489         SELECT CASE ( jpni ) 
     
    10398      ! we play with the neigbours AND the row number because of the periodicity 
    10499      ! 
    105       SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions 
    106       CASE ( -1, 0, 1 )                ! all exept 2 (i.e. close case) 
     100      IF( mpinei(jpwe) >= 0 .OR. mpinei(jpea) >= 0 ) THEN   ! Read Dirichlet lateral conditions: all exept 2 (i.e. close case) 
    107101         iihom = jpi - (2 * nn_hls) -kexti 
    108102         DO jl = 1, ipreci 
     
    110104            r2dwe(:,jl,1) = pt2d(iihom +jl,:) 
    111105         END DO 
    112       END SELECT 
     106      ENDIF 
    113107      ! 
    114108      !                           ! Migrations 
     
    120114      IF( ln_timing ) CALL tic_tac(.TRUE.) 
    121115      ! 
    122       SELECT CASE ( nbondi ) 
    123       CASE ( -1 ) 
    124          CALL SENDROUTINE( 2, r2dwe(1-kextj,1,1), imigr, noea, ml_req1 ) 
    125          CALL RECVROUTINE( 1, r2dew(1-kextj,1,2), imigr, noea ) 
    126          CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    127       CASE ( 0 ) 
    128          CALL SENDROUTINE( 1, r2dew(1-kextj,1,1), imigr, nowe, ml_req1 ) 
    129          CALL SENDROUTINE( 2, r2dwe(1-kextj,1,1), imigr, noea, ml_req2 ) 
    130          CALL RECVROUTINE( 1, r2dew(1-kextj,1,2), imigr, noea ) 
    131          CALL RECVROUTINE( 2, r2dwe(1-kextj,1,2), imigr, nowe ) 
    132          CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    133          CALL mpi_wait(ml_req2,ml_stat,ml_err) 
    134       CASE ( 1 ) 
    135          CALL SENDROUTINE( 1, r2dew(1-kextj,1,1), imigr, nowe, ml_req1 ) 
    136          CALL RECVROUTINE( 2, r2dwe(1-kextj,1,2), imigr, nowe ) 
    137          CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    138       END SELECT 
     116      IF( mpinei(jpwe) >= 0  )   CALL SENDROUTINE( 1, r2dew(1-kextj,1,1), imigr, mpinei(jpwe), ml_req1 ) 
     117      IF( mpinei(jpea) >= 0  )   CALL SENDROUTINE( 2, r2dwe(1-kextj,1,1), imigr, mpinei(jpea), ml_req2 ) 
     118      IF( mpinei(jpwe) >= 0  )   CALL RECVROUTINE( 2, r2dwe(1-kextj,1,2), imigr, mpinei(jpwe) ) 
     119      IF( mpinei(jpea) >= 0  )   CALL RECVROUTINE( 1, r2dew(1-kextj,1,2), imigr, mpinei(jpea) ) 
     120      IF( mpinei(jpwe) >= 0  )   CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     121      IF( mpinei(jpea) >= 0  )   CALL mpi_wait(ml_req2,ml_stat,ml_err) 
    139122      ! 
    140123      IF( ln_timing ) CALL tic_tac(.FALSE.) 
     
    142125      !                           ! Write Dirichlet lateral conditions 
    143126      iihom = jpi - nn_hls 
    144       ! 
    145       SELECT CASE ( nbondi ) 
    146       CASE ( -1 ) 
     127      IF( mpinei(jpwe) >= 0  ) THEN 
     128         DO jl = 1, ipreci 
     129            pt2d(jl-kexti,:) = r2dwe(:,jl,2) 
     130         END DO 
     131      ENDIF 
     132      IF( mpinei(jpea) >= 0  ) THEN 
    147133         DO jl = 1, ipreci 
    148134            pt2d(iihom+jl,:) = r2dew(:,jl,2) 
    149135         END DO 
    150       CASE ( 0 ) 
    151          DO jl = 1, ipreci 
    152             pt2d(jl-kexti,:) = r2dwe(:,jl,2) 
    153             pt2d(iihom+jl,:) = r2dew(:,jl,2) 
    154          END DO 
    155       CASE ( 1 ) 
    156          DO jl = 1, ipreci 
    157             pt2d(jl-kexti,:) = r2dwe(:,jl,2) 
    158          END DO 
    159       END SELECT 
    160  
     136      ENDIF 
    161137 
    162138      ! 3. North and south directions 
     
    164140      ! always closed : we play only with the neigbours 
    165141      ! 
    166       IF( nbondj /= 2 ) THEN      ! Read Dirichlet lateral conditions 
     142      IF( mpinei(jpso) >= 0 .OR. mpinei(jpno) >= 0 ) THEN   ! Read Dirichlet lateral conditions: all exept 2 (i.e. close case) 
    167143         ijhom = jpj - (2 * nn_hls) - kextj 
    168144         DO jl = 1, iprecj 
     
    177153      IF( ln_timing ) CALL tic_tac(.TRUE.) 
    178154      ! 
    179       SELECT CASE ( nbondj ) 
    180       CASE ( -1 ) 
    181          CALL SENDROUTINE( 4, r2dsn(1-kexti,1,1), imigr, nono, ml_req1 ) 
    182          CALL RECVROUTINE( 3, r2dns(1-kexti,1,2), imigr, nono ) 
    183          CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    184       CASE ( 0 ) 
    185          CALL SENDROUTINE( 3, r2dns(1-kexti,1,1), imigr, noso, ml_req1 ) 
    186          CALL SENDROUTINE( 4, r2dsn(1-kexti,1,1), imigr, nono, ml_req2 ) 
    187          CALL RECVROUTINE( 3, r2dns(1-kexti,1,2), imigr, nono ) 
    188          CALL RECVROUTINE( 4, r2dsn(1-kexti,1,2), imigr, noso ) 
    189          CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    190          CALL mpi_wait(ml_req2,ml_stat,ml_err) 
    191       CASE ( 1 ) 
    192          CALL SENDROUTINE( 3, r2dns(1-kexti,1,1), imigr, noso, ml_req1 ) 
    193          CALL RECVROUTINE( 4, r2dsn(1-kexti,1,2), imigr, noso ) 
    194          CALL mpi_wait(ml_req1,ml_stat,ml_err) 
    195       END SELECT 
     155      IF( mpinei(jpso) >= 0  )   CALL SENDROUTINE( 3, r2dns(1-kexti,1,1), imigr, mpinei(jpso), ml_req1 ) 
     156      IF( mpinei(jpno) >= 0  )   CALL SENDROUTINE( 4, r2dsn(1-kexti,1,1), imigr, mpinei(jpno), ml_req2 ) 
     157      IF( mpinei(jpso) >= 0  )   CALL RECVROUTINE( 4, r2dsn(1-kexti,1,2), imigr, mpinei(jpso) ) 
     158      IF( mpinei(jpno) >= 0  )   CALL RECVROUTINE( 3, r2dns(1-kexti,1,2), imigr, mpinei(jpno) ) 
     159      IF( mpinei(jpso) >= 0  )   CALL mpi_wait(ml_req1,ml_stat,ml_err) 
     160      IF( mpinei(jpno) >= 0  )   CALL mpi_wait(ml_req2,ml_stat,ml_err) 
    196161      ! 
    197162      IF( ln_timing ) CALL tic_tac(.FALSE.) 
     
    200165      ijhom = jpj - nn_hls 
    201166      ! 
    202       SELECT CASE ( nbondj ) 
    203       CASE ( -1 ) 
    204          DO jl = 1, iprecj 
    205             pt2d(:,ijhom+jl) = r2dns(:,jl,2) 
    206          END DO 
    207       CASE ( 0 ) 
    208          DO jl = 1, iprecj 
    209             pt2d(:,jl-kextj) = r2dsn(:,jl,2) 
    210             pt2d(:,ijhom+jl) = r2dns(:,jl,2) 
    211          END DO 
    212       CASE ( 1 ) 
     167      IF( mpinei(jpso) >= 0  ) THEN 
    213168         DO jl = 1, iprecj 
    214169            pt2d(:,jl-kextj) = r2dsn(:,jl,2) 
    215170         END DO 
    216       END SELECT 
     171      ENDIF 
     172       IF( mpinei(jpno) >= 0  ) THEN 
     173        DO jl = 1, iprecj 
     174            pt2d(:,ijhom+jl) = r2dns(:,jl,2) 
     175         END DO 
     176      ENDIF 
    217177      ! 
    218178   END SUBROUTINE ROUTINE_LNK 
Note: See TracChangeset for help on using the changeset viewer.