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

Changeset 14892


Ignore:
Timestamp:
2021-05-20T16:16:01+02:00 (3 years ago)
Author:
dguibert
Message:

lbc_lnk_call_generic: add lbc_lnk_pt2pt_async

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/LBC/lbc_lnk_call_generic.h90

    r14835 r14892  
    22#   define XD     2d 
    33#   define DIMS   :,: 
    4 #   define ISZ3   1  
    5 #   define ISZ4   1    
     4#   define ISZ3   1 
     5#   define ISZ4   1 
    66#endif 
    77#if defined DIM_3d 
     
    2424      &                   , pt9 , cdna9 , psgn9 , pt10, cdna10, psgn10, pt11, cdna11, psgn11, pt12, cdna12, psgn12  & 
    2525      &                   , pt13, cdna13, psgn13, pt14, cdna14, psgn14, pt15, cdna15, psgn15, pt16, cdna16, psgn16  & 
    26       &                   , kfillmode, pfillval, khls, lsend, lrecv, ld4only ) 
     26      &                   , kfillmode, pfillval, khls, lsend, lrecv, ld4only                                        & 
     27      &                   , loop_fct                                                                                & 
     28      &                   ) 
    2729      !!--------------------------------------------------------------------- 
    2830      CHARACTER(len=*)     ,                   INTENT(in   ) ::   cdname  ! name of the calling subroutine 
     
    4648      CHARACTER(len=1) , DIMENSION(16) ::   cdna_ptr    ! nature of ptab_ptr grid-points 
    4749      REAL(PRECISION)  , DIMENSION(16) ::   psgn_ptr    ! sign used across the north fold boundary 
     50      interface 
     51        subroutine loop_fct(i0, i1, j0, j1, k0, k1, buf) 
     52          integer, intent(in) :: i0, i1, j0, j1, k0, k1 
     53          REAL*8, dimension(:,:,:,:,:,:), optional, intent(out) :: buf 
     54        end subroutine loop_fct 
     55      end interface 
     56      optional :: loop_fct 
    4857      !!--------------------------------------------------------------------- 
    4958      ! 
     
    7079      IF( PRESENT(psgn16) )   CALL load_ptr_/**/XD/**/_/**/PRECISION( pt16, cdna16, psgn16, ptab_ptr, cdna_ptr, psgn_ptr, kfld ) 
    7180      ! 
    72        
     81 
    7382      IF( lints ) THEN   ! in time splitting 
    7483         IF( ln_tspers ) THEN 
    7584            CALL lbc_lnk_persistent( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only ) 
     85         elseif(present(loop_fct) .and. ln_async) 
     86            CALL lbc_lnk_pt2pt_async( cdname, loop_fct, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only ) 
    7687         ELSE 
    7788            SELECT CASE (nn_comm) 
     
    8697            END SELECT 
    8798         END IF 
     99      elseif(present(loop_fct) .and. ln_async) 
     100         CALL lbc_lnk_pt2pt_async( cdname, loop_fct, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only ) 
    88101      ELSE               ! No persistent call outside time-splitting 
    89102         SELECT CASE (nn_comm) 
Note: See TracChangeset for help on using the changeset viewer.