Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:44:01 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
cc36b35673 Jean*0001 #include "SHOWFLOPS_OPTIONS.h"
5c2ca1df79 Patr*0002 
                0003 CBOP
                0004 C     !ROUTINE: SHOWFLOPS_INSOLVE
                0005 C     !INTERFACE:
                0006       SUBROUTINE SHOWFLOPS_INSOLVE( myThid )
                0007 
                0008 C     !DESCRIPTION: \bv
                0009 C     *================================================================*
                0010 C     | SUBROUTINE showflops_insolve
                0011 C     | o Do runtime timing
                0012 C     *================================================================*
                0013 C     \ev
                0014 
                0015 C     !USES:
                0016       IMPLICIT NONE
                0017 C     == Global variables ==
                0018 #include "SIZE.h"
                0019 #include "EEPARAMS.h"
                0020 #include "PARAMS.h"
                0021 #include "SHOWFLOPS.h"
                0022 
                0023 C     !INPUT/OUTPUT PARAMETERS:
                0024 C     == Routine arguments ==
cc36b35673 Jean*0025 C     note: under the multi-threaded model myiter and
                0026 C           mytime are local variables passed around as routine
                0027 C           arguments. Although this is fiddly it saves the need to
                0028 C           impose additional synchronisation points when they are
5c2ca1df79 Patr*0029 C           updated.
                0030 C     myThid - thread number for this instance of the routine.
                0031       integer iloop
cc36b35673 Jean*0032       INTEGER myThid
5c2ca1df79 Patr*0033 
                0034 C     !FUNCTIONS:
                0035 C     == Functions ==
                0036 #ifdef ALLOW_RUNCLOCK
                0037       LOGICAL RUNCLOCK_CONTINUE
                0038       LOGICAL RC_CONT
                0039 #endif
                0040 
                0041 C     !LOCAL VARIABLES:
                0042 C     == Local variables ==
                0043 
                0044 CEOP
                0045 
                0046 #ifdef ALLOW_DEBUG
                0047       IF (debugMode) CALL DEBUG_ENTER('SHOWFLOPS_INSOLVE',myThid)
                0048 #endif
                0049 
                0050 #ifdef TIME_PER_TIMESTEP_SFP
                0051 CCE107 Time per timestep information
                0052       _BEGIN_MASTER( myThid )
                0053       CALL TIMER_GET_TIME( utnew, stnew, wtnew )
                0054 C Only output timing information after the 1st timestep
                0055       IF ( wtold .NE. 0.0D0 ) THEN
                0056         WRITE(msgBuf,'(A34,3F10.6)')
                0057      $        'User, system and wallclock time:', utnew - utold,
                0058      $        stnew - stold, wtnew - wtold
                0059          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0060       ENDIF
                0061       utold = utnew
                0062       stold = stnew
                0063       wtold = wtnew
                0064       _END_MASTER( myThid )
                0065 #endif
                0066 #ifdef USE_PAPI_FLOPS_SFP
                0067 CCE107 PAPI summary performance
                0068       _BEGIN_MASTER( myThid )
                0069 #ifdef USE_FLIPS
                0070       call PAPIF_flips(real_time, proc_time, flpops, mflops, check)
                0071 #else
                0072       call PAPIF_flops(real_time, proc_time, flpops, mflops, check)
                0073 #endif
a17e0c893f Cons*0074       WRITE(msgBuf,'(A34,F12.6,A,F12.6)')
5c2ca1df79 Patr*0075      $     'Mflop/s during this timestep:', mflops, ' ', mflops
                0076      $     *proc_time/(real_time + 1E-36)
                0077       CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0078 #ifdef PAPI_VERSION
                0079       call PAPIF_ipc(real_time, proc_time, instr, ipc, check)
a17e0c893f Cons*0080       WRITE(msgBuf,'(A34,F12.6,A,F12.6)')
5c2ca1df79 Patr*0081      $     'IPC during this timestep:', ipc, ' ', ipc*proc_time
                0082      $     /(real_time + 1E-36)
                0083       CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0084 #endif
                0085       _END_MASTER( myThid )
                0086 #else
                0087 #ifdef USE_PCL_FLOPS_SFP
                0088 CCE107 PCL summary performance
                0089       _BEGIN_MASTER( myThid )
                0090       PCLstop(descr, i_result, fp_result, nevents)
                0091       do ipcl = 1, nevents
a17e0c893f Cons*0092          WRITE(msgBuf,'(A22,A26,F12.6)'),
5c2ca1df79 Patr*0093      $        pcl_counter_name(pcl_counter_list(ipcl)),
                0094      $        'during this timestep:', fp_results(ipcl)
                0095          CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
                0096       enddo
                0097       PCLstart(descr, pcl_counter_list, nevents, flags)
                0098       _END_MASTER( myThid )
                0099 #endif
                0100 #endif
                0101 
                0102 #ifdef ALLOW_DEBUG
                0103       IF (debugMode) CALL DEBUG_LEAVE('SHOWFLOPS_INSOLVE',myThid)
                0104 #endif
                0105 
                0106       END
                0107