Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_call_generic.h90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_call_generic.h90	(revision 14365)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_call_generic.h90	(revision 14366)
@@ -24,5 +24,5 @@
       &                   , pt9 , cdna9 , psgn9 , pt10, cdna10, psgn10, pt11, cdna11, psgn11, pt12, cdna12, psgn12  &
       &                   , pt13, cdna13, psgn13, pt14, cdna14, psgn14, pt15, cdna15, psgn15, pt16, cdna16, psgn16  &
-      &                   , kfillmode, pfillval, khls, lsend, lrecv, ncsten )
+      &                   , kfillmode, pfillval, khls, lsend, lrecv, ld4only )
       !!---------------------------------------------------------------------
       CHARACTER(len=*)     ,                   INTENT(in   ) ::   cdname  ! name of the calling subroutine
@@ -40,5 +40,5 @@
       INTEGER              , OPTIONAL        , INTENT(in   ) ::   khls        ! halo size, default = nn_hls
       LOGICAL, DIMENSION(4), OPTIONAL        , INTENT(in   ) ::   lsend, lrecv   ! indicate how communications are to be carried out
-      LOGICAL              , OPTIONAL        , INTENT(in   ) ::   ncsten
+      LOGICAL              , OPTIONAL        , INTENT(in   ) ::   ld4only     ! if .T., do only 4-neighbour comm (ignore corners)
       !!
       INTEGER                          ::   kfld        ! number of elements that will be attributed
@@ -71,7 +71,7 @@
       !     
       IF( nn_comm == 1 ) THEN 
-         CALL lbc_lnk_pt2pt(   cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv )
+         CALL lbc_lnk_pt2pt(   cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only )
       ELSE
-         CALL lbc_lnk_neicoll( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ncsten )
+         CALL lbc_lnk_neicoll( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only )
       ENDIF
       !
Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_neicoll_generic.h90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_neicoll_generic.h90	(revision 14365)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_neicoll_generic.h90	(revision 14366)
@@ -1,4 +1,4 @@
 
-   SUBROUTINE lbc_lnk_neicoll_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, khls, lsend, lrecv, ncsten )
+   SUBROUTINE lbc_lnk_neicoll_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only )
       CHARACTER(len=*)              , INTENT(in   ) ::   cdname      ! name of the calling subroutine
       TYPE(PTR_4d_/**/PRECISION),  DIMENSION(:), INTENT(inout) ::   ptab        ! pointer of arrays on which apply the b.c.
@@ -10,5 +10,5 @@
       INTEGER ,             OPTIONAL, INTENT(in   ) ::   khls        ! halo size, default = nn_hls
       LOGICAL, DIMENSION(4),OPTIONAL, INTENT(in   ) ::   lsend, lrecv  ! communication with other 4 proc
-      LOGICAL,              OPTIONAL, INTENT(in   ) ::   ncsten      ! 5-point or 9-point stencil
+      LOGICAL,              OPTIONAL, INTENT(in   ) ::   ld4only     ! if .T., do only 4-neighbour comm (ignore corners)
       !
       INTEGER  ::    ji,  jj,  jk , jl,  jf, jn      ! dummy loop indices
@@ -31,5 +31,5 @@
       REAL(PRECISION) ::   zland
       REAL(PRECISION), DIMENSION(:), ALLOCATABLE  ::   zsnd, zrcv          ! halos arrays
-      LOGICAL  ::   llncall                                          ! default: 9-point stencil
+      LOGICAL  ::   ll4only                                        ! default: 8 neighbourgs
       LOGICAL  ::   ll_IdoNFold
       !!----------------------------------------------------------------------
@@ -64,9 +64,9 @@
       ENDIF
       !
-      llncall = .TRUE.    ! default definition
-      IF( PRESENT(ncsten) ) llncall = ncsten
-      !
-      impi_nc = mpi_nc_com4(ihls)
-      IF(llncall)   impi_nc = mpi_nc_com8(ihls)
+      ll4only = .FALSE.    ! default definition
+      IF( PRESENT(ld4only) )   ll4only = ld4only
+      !
+      impi_nc = mpi_nc_com8(ihls)   ! default
+      IF( ll4only )   impi_nc = mpi_nc_com4(ihls)
       !
       zland = 0._wp                                     ! land filling value: zero by default
