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 15540 for NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/LBC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2021-11-26T12:27:56+01:00 (3 years ago)
Author:
sparonuz
Message:

Mixed precision version, tested up to 30 years on ORCA2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/LBC/lib_mpp.F90

    r14644 r15540  
    197197   CHARACTER(len=3),  DIMENSION(nbdelay), PUBLIC ::   c_delaycpnt = (/ 'ICE'   , 'OCE' /) 
    198198   TYPE, PUBLIC ::   DELAYARR 
    199       REAL(   wp), POINTER, DIMENSION(:) ::  z1d => NULL() 
     199      REAL(   dp), POINTER, DIMENSION(:) ::  z1d => NULL() 
    200200      COMPLEX(dp), POINTER, DIMENSION(:) ::  y1d => NULL() 
    201201   END TYPE DELAYARR 
     
    207207   REAL(dp)              , PUBLIC ::  compute_time = 0._dp, elapsed_time = 0._dp 
    208208 
    209    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::   tampon   ! buffer in case of bsend 
     209   REAL(dp), DIMENSION(:), ALLOCATABLE, SAVE ::   tampon   ! buffer in case of bsend 
    210210 
    211211   LOGICAL, PUBLIC ::   ln_nnogather                !: namelist control of northfold comms 
     
    290290      !! 
    291291      !!---------------------------------------------------------------------- 
    292       REAL(wp), INTENT(inout) ::   pmess(*)   ! array of real 
     292      REAL(dp), INTENT(inout) ::   pmess(*)   ! array of real 
    293293      INTEGER , INTENT(in   ) ::   kbytes     ! size of the array pmess 
    294294      INTEGER , INTENT(in   ) ::   kdest      ! receive process number 
     
    365365      !! 
    366366      !!---------------------------------------------------------------------- 
    367       REAL(wp), INTENT(inout) ::   pmess(*)   ! array of real 
     367      REAL(dp), INTENT(inout) ::   pmess(*)   ! array of real 
    368368      INTEGER , INTENT(in   ) ::   kbytes     ! suze of the array pmess 
    369369      INTEGER , INTENT(in   ) ::   ktyp       ! Tag of the recevied message 
     
    458458      !! 
    459459      !!---------------------------------------------------------------------- 
    460       REAL(wp), DIMENSION(jpi,jpj)      , INTENT(in   ) ::   ptab   ! subdomain input array 
     460      REAL(dp), DIMENSION(jpi,jpj)      , INTENT(in   ) ::   ptab   ! subdomain input array 
    461461      INTEGER                           , INTENT(in   ) ::   kp     ! record length 
    462       REAL(wp), DIMENSION(jpi,jpj,jpnij), INTENT(  out) ::   pio    ! subdomain input array 
     462      REAL(dp), DIMENSION(jpi,jpj,jpnij), INTENT(  out) ::   pio    ! subdomain input array 
    463463      !! 
    464464      INTEGER :: itaille, ierror   ! temporary integer 
     
    484484      !! 
    485485      !!---------------------------------------------------------------------- 
    486       REAL(wp), DIMENSION(jpi,jpj,jpnij)  ::   pio    ! output array 
     486      REAL(dp), DIMENSION(jpi,jpj,jpnij)  ::   pio    ! output array 
    487487      INTEGER                             ::   kp     ! Tag (not used with MPI 
    488       REAL(wp), DIMENSION(jpi,jpj)        ::   ptab   ! subdomain array input 
     488      REAL(dp), DIMENSION(jpi,jpj)        ::   ptab   ! subdomain array input 
    489489      !! 
    490490      INTEGER :: itaille, ierror   ! temporary integer 
     
    513513      CHARACTER(len=*), INTENT(in   )               ::   cdelay  ! name (used as id) of the delayed operation 
    514514      COMPLEX(dp),      INTENT(in   ), DIMENSION(:) ::   y_in 
    515       REAL(wp),         INTENT(  out), DIMENSION(:) ::   pout 
     515      REAL(dp),         INTENT(  out), DIMENSION(:) ::   pout 
    516516      LOGICAL,          INTENT(in   )               ::   ldlast  ! true if this is the last time we call this routine 
    517517      INTEGER,          INTENT(in   ), OPTIONAL     ::   kcom 
     
    586586      CHARACTER(len=*), INTENT(in   )                 ::   cdname  ! name of the calling subroutine 
    587587      CHARACTER(len=*), INTENT(in   )                 ::   cdelay  ! name (used as id) of the delayed operation 
    588       REAL(wp),         INTENT(in   ), DIMENSION(:)   ::   p_in    ! 
    589       REAL(wp),         INTENT(  out), DIMENSION(:)   ::   pout    ! 
     588      REAL(dp),         INTENT(in   ), DIMENSION(:)   ::   p_in    ! 
     589      REAL(dp),         INTENT(  out), DIMENSION(:)   ::   pout    ! 
    590590      LOGICAL,          INTENT(in   )                 ::   ldlast  ! true if this is the last time we call this routine 
    591591      INTEGER,          INTENT(in   ), OPTIONAL       ::   kcom 
     
    12341234 
    12351235         ! The result is zt1 + zt2, after normalization. 
    1236          yddb(ji) = cmplx ( zt1 + zt2, zt2 - ((zt1 + zt2) - zt1),wp ) 
     1236         yddb(ji) = cmplx ( zt1 + zt2, zt2 - ((zt1 + zt2) - zt1), dp ) 
    12371237      END DO 
    12381238      ! 
Note: See TracChangeset for help on using the changeset viewer.