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

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

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


Revision 1.3 - (show annotations) (download)
Sat Jul 7 00:08:09 2012 UTC (12 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.2: +9 -10 lines
uses standard #indude ${PKG}_OPTIONS.h

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

  ViewVC Help
Powered by ViewVC 1.1.22