@@ -80,10 +80,10 @@
          WRITE(ctmp1,*) TRIM(cdname), '  is calling lbc_lnk with only one of the two arguments lsend or lrecv'
          CALL ctl_stop( 'STOP', ctmp1 )
-      ELSE                                                  ! default neighbours
+      ELSE                                              ! default neighbours
          llsend(:) = mpiSnei(ihls,:) >= 0
-         IF( .NOT. llncall )   llsend(5:8) = .FALSE.        ! exclude corners
+         IF( ll4only )   llsend(5:8) = .FALSE.          ! exclude corners
          llrecv(:) = mpiRnei(ihls,:) >= 0
-         IF( .NOT. llncall )   llrecv(5:8) = .FALSE.        ! exclude corners
-      END IF
+         IF( ll4only )   llrecv(5:8) = .FALSE.          ! exclude corners
+      ENDIF
       !
       ! define ifill: which method should be used to fill each parts (sides+corners) of the halos
@@ -94,5 +94,5 @@
          ELSEIF( PRESENT(kfillmode) ) THEN   ;   ifill(jn) = kfillmode    ! localy defined
          ELSE                                ;   ifill(jn) = jpfillcst    ! constant value (zland)
-         END IF
+         ENDIF
       END DO
       ! take care of "indirect self-periodicity" for the corners
@@ -167,5 +167,5 @@
                idx = idx + 1
             END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
-         END IF
+         ENDIF
       END DO
       !
Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90	(revision 14365)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90	(revision 14366)
@@ -1,4 +1,4 @@
 
-   SUBROUTINE lbc_lnk_pt2pt_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, khls, lsend, lrecv )
+   SUBROUTINE lbc_lnk_pt2pt_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only )
       CHARACTER(len=*)              , INTENT(in   ) ::   cdname      ! name of the calling subroutine
       TYPE(PTR_4d_/**/PRECISION),  DIMENSION(:), INTENT(inout) ::   ptab        ! pointer of arrays on which apply the b.c.
@@ -10,4 +10,5 @@
       INTEGER ,             OPTIONAL, INTENT(in   ) ::   khls        ! halo size, default = nn_hls
       LOGICAL, DIMENSION(4),OPTIONAL, INTENT(in   ) ::   lsend, lrecv  ! communication with other 4 proc
+      LOGICAL,              OPTIONAL, INTENT(in   ) ::   ld4only     ! if .T., do only 4-neighbour comm (ignore corners)
       !
       INTEGER  ::     ji,   jj,  jk,  jl,  jf, jn     ! dummy loop indices
@@ -18,11 +19,14 @@
       INTEGER  ::   ifill_nfd, icomm, ierr
       INTEGER  ::   ihls, idxs, idxr
-      INTEGER, DIMENSION(4)  ::   isizei, ishtSi, ishtRi, ishtPi
-      INTEGER, DIMENSION(4)  ::   isizej, ishtSj, ishtRj, ishtPj
-      INTEGER, DIMENSION(4)  ::   ifill, iszall, ishtS, ishtR
-      INTEGER, DIMENSION(4)  ::   ireq  ! mpi_request id
+      INTEGER, DIMENSION(4)  ::   iwewe, issnn
+      INTEGER, DIMENSION(8)  ::   isizei, ishtSi, ishtRi, ishtPi
+      INTEGER, DIMENSION(8)  ::   isizej, ishtSj, ishtRj, ishtPj
+      INTEGER, DIMENSION(8)  ::   ifill, iszall, ishtS, ishtR
+      INTEGER, DIMENSION(8)  ::   ireq             ! mpi_request id
+      INTEGER, DIMENSION(8)  ::   iStag, iRtag     ! Send and Recv mpi_tag id
       REAL(PRECISION) ::   zland
       REAL(PRECISION), DIMENSION(:), ALLOCATABLE  ::   zsnd, zrcv          ! halos arrays
