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 13555 for NEMO/trunk – NEMO

Changeset 13555 for NEMO/trunk


Ignore:
Timestamp:
2020-10-02T10:29:13+02:00 (4 years ago)
Author:
gsamson
Message:

add missing timestep duration print in SAS timing.output and add missing timing capacity to OFF/nemogcm.F90; ticket #2528

Location:
NEMO/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OFF/nemogcm.F90

    r13286 r13555  
    7373 
    7474   CHARACTER (len=64) ::   cform_aaa="( /, 'AAAAAAAA', / ) "   ! flag for output listing 
     75#if defined key_mpp_mpi 
     76   ! need MPI_Wtime 
     77   INCLUDE 'mpif.h' 
     78#endif 
    7579 
    7680   !!---------------------------------------------------------------------- 
     
    96100      !!---------------------------------------------------------------------- 
    97101      INTEGER :: istp       ! time step index 
     102      REAL(wp)::   zstptiming   ! elapsed time for 1 time step 
    98103      !!---------------------------------------------------------------------- 
    99104 
     
    114119      !  
    115120      DO WHILE ( istp <= nitend .AND. nstop == 0 )    !==  OFF time-stepping  ==! 
     121 
     122         IF( ln_timing ) THEN 
     123            zstptiming = MPI_Wtime() 
     124            IF ( istp == ( nit000 + 1 ) ) elapsed_time = zstptiming 
     125            IF ( istp ==         nitend ) elapsed_time = zstptiming - elapsed_time 
     126         ENDIF 
    116127         ! 
    117128         IF( istp /= nit000 )   CALL day        ( istp )         ! Calendar (day was already called at nit000 in day_init) 
     
    147158#endif 
    148159#endif          
    149                                 CALL stp_ctl    ( istp )             ! Time loop: control and print 
     160         CALL stp_ctl    ( istp )             ! Time loop: control and print 
    150161         istp = istp + 1 
     162 
     163         IF( lwp .AND. ln_timing )   WRITE(numtime,*) 'timing step ', istp-1, ' : ', MPI_Wtime() - zstptiming 
     164 
    151165      END DO 
    152166      ! 
  • NEMO/trunk/src/SAS/nemogcm.F90

    r13546 r13555  
    22   !!====================================================================== 
    33   !!                       ***  MODULE nemogcm   *** 
    4    !! StandAlone Surface module : surface fluxes + sea-ice + iceberg floats 
     4   !! StandAlone Surface module : surface fluxes + sea-ice + iceberg floats + ABL 
    55   !!====================================================================== 
    66   !! History :  3.6  ! 2011-11  (S. Alderson, G. Madec) original code 
     
    5858 
    5959#if defined key_mpp_mpi 
     60   ! need MPI_Wtime 
    6061   INCLUDE 'mpif.h' 
    6162#endif 
     
    8384      !!---------------------------------------------------------------------- 
    8485      INTEGER ::   istp   ! time step index 
     86      REAL(wp)::   zstptiming   ! elapsed time for 1 time step 
    8587      !!---------------------------------------------------------------------- 
    8688      ! 
     
    9395#if defined key_agrif 
    9496      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
    95       CALL Agrif_Declare_Var       !  "      "   "   "      "  DYN/TRA  
     97      CALL Agrif_Declare_Var       !  "      "   "   "      "  DYN/TRA 
    9698# if defined key_top 
    9799      CALL Agrif_Declare_Var_top   !  "      "   "   "      "  TOP 
     
    107109      !                            !==   time stepping   ==! 
    108110      !                            !-----------------------! 
     111      ! 
     112      !                                               !== set the model time-step  ==! 
     113      ! 
    109114      istp = nit000 
    110115      ! 
     
    124129      END DO 
    125130      ! 
    126 #else 
     131# else 
    127132      ! 
    128133      IF( .NOT.ln_diurnal_only ) THEN                 !==  Standard time-stepping  ==! 
    129134         ! 
    130135         DO WHILE( istp <= nitend .AND. nstop == 0 ) 
    131 #if defined key_mpp_mpi 
     136 
    132137            ncom_stp = istp 
    133             IF ( istp == ( nit000 + 1 ) ) elapsed_time = MPI_Wtime() 
    134             IF ( istp ==         nitend ) elapsed_time = MPI_Wtime() - elapsed_time 
    135 #endif 
     138            IF( ln_timing ) THEN 
     139               zstptiming = MPI_Wtime() 
     140               IF ( istp == ( nit000 + 1 ) ) elapsed_time = zstptiming 
     141               IF ( istp ==         nitend ) elapsed_time = zstptiming - elapsed_time 
     142            ENDIF 
     143             
    136144            CALL stp        ( istp )  
    137145            istp = istp + 1 
     146 
     147            IF( lwp .AND. ln_timing )   WRITE(numtime,*) 'timing step ', istp-1, ' : ', MPI_Wtime() - zstptiming 
     148 
    138149         END DO 
    139150         ! 
     
    305316         WRITE(numout,*) "       )  )       \) |`\ \)  '.   \      (   (   " 
    306317         WRITE(numout,*) "      (  (           \_/       '-._\      )   )  " 
    307          WRITE(numout,*) "       )  ) jgs                    `     (   (   " 
     318         WRITE(numout,*) "       )  ) jgs                     `    (   (   " 
    308319         WRITE(numout,*) "     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " 
    309320         WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.