Ignore:
Timestamp:
2019-01-16T11:14:10+01:00 (19 months ago)
Author:
smasson
Message:

trunk: introduce key_mpi2 for some old fashioned guys…, see #2203

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/LBC/lib_mpp.F90

    r10521 r10526  
    639639 
    640640      ! send y_in into todelay(idvar)%y1d with a non-blocking communication 
     641#if defined key_mpi2 
     642      IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.) 
     643      CALL  mpi_allreduce( y_in(:), todelay(idvar)%y1d(:), isz, MPI_DOUBLE_COMPLEX, mpi_sumdd, ilocalcomm, ndelayid(idvar), ierr ) 
     644      IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
     645#else 
    641646      CALL mpi_iallreduce( y_in(:), todelay(idvar)%y1d(:), isz, MPI_DOUBLE_COMPLEX, mpi_sumdd, ilocalcomm, ndelayid(idvar), ierr ) 
     647#endif 
    642648 
    643649   END SUBROUTINE mpp_delay_sum 
     
    696702 
    697703      ! send p_in into todelay(idvar)%z1d with a non-blocking communication 
     704#if defined key_mpi2 
     705      IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.) 
     706      CALL  mpi_allreduce( p_in(:), todelay(idvar)%z1d(:), isz, MPI_DOUBLE_PRECISION, mpi_max, ilocalcomm, ndelayid(idvar), ierr ) 
     707      IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
     708#else 
    698709      CALL mpi_iallreduce( p_in(:), todelay(idvar)%z1d(:), isz, MPI_DOUBLE_PRECISION, mpi_max, ilocalcomm, ndelayid(idvar), ierr ) 
     710#endif 
    699711 
    700712   END SUBROUTINE mpp_delay_max 
     
    712724      !!---------------------------------------------------------------------- 
    713725      IF( ndelayid(kid) /= -2 ) THEN   
     726#if ! defined key_mpi2 
    714727         IF( ln_timing ) CALL tic_tac( .TRUE., ld_global = .TRUE.) 
    715728         CALL mpi_wait( ndelayid(kid), MPI_STATUS_IGNORE, ierr )                        ! make sure todelay(kid) is received 
    716729         IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
     730#endif 
    717731         IF( ASSOCIATED(todelay(kid)%y1d) )   todelay(kid)%z1d(:) = REAL(todelay(kid)%y1d(:), wp)  ! define %z1d from %y1d 
    718732         ndelayid(kid) = -2   ! add flag to know that mpi_wait was already called on kid 
Note: See TracChangeset for help on using the changeset viewer.