/[MITgcm]/MITgcm/pkg/showflops/showflops_insolve.F
ViewVC logotype

Contents of /MITgcm/pkg/showflops/showflops_insolve.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Jun 1 16:41:12 2007 UTC (17 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint59e, checkpoint59d, checkpoint59c
Start cleanup of the_main_loop
o package all timing stuff (nit tested)

1 C $Header: /u/gcmpack/MITgcm_contrib/heimbach/OpenAD/code_heat_transport/showflops_inloop.F,v 1.1 2007/05/12 22:13:25 heimbach Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: SHOWFLOPS_INSOLVE
9 C !INTERFACE:
10 SUBROUTINE SHOWFLOPS_INSOLVE( myThid )
11
12 C !DESCRIPTION: \bv
13 C *================================================================*
14 C | SUBROUTINE showflops_insolve
15 C | o Do runtime timing
16 C *================================================================*
17 C \ev
18
19 C !USES:
20 IMPLICIT NONE
21 C == Global variables ==
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 #include "SHOWFLOPS.h"
26
27 C !INPUT/OUTPUT PARAMETERS:
28 C == Routine arguments ==
29 C note: under the multi-threaded model myiter and
30 C mytime are local variables passed around as routine
31 C arguments. Although this is fiddly it saves the need to
32 C impose additional synchronisation points when they are
33 C updated.
34 C myThid - thread number for this instance of the routine.
35 integer iloop
36 INTEGER myThid
37
38 C !FUNCTIONS:
39 C == Functions ==
40 #ifdef ALLOW_RUNCLOCK
41 LOGICAL RUNCLOCK_CONTINUE
42 LOGICAL RC_CONT
43 #endif
44
45 C !LOCAL VARIABLES:
46 C == Local variables ==
47
48 CEOP
49
50 #ifdef ALLOW_DEBUG
51 IF (debugMode) CALL DEBUG_ENTER('SHOWFLOPS_INSOLVE',myThid)
52 #endif
53
54 #ifdef TIME_PER_TIMESTEP_SFP
55 CCE107 Time per timestep information
56 _BEGIN_MASTER( myThid )
57 CALL TIMER_GET_TIME( utnew, stnew, wtnew )
58 C Only output timing information after the 1st timestep
59 IF ( wtold .NE. 0.0D0 ) THEN
60 WRITE(msgBuf,'(A34,3F10.6)')
61 $ 'User, system and wallclock time:', utnew - utold,
62 $ stnew - stold, wtnew - wtold
63 CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
64 ENDIF
65 utold = utnew
66 stold = stnew
67 wtold = wtnew
68 _END_MASTER( myThid )
69 #endif
70 #ifdef USE_PAPI_FLOPS_SFP
71 CCE107 PAPI summary performance
72 _BEGIN_MASTER( myThid )
73 #ifdef USE_FLIPS
74 call PAPIF_flips(real_time, proc_time, flpops, mflops, check)
75 #else
76 call PAPIF_flops(real_time, proc_time, flpops, mflops, check)
77 #endif
78 WRITE(msgBuf,'(A34,F10.6,A,F10.6)')
79 $ 'Mflop/s during this timestep:', mflops, ' ', mflops
80 $ *proc_time/(real_time + 1E-36)
81 CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
82 #ifdef PAPI_VERSION
83 call PAPIF_ipc(real_time, proc_time, instr, ipc, check)
84 WRITE(msgBuf,'(A34,F10.6,A,F10.6)')
85 $ 'IPC during this timestep:', ipc, ' ', ipc*proc_time
86 $ /(real_time + 1E-36)
87 CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
88 #endif
89 _END_MASTER( myThid )
90 #else
91 #ifdef USE_PCL_FLOPS_SFP
92 CCE107 PCL summary performance
93 _BEGIN_MASTER( myThid )
94 PCLstop(descr, i_result, fp_result, nevents)
95 do ipcl = 1, nevents
96 WRITE(msgBuf,'(A22,A26,F10.6)'),
97 $ pcl_counter_name(pcl_counter_list(ipcl)),
98 $ 'during this timestep:', fp_results(ipcl)
99 CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
100 enddo
101 PCLstart(descr, pcl_counter_list, nevents, flags)
102 _END_MASTER( myThid )
103 #endif
104 #endif
105
106 #ifdef ALLOW_DEBUG
107 IF (debugMode) CALL DEBUG_LEAVE('SHOWFLOPS_INSOLVE',myThid)
108 #endif
109
110 END
111

  ViewVC Help
Powered by ViewVC 1.1.22