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 11210 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdydyn2d.F90 – NEMO

Ignore:
Timestamp:
2019-07-03T12:08:42+02:00 (5 years ago)
Author:
girrmann
Message:

dev_r10984_HPC-13 : remove some communications in bdy treatment in case nn_hls > 1, see #2285

File:
1 edited

Legend:

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

    r11195 r11210  
    5454      LOGICAL, DIMENSION(4) :: llsend2, llrecv2, llsend3, llrecv3  ! indicate how communications are to be carried out 
    5555       
     56      llsend2(:) = .false.   ;   llrecv2(:) = .false. 
     57      llsend3(:) = .false.   ;   llrecv3(:) = .false. 
    5658      DO ir = 1, 0, -1   ! treat rim 1 before rim 0 
    5759         IF( ir == 0 ) THEN   ;   llrim0 = .TRUE. 
     
    7779         ENDDO 
    7880         ! 
    79          llsend2(:) = .false. 
    80          llrecv2(:) = .false. 
    81          llsend3(:) = .false. 
    82          llrecv3(:) = .false. 
     81         IF( nn_hls > 1 .AND. ir == 1 ) CYCLE   ! at least 2 halos will be corrected -> no need to correct rim 1 before rim 0 
     82         IF( nn_hls == 1 ) THEN 
     83            llsend2(:) = .false.   ;   llrecv2(:) = .false. 
     84            llsend3(:) = .false.   ;   llrecv3(:) = .false. 
     85         END IF 
    8386         DO ib_bdy=1, nb_bdy 
    8487            SELECT CASE( cn_dyn2d(ib_bdy) ) 
     
    310313      LOGICAL, DIMENSION(4) :: llsend1, llrecv1  ! indicate how communications are to be carried out 
    311314      !!---------------------------------------------------------------------- 
     315      llsend1(:) = .false.   ;   llrecv1(:) = .false. 
    312316      DO ir = 1, 0, -1   ! treat rim 1 before rim 0 
    313          llsend1(:) = .false. 
    314          llrecv1(:) = .false. 
     317         IF( nn_hls == 1 ) THEN   ;   llsend1(:) = .false.   ;   llrecv1(:) = .false.   ;   END IF 
    315318         IF( ir == 0 ) THEN   ;   llrim0 = .TRUE. 
    316319         ELSE                 ;   llrim0 = .FALSE. 
     
    321324            llrecv1(:) = llrecv1(:) .OR. lrecv_bdyint(ib_bdy,1,:,ir)   ! possibly every direction, T points 
    322325         END DO 
     326         IF( nn_hls > 1 .AND. ir == 1 ) CYCLE   ! at least 2 halos will be corrected -> no need to correct rim 1 before rim 0 
    323327         IF( ANY(llsend1) .OR. ANY(llrecv1) ) THEN   ! if need to send/recv in at least one direction 
    324328            CALL lbc_lnk( 'bdydyn2d', zssh(:,:,1), 'T',  1., kfillmode=jpfillnothing ,lsend=llsend1, lrecv=llrecv1 ) 
Note: See TracChangeset for help on using the changeset viewer.