-      LOGICAL, DIMENSION(4)  ::   llsend, llrecv
+      LOGICAL, DIMENSION(8)  ::   llsend, llrecv
+      LOGICAL  ::   ll4only                                        ! default: 8 neighbourgs
       LOGICAL  ::   ll_IdoNFold
       !!----------------------------------------------------------------------
@@ -40,4 +44,8 @@
       IF( narea == 1 .AND. numcom == -1 ) CALL mpp_report( cdname, ipk, ipl, ipf, ld_lbc = .TRUE. )
       !
+      idxs = 1   ! initalize index for send buffer
+      idxr = 1   ! initalize index for recv buffer
+      icomm = mpi_comm_oce        ! shorter name
+      !
       ! take care of optional parameters
       !
@@ -56,4 +64,7 @@
          CALL ctl_stop( 'STOP', ctmp1 )
       ENDIF
+      !
+      ll4only = .FALSE.    ! default definition
+      IF( PRESENT(ld4only) )   ll4only = ld4only
       !
       zland = 0._wp                                     ! land filling value: zero by default
@@ -66,8 +77,10 @@
          WRITE(ctmp1,*) TRIM(cdname), ' is calling lbc_lnk with only one of the two arguments lsend or lrecv'
          CALL ctl_stop( 'STOP', ctmp1 )
-      ELSE                                                  ! default neighbours
-         llsend(:) = mpiSnei(ihls,1:4) >= 0
-         llrecv(:) = mpiRnei(ihls,1:4) >= 0
-      END IF
+      ELSE                                              ! default neighbours
+         llsend(:) = mpiSnei(ihls,:) >= 0
+         IF( ll4only )   llsend(5:8) = .FALSE.          ! exclude corners
+         llrecv(:) = mpiRnei(ihls,:) >= 0
+         IF( ll4only )   llrecv(5:8) = .FALSE.          ! exclude corners
+      ENDIF
       !
       ! define ifill: which method should be used to fill each parts (sides+corners) of the halos
@@ -78,6 +91,12 @@
          ELSEIF( PRESENT(kfillmode) ) THEN   ;   ifill(jn) = kfillmode    ! localy defined
          ELSE                                ;   ifill(jn) = jpfillcst    ! constant value (zland)
-         END IF
-      END DO
+         ENDIF
+      END DO
+      DO jn = 5, 8
+         IF(             llrecv(jn) ) THEN   ;   ifill(jn) = jpfillmpi    ! with an mpi communication
+         ELSE                                ;   ifill(jn) = jpfillnothing! do nothing
+         ENDIF
+      END DO
+         !
       ! north fold treatment
       ll_IdoNFold = l_IdoNFold .AND. ifill(jpno) /= jpfillnothing
@@ -103,13 +122,14 @@
       !                   !                    ip0i ip1i        im1i im0i
       !
