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 11071 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynkeg.F90 – NEMO

Ignore:
Timestamp:
2019-06-04T14:58:06+02:00 (5 years ago)
Author:
girrmann
Message:

dev_r10984_HPC-13 : step 2, remove unneeded communications, see #2285

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynkeg.F90

    r11067 r11071  
    8080      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdu, ztrdv  
    8181      REAL(wp)  :: zweightu, zweightv 
    82       LOGICAL, DIMENSION(4) :: lsend1, lrecv1  ! indicate how bdy communications are to be carried out 
     82      LOGICAL, DIMENSION(4) :: llsend1, llrecv1  ! indicate how bdy communications are to be carried out 
    8383      !!---------------------------------------------------------------------- 
    8484      ! 
     
    136136               END IF 
    137137            END DO 
    138             ! send 2 and recv jpi, jpj used in the computation of the speed tendencies 
    139             lsend1(:) = .false. 
    140             lrecv1(:) = .false. 
     138            ! send jpi-1, jpj-1 and receive 1 used in the computation of the speed tendencies 
     139            llsend1(:) = .false. 
     140            llrecv1(:) = .false. 
    141141            DO ib_bdy = 1, nb_bdy 
    142                lsend1(:) = lsend1(:) .OR. lsend_bdy(ib_bdy,1,:)   ! to   every bdy neighbour, T points 
    143                lrecv1(:) = lrecv1(:) .OR. lrecv_bdy(ib_bdy,1,:)   ! from every bdy neighbour, T points 
    144             END DO 
    145             IF( COUNT(lsend1) > 0 .OR. COUNT(lrecv1) > 0 ) THEN   ! if need to send/recv in at least one direction 
    146                CALL lbc_bdy_lnk( 'bdydyn2d', lsend1, lrecv1, zhke, 'T',  1. ) 
     142               llsend1(2) = llsend1(2) .OR. lsend_bdy(ib_bdy,igrd,2)   ! send east 
     143               llsend1(4) = llsend1(4) .OR. lsend_bdy(ib_bdy,igrd,4)   ! send north 
     144               llrecv1(1) = llrecv1(1) .OR. lrecv_bdy(ib_bdy,igrd,1)   ! receive west  
     145               llrecv1(3) = llrecv1(3) .OR. lrecv_bdy(ib_bdy,igrd,3)   ! receive south 
     146            END DO 
     147    
     148            IF( ANY(llsend1) .OR. ANY(llrecv1) ) THEN   ! if need to send/recv in at least one direction 
     149               CALL lbc_bdy_lnk( 'bdydyn2d', llsend1, llrecv1, zhke, 'T',  1. ) 
    147150            END IF 
    148151         END IF 
Note: See TracChangeset for help on using the changeset viewer.