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 2636 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SOL/solpcg.F90 – NEMO

Ignore:
Timestamp:
2011-03-01T20:04:06+01:00 (13 years ago)
Author:
gm
Message:

dynamic mem: #785 ; move ctl_stop & warn in lib_mpp to avoid a circular dependency + ctl_stop improvment

File:
1 edited

Legend:

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

    r2633 r2636  
    2626   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    2727   !! $Id$  
    28    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     28   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    2929   !!---------------------------------------------------------------------- 
    3030CONTAINS 
     
    8383      !!        !  08-01  (R. Benshila) mpp optimization 
    8484      !!---------------------------------------------------------------------- 
    85       USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
    86       USE wrk_nemo, ONLY: zgcr => wrk_2d_1 
    87       !! 
    88       INTEGER, INTENT( inout ) ::   kindic   ! solver indicator, < 0 if the conver- 
    89       !                                      ! gence is not reached: the model is 
    90       !                                      ! stopped in step 
    91       !                                      ! set to zero before the call of solpcg 
    92       !! 
    93       INTEGER ::   ji, jj, jn                ! dummy loop indices 
    94       REAL(wp) ::  zgcad                     ! temporary scalars 
    95       REAL(wp), DIMENSION(2) :: zsum 
     85      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
     86      USE wrk_nemo, ONLY:   zgcr => wrk_2d_1 
     87      !! 
     88      INTEGER, INTENT(inout) ::   kindic   ! solver indicator, < 0 if the conver- 
     89      !                                    ! gence is not reached: the model is stopped in step 
     90      !                                    ! set to zero before the call of solpcg 
     91      !! 
     92      INTEGER  ::   ji, jj, jn   ! dummy loop indices 
     93      REAL(wp) ::   zgcad        ! temporary scalars 
     94      REAL(wp), DIMENSION(2) ::   zsum 
    9695      !!---------------------------------------------------------------------- 
    9796       
    9897      IF( wrk_in_use(2, 1) )THEN 
    99          CALL ctl_stop('sol_pcg: requested workspace array is unavailable') 
    100          RETURN 
    101       END IF 
     98         CALL ctl_stop('sol_pcg: requested workspace array is unavailable')   ;   RETURN 
     99      ENDIF 
    102100 
    103101      ! Initialization of the algorithm with standard PCG 
    104102      ! ------------------------------------------------- 
    105       zgcr = 0.e0  
    106       gcr  = 0.e0  
     103      zgcr = 0._wp 
     104      gcr  = 0._wp 
    107105 
    108106      CALL lbc_lnk( gcx, c_solver_pt, 1. )   ! lateral boundary condition 
     
    207205      END DO                                           !    End Loop 
    208206      !                                                !================ 
    209       
    210207999   CONTINUE 
    211       
    212       
    213       ! Output in gcx with lateral b.c. applied 
    214       ! --------------------------------------- 
    215       
    216       CALL lbc_lnk( gcx, c_solver_pt, 1. ) 
    217       
     208           
     209      CALL lbc_lnk( gcx, c_solver_pt, 1. )      ! Output in gcx with lateral b.c. applied 
    218210      !  
    219       IF( wrk_not_released(2, 1) )THEN 
    220          CALL ctl_stop('sol_pcg: failed to release workspace array') 
    221       END IF 
     211      IF( wrk_not_released(2, 1) )   CALL ctl_stop('sol_pcg: failed to release workspace array') 
    222212      ! 
    223213   END SUBROUTINE sol_pcg 
Note: See TracChangeset for help on using the changeset viewer.