-      !     sides:     west  east south north
-      isizei(1:4) = (/ ihls, ihls,  ipi,  ipi /)   ! i- count
-      isizej(1:4) = (/  ipj,  ipj, ihls, ihls /)   ! j- count
-      ishtSi(1:4) = (/ ip1i, im1i, ip0i, ip0i /)   ! i- shift send data
-      ishtSj(1:4) = (/ ip0j, ip0j, ip1j, im1j /)   ! j- shift send data
-      ishtRi(1:4) = (/ ip0i, im0i, ip0i, ip0i /)   ! i- shift received data location
-      ishtRj(1:4) = (/ ip0j, ip0j, ip0j, im0j /)   ! j- shift received data location
-      ishtPi(1:4) = (/ im1i, ip1i, ip0i, ip0i /)   ! i- shift data used for periodicity
-      ishtPj(1:4) = (/ ip0j, ip0j, im1j, ip1j /)   ! j- shift data used for periodicity
+      iwewe(:) = (/ jpwe,jpea,jpwe,jpea /)   ;   issnn(:) = (/ jpso,jpso,jpno,jpno /)
+      !cd     sides:     west  east south north      ;   corners: so-we, so-ea, no-we, no-ea
+      isizei(1:4) = (/ ihls, ihls,  ipi,  ipi /)   ;   isizei(5:8) = ihls              ! i- count
+      isizej(1:4) = (/  ipj,  ipj, ihls, ihls /)   ;   isizej(5:8) = ihls              ! j- count
+      ishtSi(1:4) = (/ ip1i, im1i, ip0i, ip0i /)   ;   ishtSi(5:8) = ishtSi( iwewe )   ! i- shift send data
+      ishtSj(1:4) = (/ ip0j, ip0j, ip1j, im1j /)   ;   ishtSj(5:8) = ishtSj( issnn )   ! j- shift send data
+      ishtRi(1:4) = (/ ip0i, im0i, ip0i, ip0i /)   ;   ishtRi(5:8) = ishtRi( iwewe )   ! i- shift received data location
+      ishtRj(1:4) = (/ ip0j, ip0j, ip0j, im0j /)   ;   ishtRj(5:8) = ishtRj( issnn )   ! j- shift received data location
+      ishtPi(1:4) = (/ im1i, ip1i, ip0i, ip0i /)   ;   ishtPi(5:8) = ishtPi( iwewe )   ! i- shift data used for periodicity
+      ishtPj(1:4) = (/ ip0j, ip0j, im1j, ip1j /)   ;   ishtPj(5:8) = ishtPj( issnn )   ! j- shift data used for periodicity
       !
       ! -------------------------------- !
@@ -117,13 +137,18 @@
       ! -------------------------------- !
       !
-      ireq(:) = MPI_REQUEST_NULL
+      ireq(:) = MPI_REQUEST_NULL             ! default definition when no communication is done. understood by mpi_waitall
+      iStag = (/ 1, 2, 3, 4, 5, 6, 7, 8 /)   ! any value but each one must be different
+      ! define iRtag with the corresponding iStag, e.g. data received at west where sent at east.
+      iRtag(jpwe) = iStag(jpea)   ;   iRtag(jpea) = iStag(jpwe)   ;   iRtag(jpso) = iStag(jpno)   ;   iRtag(jpno) = iStag(jpso)
+      iRtag(jpsw) = iStag(jpne)   ;   iRtag(jpse) = iStag(jpnw)   ;   iRtag(jpnw) = iStag(jpse)   ;   iRtag(jpne) = iStag(jpsw)
+      !
       iszall(:) = isizei(:) * isizej(:) * ipk * ipl * ipf
       ishtS(1) = 0
-      DO jn = 2,4
-         ishtS(jn) = ishtS(jn-1) + iszall(jn-1) * COUNT( (/llsend(jn-1)/) )   ! with _alltoallv: in units of sendtype
+      DO jn = 2, 8
+         ishtS(jn) = ishtS(jn-1) + iszall(jn-1) * COUNT( (/llsend(jn-1)/) )
       END DO
       ishtR(1) = 0
-      DO jn = 2,4
-         ishtR(jn) = ishtR(jn-1) + iszall(jn-1) * COUNT( (/llrecv(jn-1)/) )   ! with _alltoallv: in units of sendtype
+      DO jn = 2, 8
+         ishtR(jn) = ishtR(jn-1) + iszall(jn-1) * COUNT( (/llrecv(jn-1)/) )
       END DO
 
@@ -131,10 +156,8 @@
       ALLOCATE( zsnd( SUM(iszall, mask = llsend) ), zrcv( SUM(iszall, mask = llrecv) ) )
       !
-      ! -------------------------------------------------- !
-      !     3. Do east and west MPI exchange if needed     !
-      ! -------------------------------------------------- !
-      !
-      ! fill sending buffer with ARRAY_IN
-      idxs = 1
+      ! ----------------------------------------------- !
+      !     3. Do east and west MPI_Isend if needed     !
+      ! ----------------------------------------------- !
+      !
       DO jn = 1, 2
          IF( llsend(jn) ) THEN
@@ -145,24 +168,12 @@
                idxs = idxs + 1
             END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
