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 10629 – NEMO

Changeset 10629


Ignore:
Timestamp:
2019-02-04T17:07:39+01:00 (5 years ago)
Author:
smasson
Message:

trunk: bugfix in mpp for bdy, back to v3.6, see #2213, #2224, #2225

Location:
NEMO/trunk/src/OCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/BDY/bdyini.F90

    r10537 r10629  
    941941                     ii = idx_bdy(ib_bdy)%nbi(icount,igrd) 
    942942                     ij = idx_bdy(ib_bdy)%nbj(icount,igrd) 
    943                      if((com_east .ne. 1) .and. (ii == nlci) .and. (nbondi .le. 0)) then 
     943                     if((com_east .ne. 1) .and. (ii == (nlci-1)) .and. (nbondi .le. 0)) then 
    944944                        com_east = 1 
    945945                     elseif((com_west .ne. 1) .and. (ii == 2) .and. (nbondi .ge. 0) .and. (nbondi .ne. 2)) then 
     
    948948                     if((com_south .ne. 1) .and. (ij == 2) .and. (nbondj .ge. 0) .and. (nbondj .ne. 2)) then 
    949949                        com_south = 1 
    950                      elseif((com_north .ne. 1) .and. (ij == nlcj) .and. (nbondj .le. 0)) then 
     950                     elseif((com_north .ne. 1) .and. (ij == (nlcj-1)) .and. (nbondj .le. 0)) then 
    951951                        com_north = 1 
    952952                     endif  
     
    960960                       & nbrdta(ib,igrd,ib_bdy) == ir  ) THEN 
    961961                       ii = nbidta(ib,igrd,ib_bdy)- iw_b(1)+2 
    962                        if((com_west_b .ne. 1) .and. (ii == (nlcit(nowe+1)))) then 
     962                       if((com_west_b .ne. 1) .and. (ii == (nlcit(nowe+1)-1))) then 
    963963                          ij = nbjdta(ib,igrd,ib_bdy) - is_b(1)+2 
    964964                          if((ij == 2) .and. (nbondj == 0 .or. nbondj == 1)) then 
     
    989989                       & nbrdta(ib,igrd,ib_bdy) == ir  ) THEN 
    990990                       ii = nbidta(ib,igrd,ib_bdy)- iw_b(1)+2 
    991                        if((com_west_b .ne. 1) .and. (ii == (nlcit(nowe+1)))) then 
     991                       if((com_west_b .ne. 1) .and. (ii == (nlcit(nowe+1)-1))) then 
    992992                          ij = nbjdta(ib,igrd,ib_bdy) - is_b(1)+2 
    993993                          if((ij == 2) .and. (nbondj == 0 .or. nbondj == 1)) then 
     
    10301030                       & nbrdta(ib,igrd,ib_bdy) == ir  ) THEN 
    10311031                       ij = nbjdta(ib,igrd,ib_bdy)- is_b(3)+2 
    1032                        if((com_south_b .ne. 1) .and. (ij == (nlcjt(noso+1)))) then 
     1032                       if((com_south_b .ne. 1) .and. (ij == (nlcjt(noso+1)-1))) then 
    10331033                          com_south_b = 1 
    10341034                       endif  
     
    10521052                       & nbrdta(ib,igrd,ib_bdy) == ir  ) THEN 
    10531053                       ij = nbjdta(ib,igrd,ib_bdy)- is_b(3)+2 
    1054                        if((com_south_b .ne. 1) .and. (ij == (nlcjt(noso+1)))) then 
     1054                       if((com_south_b .ne. 1) .and. (ij == (nlcjt(noso+1)-1))) then 
    10551055                          com_south_b = 1 
    10561056                       endif  
  • NEMO/trunk/src/OCE/LBC/mpp_bdy_generic.h90

    r10542 r10629  
    140140         CASE ( -1 ) 
    141141            CALL mppsend( 2, zt3we(1,1,1,1,1,1), imigr, noea, ml_req1 ) 
    142             CALL mpprecv( 1, zt3ew(1,1,1,1,1,2), imigr, noea ) 
    143             IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    144142         CASE ( 0 ) 
    145143            CALL mppsend( 1, zt3ew(1,1,1,1,1,1), imigr, nowe, ml_req1 ) 
    146144            CALL mppsend( 2, zt3we(1,1,1,1,1,1), imigr, noea, ml_req2 ) 
     145         CASE ( 1 ) 
     146            CALL mppsend( 1, zt3ew(1,1,1,1,1,1), imigr, nowe, ml_req1 ) 
     147         END SELECT 
     148         ! 
     149         SELECT CASE ( nbondi_bdy_b(IBD_IN(jf)) ) 
     150         CASE ( -1 ) 
     151            CALL mpprecv( 1, zt3ew(1,1,1,1,1,2), imigr, noea ) 
     152         CASE ( 0 ) 
    147153            CALL mpprecv( 1, zt3ew(1,1,1,1,1,2), imigr, noea ) 
    148154            CALL mpprecv( 2, zt3we(1,1,1,1,1,2), imigr, nowe ) 
     155         CASE ( 1 ) 
     156            CALL mpprecv( 2, zt3we(1,1,1,1,1,2), imigr, nowe ) 
     157         END SELECT 
     158         ! 
     159         SELECT CASE ( nbondi_bdy(IBD_IN(jf)) ) 
     160         CASE ( -1 ) 
     161            IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
     162         CASE ( 0 ) 
    149163            IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    150164            IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 
    151165         CASE ( 1 ) 
    152             CALL mppsend( 1, zt3ew(1,1,1,1,1,1), imigr, nowe, ml_req1 ) 
    153             CALL mpprecv( 2, zt3we(1,1,1,1,1,2), imigr, nowe ) 
    154166            IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    155167         END SELECT 
     
    230242         CASE ( -1 ) 
    231243            CALL mppsend( 4, zt3sn(1,1,1,1,1,1), imigr, nono, ml_req1 ) 
    232             CALL mpprecv( 3, zt3ns(1,1,1,1,1,2), imigr, nono ) 
    233             IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    234244         CASE ( 0 ) 
    235245            CALL mppsend( 3, zt3ns(1,1,1,1,1,1), imigr, noso, ml_req1 ) 
    236246            CALL mppsend( 4, zt3sn(1,1,1,1,1,1), imigr, nono, ml_req2 ) 
     247         CASE ( 1 ) 
     248            CALL mppsend( 3, zt3ns(1,1,1,1,1,1), imigr, noso, ml_req1 ) 
     249         END SELECT 
     250         !  
     251         SELECT CASE ( nbondj_bdy_b(IBD_IN(jf)) ) 
     252         CASE ( -1 ) 
     253            CALL mpprecv( 3, zt3ns(1,1,1,1,1,2), imigr, nono ) 
     254         CASE ( 0 ) 
    237255            CALL mpprecv( 3, zt3ns(1,1,1,1,1,2), imigr, nono ) 
    238256            CALL mpprecv( 4, zt3sn(1,1,1,1,1,2), imigr, noso ) 
     257         CASE ( 1 ) 
     258            CALL mpprecv( 4, zt3sn(1,1,1,1,1,2), imigr, noso ) 
     259         END SELECT 
     260         !  
     261         SELECT CASE ( nbondj_bdy(IBD_IN(jf)) ) 
     262         CASE ( -1 ) 
     263            IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
     264         CASE ( 0 ) 
    239265            IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    240266            IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err) 
    241267         CASE ( 1 ) 
    242             CALL mppsend( 3, zt3ns(1,1,1,1,1,1), imigr, noso, ml_req1 ) 
    243             CALL mpprecv( 4, zt3sn(1,1,1,1,1,2), imigr, noso ) 
    244268            IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err) 
    245269         END SELECT 
Note: See TracChangeset for help on using the changeset viewer.