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

Changeset 6609


Ignore:
Timestamp:
2016-05-24T16:36:26+02:00 (8 years ago)
Author:
dkuts
Message:

Adding timing output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_v3_6_STABLE_OMP/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r6204 r6609  
    119119      !!---------------------------------------------------------------------- 
    120120      ! 
     121#if defined key_timesteps 
     122      DOUBLE PRECISION :: tstart,tend,mpi_wtime, sstart, send 
     123#endif 
    121124#if defined key_agrif 
    122125      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes 
     
    148151#if defined key_c1d 
    149152         DO WHILE ( istp <= nitend .AND. nstop == 0 ) 
    150             CALL stp_c1d( istp ) 
    151             istp = istp + 1 
     153#if defined key_timesteps 
     154           sstart = mpi_wtime() 
     155#endif 
     156         CALL stp_c1d( istp ) 
     157#if defined key_timesteps 
     158           send = mpi_wtime() 
     159         print *, "Step ", istp, " - " , send-sstart , "s." 
     160#endif 
     161         istp = istp + 1 
    152162         END DO 
    153163#else 
     
    166176 
    167177         DO WHILE ( istp <= nitend .AND. nstop == 0 ) 
     178#if defined key_timesteps 
     179           sstart = mpi_wtime() 
     180#endif 
    168181#if defined key_agrif 
    169182            CALL stp                         ! AGRIF: time stepping 
     
    171184            CALL stp( istp )                 ! standard time stepping 
    172185#endif 
    173             istp = istp + 1 
     186#if defined key_timesteps 
     187           send = mpi_wtime() 
     188           print *, "Step ", istp, " - " , send-sstart , "s." 
     189#endif 
     190         istp = istp + 1 
    174191            IF( lk_mpp )   CALL mpp_max( nstop ) 
    175192         END DO 
     
    179196      ! 
    180197      IF( ln_icebergs )   CALL icb_end( nitend ) 
    181  
     198#if defined key_timesteps 
     199      tend = mpi_wtime() 
     200     print *,"Steps total time=",tend-tstart, "s." 
     201     print *,"Average time per step=", ( tend - tstart ) / ( nitend - nit000 + 1 ), "s." 
     202#endif 
    182203      !                            !------------------------! 
    183204      !                            !==  finalize the run  ==! 
Note: See TracChangeset for help on using the changeset viewer.