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 10288 for NEMO/branches/2018/dev_r9866_HPC_03_globcom/src/OCE/LBC/mpp_nfd_generic.h90 – NEMO

Ignore:
Timestamp:
2018-11-07T18:25:49+01:00 (5 years ago)
Author:
francesca
Message:

reduce global communications, see #2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9866_HPC_03_globcom/src/OCE/LBC/mpp_nfd_generic.h90

    • Property svn:keywords set to Id
    r9805 r10288  
    5656      INTEGER  ::   ipi, ipj, ipk, ipl, ipf         ! dimension of the input array 
    5757      INTEGER  ::   imigr, iihom, ijhom             ! local integers 
    58       INTEGER  ::   ierr, itaille, ildi, ilei, iilb 
     58      INTEGER  ::   ierr, itaille, ilci, ildi, ilei, iilb 
    5959      INTEGER  ::   ij, iproc 
    6060      INTEGER, DIMENSION (jpmaxngh)       ::   ml_req_nf   ! for mpi_isend when avoiding mpi_allgather 
     
    9595         ALLOCATE( ztabl(jpimax   ,4,ipk,ipl,ipf) , ztabr(jpimax*jpmaxngh,4,ipk,ipl,ipf) )  
    9696         ! 
     97         ! when some processors of the north fold are suppressed,  
     98         ! values of ztab* arrays corresponding to these suppressed domain won't be defined  
     99         ! and we need a default definition to 0. 
     100         ! a better test should be: a testing if "suppressed land-processors" belongs to the north-pole folding 
     101         IF ( jpni*jpnj /= jpnij ) THEN 
     102            ztabr(:,:,:,:,:) = 0._wp 
     103            ztabl(:,:,:,:,:) = 0._wp 
     104         END IF 
     105         ! 
    97106         DO jf = 1, ipf 
    98107            DO jl = 1, ipl 
     
    117126            IF(iproc /= -1) THEN 
    118127               iilb = nimppt(iproc+1) 
     128               ilci = nlcit (iproc+1) 
    119129               ildi = nldit (iproc+1) 
    120130               ilei = nleit (iproc+1) 
    121                IF( iilb           ==      1 )   ildi = 1     ! e-w boundary already done -> force to take 1st column 
    122                IF( iilb + jpi - 1 == jpiglo )   ilei = jpi   ! e-w boundary already done -> force to take last column 
     131               IF( iilb            ==      1 )   ildi = 1      ! e-w boundary already done -> force to take 1st column 
     132               IF( iilb + ilci - 1 == jpiglo )   ilei = ilci   ! e-w boundary already done -> force to take last column 
    123133               iilb = nfiimpp(isendto(jr),jpnj) - nfiimpp(isendto(1),jpnj) 
    124134            ENDIF 
     
    179189         ALLOCATE( znorthgloio(jpimax,4,ipk,ipl,ipf,jpni) ) 
    180190         ! 
     191         ! when some processors of the north fold are suppressed, 
     192         ! values of ztab* arrays corresponding to these suppressed domain won't be defined 
     193         ! and we need a default definition to 0. 
     194         ! a better test should be: a testing if "suppressed land-processors" belongs to the north-pole folding 
     195         IF ( jpni*jpnj /= jpnij ) ztab(:,:,:,:,:)=0._wp 
     196         ! 
    181197         CALL MPI_ALLGATHER( znorthloc  , itaille, MPI_DOUBLE_PRECISION,                & 
    182198            &                znorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 
     
    185201            iproc = nrank_north(jr) + 1 
    186202            iilb  = nimppt(iproc) 
     203            ilci  = nlcit (iproc) 
    187204            ildi  = nldit (iproc) 
    188205            ilei  = nleit (iproc) 
    189             IF( iilb           ==      1 )   ildi = 1     ! e-w boundary already done -> force to take 1st column 
    190             IF( iilb + jpi - 1 == jpiglo )   ilei = jpi   ! e-w boundary already done -> force to take last column 
     206            IF( iilb            ==      1 )   ildi = 1      ! e-w boundary already done -> force to take 1st column 
     207            IF( iilb + ilci - 1 == jpiglo )   ilei = ilci   ! e-w boundary already done -> force to take last column 
    191208            DO jf = 1, ipf 
    192209               DO jl = 1, ipl 
Note: See TracChangeset for help on using the changeset viewer.