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 10314 for NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mpp_allreduce_generic.h90 – NEMO

Ignore:
Timestamp:
2018-11-15T17:27:18+01:00 (5 years ago)
Author:
smasson
Message:

dev_r10164_HPC09_ESIWACE_PREP_MERGE: action 2: add generic glob_min/max/sum and locmin/max, complete timing and report (including bdy and icb), see #2133

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mpp_allreduce_generic.h90

    r10300 r10314  
    4242      INTEGER, OPTIONAL, INTENT(in   ) ::   kdim        ! optional pointer dimension 
    4343      INTEGER, OPTIONAL, INTENT(in   ) ::   kcom        ! optional communicator 
     44#if defined key_mpp_mpi 
    4445      ! 
    4546      INTEGER :: ipi, ii, ierr 
    4647      INTEGER :: ierror, ilocalcomm 
    4748      TMP_TYPE(:) 
     49      !!----------------------------------------------------------------------- 
     50      ! 
     51      IF( narea == 1 .AND. numcom == -1 ) CALL mpp_report( cdname, ld_glb = .TRUE. ) 
    4852      ! 
    4953      ilocalcomm = mpi_comm_oce 
     
    5559         ipi = I_SIZE(ptab)   ! 1st dimension 
    5660      ENDIF 
    57  
     61      ! 
     62      ALLOCATE(work(ipi)) 
    5863      IF( ln_timing ) CALL tic_tac(.TRUE., ld_global = .TRUE.) 
    59       ALLOCATE(work(ipi)) 
    6064      CALL mpi_allreduce( ARRAY_IN(:), work, ipi, MPI_TYPE, MPI_OPERATION, ilocalcomm, ierror ) 
     65      IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
    6166      DO ii = 1, ipi 
    6267         ARRAY_IN(ii) = work(ii) 
    6368      ENDDO 
    6469      DEALLOCATE(work) 
    65       IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 
    66       ! 
    67       IF( narea == 1 .AND. ncom_stp == nit000+5 ) THEN 
    68             IF( .NOT. ALLOCATED( crname_glb) ) THEN 
    69                ALLOCATE( crname_glb(2000), STAT=ierr ) 
    70                IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'allreduce_generic, cannot allocate crname' ) 
    71             ENDIF 
    72             n_sequence_glb = n_sequence_glb + 1 
    73             IF( n_sequence_glb > 2000 ) CALL ctl_stop( 'STOP', 'allreduce_generic, increase crname_glb first dimension' ) 
    74             crname_glb(n_sequence_glb)   = cdname    ! keep the name of the calling routine 
    75       ENDIF 
     70#else 
     71      WRITE(*,*) 'ROUTINE_ALLREDUCE: You should not have seen this print! error?' 
     72#endif 
    7673 
    7774   END SUBROUTINE ROUTINE_ALLREDUCE 
Note: See TracChangeset for help on using the changeset viewer.