-         END IF
-      END DO
-      !
-#if ! defined key_mpi_off
-      IF( ln_timing ) CALL tic_tac(.TRUE.)
-      !
-      icomm = mpi_comm_oce        ! shorter name
-      ! non-blocking send of the western/eastern side using local temporary arrays
-      jn = jpwe
-      IF( llsend(jn) )   CALL MPI_ISEND( zsnd(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), 1, icomm, ireq(jn), ierr )
-      jn = jpea
-      IF( llsend(jn) )   CALL MPI_ISEND( zsnd(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), 2, icomm, ireq(jn), ierr )
-      ! blocking receive of the western/eastern halo in local temporary arrays
-      jn = jpwe
-      IF( llrecv(jn) )   CALL MPI_RECV(  zrcv(ishtR(jn)+1), iszall(jn), MPI_TYPE, mpiRnei(ihls,jn), 2, icomm, MPI_STATUS_IGNORE, ierr )
-      jn = jpea
-      IF( llrecv(jn) )   CALL MPI_RECV(  zrcv(ishtR(jn)+1), iszall(jn), MPI_TYPE, mpiRnei(ihls,jn), 1, icomm, MPI_STATUS_IGNORE, ierr )
-      !
-      IF( ln_timing ) CALL tic_tac(.FALSE.)
-#endif
+#if ! defined key_mpi_off
+            IF( ln_timing ) CALL tic_tac(.TRUE.)
+            ! non-blocking send of the west/east side using local buffer
+            CALL MPI_ISEND( zsnd(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), iStag(jn), icomm, ireq(jn), ierr )
+            IF( ln_timing ) CALL tic_tac(.FALSE.)
+#endif
+         ENDIF
+      END DO
       !
       ! ----------------------------------- !
@@ -170,5 +181,4 @@
       ! ----------------------------------- !
       !
-      idxr = 1
       DO jn = 1, 2
          ishti = ishtRi(jn)
@@ -177,4 +187,10 @@
          CASE ( jpfillnothing )               ! no filling 
          CASE ( jpfillmpi   )                 ! fill with data received by MPI
+#if ! defined key_mpi_off
+            IF( ln_timing ) CALL tic_tac(.TRUE.)
+            !                                 ! blocking receive of the west/east halo in local temporary arrays
+            CALL MPI_RECV(  zrcv(ishtR(jn)+1), iszall(jn), MPI_TYPE, mpiRnei(ihls,jn), iRtag(jn), icomm, MPI_STATUS_IGNORE, ierr )
+            IF( ln_timing ) CALL tic_tac(.FALSE.)
+#endif
             DO jf = 1, ipf  ;  DO jl = 1, ipl  ;  DO jk = 1, ipk  ;  DO jj = 1,isizej(jn)  ;  DO ji = 1,isizei(jn)
                ptab(jf)%pt4d(ishti+ji,ishtj+jj,jk,jl) = zrcv(idxr)
@@ -212,7 +228,7 @@
       ENDIF
       !
-      ! ---------------------------------------------------- !
-      !     6. Do north and south MPI exchange if needed     !
-      ! ---------------------------------------------------- !
+      ! ------------------------------------------------- !
+      !     6. Do north and south MPI_Isend if needed     !
+      ! ------------------------------------------------- !
       !
       DO jn = 3, 4
@@ -224,23 +240,12 @@
                idxs = idxs + 1
             END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
