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 1976 for branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SOL – NEMO

Ignore:
Timestamp:
2010-06-29T17:41:10+02:00 (14 years ago)
Author:
acc
Message:

ticket #684 step 6: Add in changes between the head of the DEV_r1879_mpp_rep branch and the trunk@1879.

Location:
branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SOL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SOL/solpcg.F90

    r1601 r1976  
    1414   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    1515   USE in_out_manager  ! I/O manager 
     16   USE lib_fortran 
    1617 
    1718   IMPLICIT NONE 
     
    9596      ! Initialization of the algorithm with standard PCG 
    9697      ! ------------------------------------------------- 
     98      zgcr = 0.e0  
     99      gcr  = 0.e0  
    97100 
    98101      CALL lbc_lnk( gcx, c_solver_pt, 1. )   ! lateral boundary condition 
     
    100103      ! gcr   = gcb-a.gcx 
    101104      ! gcdes = gcr 
    102  
    103105      DO jj = 2, jpjm1 
    104106         DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    114116 
    115117      ! rnorme = (gcr,gcr) 
    116       rnorme = SUM(  gcr(:,:) * gcdmat(:,:) * gcr(:,:)  ) 
    117       IF( lk_mpp )   CALL mpp_sum( rnorme )   ! sum over the global domain 
     118      rnorme = glob_sum(  gcr(:,:) * gcdmat(:,:) * gcr(:,:)  ) 
    118119 
    119120      CALL lbc_lnk( gcdes, c_solver_pt, 1. )   ! lateral boundary condition 
     
    129130 
    130131      ! alph = (gcr,gcr)/(gcdes,gccd) 
    131       radd = SUM(  gcdes(:,:) * gcdmat(:,:) * gccd(:,:)  ) 
    132       IF( lk_mpp )   CALL mpp_sum( radd )   ! sum over the global domain 
     132      radd = glob_sum(  gcdes(:,:) * gcdmat(:,:) * gccd(:,:)  ) 
    133133      alph = rnorme /radd 
    134134 
     
    162162         ! rnorme = (gcr,gcr) 
    163163         rr = rnorme 
    164          zsum(1) = SUM(  gcr(:,:) * gcdmat(:,:) * gcr(:,:)  ) 
    165164 
    166165         ! zgcad = (zgcr,gcr)  
    167          zsum(2) = SUM( gcr(2:jpim1,2:jpjm1) * gcdmat(2:jpim1,2:jpjm1) * zgcr(2:jpim1,2:jpjm1) ) 
    168  
    169          IF( lk_mpp )   CALL mpp_sum( zsum, 2 )   ! sum over the global domain 
     166         zsum(1) = glob_sum(gcr(:,:) * gcdmat(:,:) * gcr(:,:)) 
     167         zsum(2) = glob_sum(gcr(:,:) * gcdmat(:,:) * zgcr(:,:) * bmask(:,:)) 
     168 
     169         !!RB we should gather the 2 glob_sum 
    170170         rnorme = zsum(1)   
    171171         zgcad  = zsum(2) 
    172  
    173172         ! test of convergence 
    174173         IF( rnorme < epsr .OR. jn == nn_nmax ) THEN 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SOL/solsor.F90

    r1601 r1976  
    2222   USE lib_mpp         ! distributed memory computing 
    2323   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     24   USE lib_fortran 
    2425 
    2526   IMPLICIT NONE 
     
    6465      INTEGER  ::   ijmppodd, ijmppeven, ijpr2d 
    6566      REAL(wp) ::   ztmp, zres, zres2 
     67      REAL(wp), DIMENSION(jpi,jpj) ::ztab 
    6668      !!---------------------------------------------------------------------- 
    6769       
     
    131133               ENDIF 
    132134            CASE ( 1 )                 ! relative precision 
    133                rnorme = SUM( gcr(2:nlci-1,2:nlcj-1) ) 
    134                IF( lk_mpp )   CALL mpp_sum( rnorme )   ! sum over the global domain 
     135               ztab = 0. 
     136               ztab(:,:) = gcr(2:nlci-1,2:nlcj-1) 
     137               rnorme = glob_sum( ztab)    ! sum over the global domain 
    135138               ! test of convergence 
    136139               IF( rnorme < epsr .OR. jn == nn_nmax ) THEN 
  • branches/DEV_r1784_mid_year_merge_2010/NEMO/OPA_SRC/SOL/solver.F90

    r1601 r1976  
    102102      END SELECT 
    103103      ! 
    104       IF( nbit_cmp == 1 ) THEN            ! reproductibility test SOR required 
    105          IF( nn_solv /= 2 ) THEN 
    106             CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require the SOR solver: nn_solv = 2' ) 
    107          ELSE IF( MAX( jpr2di, jpr2dj ) > 0 ) THEN 
    108             CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require jpr2di = jpr2dj = 0' ) 
    109          END IF  
    110       END IF 
    111104 
    112105      !                             !* Grid-point at which the solver is applied 
Note: See TracChangeset for help on using the changeset viewer.