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

Changeset 15072


Ignore:
Timestamp:
2021-07-02T15:54:03+02:00 (3 years ago)
Author:
girrmann
Message:

add structure for new RMA communications, small asynchronous communications debugging

Location:
NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/cfgs/SHARED/namelist_ref

    r14902 r15072  
    15011501   ln_tspers   = .false.   !  change to persistent communications in time splitting 
    15021502   ln_async    = .false.   !  change to asynchronous communications whenever possible 
     1503   ln_RMA      = .false.   !  change to RMA communications in time splitting 
    15031504/ 
    15041505!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/DYN/dynspg_ts.F90

    r15054 r15072  
    524524         !-------------------------------------------------------------------------! 
    525525         ! 
    526          IF( ln_async )  THEN 
     526         IF(     ln_async .OR. ln_RMA )  THEN 
    527527            CALL lbc_lnk( 'dynspg_ts', ssha_e, 'T', 1._wp,  zhU, 'U', -1._wp,  zhV, 'V', -1._wp, loop_fct=loop_ssha_e ) 
    528528         ELSE 
     
    625625         !------------------------------------------------------------------------------------------------------------------------! 
    626626 
    627          IF( ln_async )  THEN 
     627         IF( ln_async .OR. ln_RMA )  THEN 
    628628            IF( .NOT.ln_linssh ) THEN   !* Update ocean depth (variable volume case only) 
    629629               CALL lbc_lnk( 'dynspg_ts', ua_e , 'U', -1._wp, va_e , 'V', -1._wp  & 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/LBC/lbc_lnk_call_generic.h90

    r14899 r15072  
    8080      IF( PRESENT(psgn16) )   CALL load_ptr_/**/XD/**/_/**/PRECISION( pt16, cdna16, psgn16, ptab_ptr, cdna_ptr, psgn_ptr, kfld ) 
    8181      ! 
    82  
     82       
    8383      IF( lints ) THEN   ! in time splitting 
    8484         IF( ln_tspers ) THEN 
     
    8686         ELSE IF( PRESENT(loop_fct) .AND. ln_async ) THEN 
    8787            CALL lbc_lnk_async( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only, loop_fct ) 
     88         ELSE IF( PRESENT(loop_fct) .AND. ln_RMA ) THEN 
     89            CALL lbc_lnk_RMA(   cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, khls, lsend, lrecv, ld4only, loop_fct ) 
    8890         ELSE 
    8991            SELECT CASE (nn_comm) 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/LBC/lbc_lnk_newpt2pt_generic.h90

    r14899 r15072  
    174174      ! ----------------------------- ! 
    175175      ! 
    176       !IF( ln_timing ) CALL tic_tac(.TRUE.) 
    177       DO jn = 1, 8 
    178 #define NBLOCK_ISEND 
    179 #  include "lbc_lnk_newpt2pt_generic.h90"          
    180 #undef NBLOCK_ISEND 
    181       END DO 
    182       !IF( ln_timing ) CALL tic_tac(.FALSE.) 
     176      DO jn = 1, 8 
     177         IF( llsend(jn) ) THEN 
     178            ishti = ishtSi(jn) 
     179            ishtj = ishtSj(jn) 
     180            DO jf = 1, ipf  ;  DO jl = 1, ipl  ;  DO jk = 1, ipk  ;  DO jj = 1,isizej(jn)  ;  DO ji = 1,isizei(jn) 
     181               BUFFSND(idxs) = ptab(jf)%pt4d(ishti+ji,ishtj+jj,jk,jl) 
     182               idxs = idxs + 1 
     183            END DO;   END DO   ;   END DO   ;   END DO   ;   END DO 
     184         ENDIF 
     185      END DO 
     186      IF( ln_timing ) CALL tic_tac(.TRUE.) 
     187      IF( llsend(jpso) ) THEN   ! jpso = 3, send south first for north fold 
     188         CALL MPI_ISEND( BUFFSND(ishtS(jpso)+1), iszall(jpso), MPI_TYPE, mpiSnei(ihls,jpso), iStag(jpso), icomm, nreq_p2p(jpso), ierr ) 
     189      ENDIF 
     190      DO jn = 1, 2 
     191         IF( llsend(jn) ) THEN 
     192            CALL MPI_ISEND( BUFFSND(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), iStag(jn), icomm, nreq_p2p(jn), ierr ) 
     193         ENDIF 
     194      END DO 
     195      DO jn = 4, 8 
     196         IF( llsend(jn) ) THEN 
     197            CALL MPI_ISEND( BUFFSND(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), iStag(jn), icomm, nreq_p2p(jn), ierr ) 
     198         ENDIF 
     199      END DO 
     200      IF( ln_timing ) CALL tic_tac(.FALSE.) 
    183201      ! 
    184202 
     
    187205      ! ------------------------------ ! 
    188206      ! 
    189       !IF( ln_timing ) CALL tic_tac(.TRUE.) 
     207      IF( ln_timing ) CALL tic_tac(.TRUE.) 
    190208      DO jn = 1, 8 
    191209         IF ( ifill(jn) == jpfillmpi   ) THEN                ! fill with data received earlier by MPI 
     
    193211         END IF 
    194212      END DO 
    195       !IF( ln_timing ) CALL tic_tac(.FALSE.) 
     213      IF( ln_timing ) CALL tic_tac(.FALSE.) 
    196214 
    197215      ! ----------------------- ! 
     
    260278 
    261279 
    262 #if defined NBLOCK_ISEND 
    263    IF( llsend(jn) ) THEN 
    264       ishti = ishtSi(jn) 
    265       ishtj = ishtSj(jn) 
    266       DO jf = 1, ipf  ;  DO jl = 1, ipl  ;  DO jk = 1, ipk  ;  DO jj = 1,isizej(jn)  ;  DO ji = 1,isizei(jn) 
    267          BUFFSND(idxs) = ptab(jf)%pt4d(ishti+ji,ishtj+jj,jk,jl) 
    268          idxs = idxs + 1 
    269       END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO 
    270       IF( ln_timing ) CALL tic_tac(.TRUE.) 
    271       CALL MPI_ISEND( BUFFSND(ishtS(jn)+1), iszall(jn), MPI_TYPE, mpiSnei(ihls,jn), iStag(jn), icomm, nreq_p2p(jn), ierr ) 
    272       IF( ln_timing ) CALL tic_tac(.FALSE.) 
    273    ENDIF 
    274 #endif 
    275280    
    276281#if defined NMPI_FILL 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/LBC/lbc_lnk_pt2pt_async.h90

    r14910 r15072  
    101101         ENDIF 
    102102      END DO 
    103       DO jn = 5, 8 
    104          IF(             llrecv(jn) ) THEN   ;   ifill(jn) = jpfillmpi    ! with an mpi communication 
    105          ELSE                                ;   ifill(jn) = jpfillnothing! do nothing 
    106          ENDIF 
    107       END DO 
    108103      ! north fold treatment 
    109104      ll_IdoNFold = l_IdoNFold .AND. ifill(jpno) /= jpfillnothing 
     
    270265 
    271266#if defined BLOCK_IRECV 
    272    ishti = ishtRi(jn) 
    273    ishtj = ishtRj(jn) 
    274    SELECT CASE ( ifill(jn) ) 
    275    CASE ( jpfillnothing )               ! no filling 
    276    CASE ( jpfillmpi   )                 ! fill with data received by MPI 
     267   IF( ifill(jn) == jpfillmpi   ) THEN                ! fill with data received by MPI 
    277268#if ! defined key_mpi_off 
    278269      IF( ln_timing ) CALL tic_tac(.TRUE.) 
     
    280271      IF( ln_timing ) CALL tic_tac(.FALSE.) 
    281272#endif 
    282 END SELECT 
     273   END IF 
    283274#endif 
    284275 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/LBC/lbclnk.F90

    r15054 r15072  
    5858      MODULE PROCEDURE   lbc_lnk_async_sp, lbc_lnk_async_dp 
    5959   END INTERFACE lbc_lnk_async 
     60 
     61   INTERFACE lbc_lnk_RMA 
     62      MODULE PROCEDURE   lbc_lnk_RMA_sp, lbc_lnk_RMA_dp 
     63   END INTERFACE lbc_lnk_RMA 
    6064   ! 
    6165   INTERFACE lbc_lnk_icb 
     
    160164#  define BUFFRCV buffrcv_async_sp 
    161165#  include "lbc_lnk_pt2pt_async.h90" 
     166#  include "lbc_lnk_pt2pt_RMA.h90" 
    162167#  undef BUFFSND 
    163168#  undef BUFFRCV 
     
    181186#  define BUFFRCV buffrcv_async_dp 
    182187#  include "lbc_lnk_pt2pt_async.h90" 
     188#  include "lbc_lnk_pt2pt_RMA.h90" 
    183189#  undef BUFFSND 
    184190#  undef BUFFRCV 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/LBC/lib_mpp.F90

    r15054 r15072  
    223223   LOGICAL                            , PUBLIC :: ln_tspers         ! indicate if persistent call enabled in time-splitting 
    224224   LOGICAL                            , PUBLIC :: ln_async          ! indicate if asynchronous communications enabled 
     225   LOGICAL                            , PUBLIC :: ln_RMA            ! indicate if RMA communications enabled 
    225226    
    226227   !! * Substitutions 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/src/OCE/LBC/mppini.F90

    r14899 r15072  
    145145           &             cn_ice, nn_ice_dta,                                     & 
    146146           &             ln_vol, nn_volctl, nn_rimwidth 
    147       NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly, nn_comm, ln_tspers, ln_async 
     147      NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly, nn_comm, ln_tspers, ln_async, ln_RMA 
    148148      !!---------------------------------------------------------------------- 
    149149      ! 
     
    171171            WRITE(numout,*) '      communication type                                 nn_comm = ', nn_comm 
    172172            WRITE(numout,*) '      switch to persistent calls in time-splitting    ln_tspers = ', ln_tspers 
     173            WRITE(numout,*) '      switch to asynchronous com in time-splitting    ln_async = ' , ln_async 
     174            WRITE(numout,*) '      switch to RMA communications in time-splitting    ln_RMA = ' , ln_RMA 
    173175      ENDIF 
    174176      ! 
  • NEMO/branches/2021/dev_r14447_HPC-07_Irrmann_try_new_pt2pt/tests/BENCH/MY_SRC/usrdef_nam.F90

    r14433 r15072  
    6161      !! 
    6262      NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, ln_Iperio, ln_Jperio, ln_NFold, cn_NFtype 
    63       NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly, nn_comm 
     63      NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly, nn_comm, ln_tspers, ln_async, ln_RMA 
    6464      !!----------------------------------------------------------------------      
    6565      ! 
Note: See TracChangeset for help on using the changeset viewer.