-         END IF
-      END DO
-      !
-#if ! defined key_mpi_off
-      IF( ln_timing ) CALL tic_tac(.TRUE.)
-      !
-      ! non-blocking send of the western/eastern side using local temporary arrays
-      jn = jpso
-      IF( llsend(jn) )   CALL MPI_ISEND( zsnd(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), 3, icomm, ireq(jn), ierr )
-      jn = jpno
-      IF( llsend(jn) )   CALL MPI_ISEND( zsnd(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), 4, icomm, ireq(jn), ierr )
-      ! blocking receive of the western/eastern halo in local temporary arrays
-      jn = jpso
-      IF( llrecv(jn) )   CALL MPI_RECV(  zrcv(ishtR(jn)+1), iszall(jn), MPI_TYPE, mpiRnei(ihls,jn), 4, icomm, MPI_STATUS_IGNORE, ierr )
-      jn = jpno
-      IF( llrecv(jn) )   CALL MPI_RECV(  zrcv(ishtR(jn)+1), iszall(jn), MPI_TYPE, mpiRnei(ihls,jn), 3, icomm, MPI_STATUS_IGNORE, ierr )
-      !
-      IF( ln_timing ) CALL tic_tac(.FALSE.)
-#endif
+#if ! defined key_mpi_off
+            IF( ln_timing ) CALL tic_tac(.TRUE.)
+            ! non-blocking send of the south/north side using local buffer
+            CALL MPI_ISEND( zsnd(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), iStag(jn), icomm, ireq(jn), ierr )
+            IF( ln_timing ) CALL tic_tac(.FALSE.)
+#endif
+         ENDIF
+      END DO
       !
       ! ------------------------------------- !
@@ -254,4 +259,10 @@
          CASE ( jpfillnothing )               ! no filling 
          CASE ( jpfillmpi   )                 ! fill with data received by MPI
+#if ! defined key_mpi_off
+            IF( ln_timing ) CALL tic_tac(.TRUE.)
+            !                                 ! blocking receive of the south/north halo in local temporary arrays
+            CALL MPI_RECV(  zrcv(ishtR(jn)+1), iszall(jn), MPI_TYPE, mpiRnei(ihls,jn), iRtag(jn), icomm, MPI_STATUS_IGNORE, ierr )
+            IF( ln_timing ) CALL tic_tac(.FALSE.)
+#endif
             DO jf = 1, ipf  ;  DO jl = 1, ipl  ;  DO jk = 1, ipk  ;  DO jj = 1,isizej(jn)  ;  DO ji = 1,isizei(jn)
                ptab(jf)%pt4d(ishti+ji,ishtj+jj,jk,jl) = zrcv(idxr)
@@ -277,9 +288,47 @@
       END DO
       !
+      ! ----------------------------------------------- !
+      !     8. Specific problem in corner treatment     !
+      !              ( very rate case... )              !
+      ! ----------------------------------------------- !
+      !
+      DO jn = 5, 8
+         IF( llsend(jn) ) THEN
+            ishti = ishtSi(jn)
+            ishtj = ishtSj(jn)
+            DO jf = 1, ipf  ;  DO jl = 1, ipl  ;  DO jk = 1, ipk  ;  DO jj = 1,isizej(jn)  ;  DO ji = 1,isizei(jn)
+               zsnd(idxs) = ptab(jf)%pt4d(ishti+ji,ishtj+jj,jk,jl)
+               idxs = idxs + 1
+            END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
+#if ! defined key_mpi_off
+            IF( ln_timing ) CALL tic_tac(.TRUE.)
+            ! non-blocking send of the corners using local buffer
+            CALL MPI_ISEND( zsnd(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), iStag(jn), icomm, ireq(jn), ierr )
+            IF( ln_timing ) CALL tic_tac(.FALSE.)
+#endif
+         ENDIF
+      END DO
+      DO jn = 5, 8
+         IF( llrecv(jn) ) THEN
+#if ! defined key_mpi_off
+            IF( ln_timing ) CALL tic_tac(.TRUE.)
+            ! blocking receive of the corner halo in local temporary arrays
+            CALL MPI_RECV(  zrcv(ishtR(jn)+1), iszall(jn), MPI_TYPE, mpiRnei(ihls,jn), iRtag(jn), icomm, MPI_STATUS_IGNORE, ierr )
+            IF( ln_timing ) CALL tic_tac(.FALSE.)
+#endif
+            ishti = ishtRi(jn)
+            ishtj = ishtRj(jn)
+            DO jf = 1, ipf  ;  DO jl = 1, ipl  ;  DO jk = 1, ipk  ;  DO jj = 1,isizej(jn)  ;  DO ji = 1,isizei(jn)
+               ptab(jf)%pt4d(ishti+ji,ishtj+jj,jk,jl) = zrcv(idxr)
+               idxr = idxr + 1
+            END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
+         ENDIF
+      END DO
+      !
       ! -------------------------------------------- !
-      !     8. deallocate local temporary arrays     !
+      !     9. deallocate local temporary arrays     !
       ! -------------------------------------------- !
       !
-      CALL mpi_waitall(4, ireq, MPI_STATUSES_IGNORE, ierr)
+      CALL mpi_waitall(8, ireq, MPI_STATUSES_IGNORE, ierr)
       DEALLOCATE( zsnd, zrcv )
       !
Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbclnk.F90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbclnk.F90	(revision 14365)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbclnk.F90	(revision 14366)
@@ -51,5 +51,5 @@
 
    !! * Substitutions
-#  include "do_loop_substitute.h90"
+   !!#  include "do_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mppini.F90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mppini.F90	(revision 14365)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mppini.F90	(revision 14366)
@@ -453,5 +453,5 @@
             WRITE(inum,'(15i6)')  jp-1, ii, ij, ijpi(ii,ij), ijpj(ii,ij), iimppt(ii,ij), ijmppt(ii,ij), inei(:,ii,ij)
          END DO
-      END IF
+      ENDIF
 
       !
@@ -564,5 +564,5 @@
             WRITE(inum,'(a,8i6)') ' Recv: ', ichanged(jh*16 -7:jh*16  )
          END DO
-      END IF
+      ENDIF
       !
       CALL init_ioipsl           ! Prepare NetCDF output file (if necessary)
@@ -781,5 +781,5 @@
                iszi1(ii) = iszi0(ji)
                iszj1(ii) = iszj0(jj)
-            END IF
+            ENDIF
          END DO
       END DO
@@ -837,5 +837,5 @@
             WRITE(numout,*) '  -----------------------------------------------------'
             WRITE(numout,*)
-         END IF
+         ENDIF
          ji = isz0   ! initialization with the largest value
          ALLOCATE( llisOce(inbi0(ji), inbj0(ji)) )
@@ -854,5 +854,5 @@
                   &   '%), largest oce domain: ', iszi0(ji)*iszj0(ji), ' ( ', iszi0(ji),' x ', iszj0(ji), ' )'
                inbijold = inbij
-            END IF
+            ENDIF
          END DO
          DEALLOCATE( inbi0, inbj0, iszi0, iszj0 )
@@ -1208,4 +1208,12 @@
 ENDIF
          !
+         ! Specific (and rare) problem in corner treatment because we do 1st West-East comm, next South-North comm
+         IF( nn_comm == 1 ) THEN
+            IF( mpiSnei(jh,jpwe) > -1 )   mpiSnei(jh, (/jpsw,jpnw/) ) = -1   ! SW and NW corners already sent through West nei
+            IF( mpiSnei(jh,jpea) > -1 )   mpiSnei(jh, (/jpse,jpne/) ) = -1   ! SE and NE corners already sent through East nei
+            IF( mpiRnei(jh,jpso) > -1 )   mpiRnei(jh, (/jpsw,jpse/) ) = -1   ! SW and SE corners will be received through South nei
+            IF( mpiRnei(jh,jpno) > -1 )   mpiRnei(jh, (/jpnw,jpne/) ) = -1   ! NW and NE corners will be received through North nei
+        ENDIF
+         !
          DEALLOCATE( zmsk )
          !
Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/module_example.F90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/module_example.F90	(revision 14365)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/module_example.F90	(revision 14366)
@@ -127,7 +127,5 @@
       ! WARNING! the lbc_lnk call could not be compatible with the tiling approach
       ! please refer to the manual for how to adapt your code
-      CALL lbc_lnk( 'module_example', avm, 'T', 1., ncsten=true )     ! Lateral boundary conditions (unchanged sign)
-      !                                                                ! ncsten=false for 5-points stencil communication
-      !                                                                ! ncsten=true (default)  for 9-points stencil communication
+      CALL lbc_lnk( 'module_example', avm, 'T', 1. )     ! Lateral boundary conditions (unchanged sign)
       !
    END SUBROUTINE exa_mpl
