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

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

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


Revision 1.2 - (hide annotations) (download)
Tue Jul 31 22:33:43 2007 UTC (16 years, 9 months ago) by ce107
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59g, checkpoint59f, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.1: +4 -4 lines
Removed extraneous defines that broke the package and increased the width
of print modifiers to cover performance exceeding 1Gflop/s.

1 ce107 1.2 C $Header: /u/gcmpack/MITgcm/pkg/showflops/showflops_inloop.F,v 1.1 2007/06/01 16:41:12 heimbach Exp $
2 heimbach 1.1 C $Name: $
3    
4     #include "PACKAGES_CONFIG.h"
5     #include "CPP_OPTIONS.h"
6    
7     CBOP
8     C !ROUTINE: SHOWFLOPS_INLOOP
9     C !INTERFACE:
10     SUBROUTINE SHOWFLOPS_INLOOP( iloop, myThid )
11    
12     C !DESCRIPTION: \bv
13     C *================================================================*
14     C | SUBROUTINE showflops_inloop
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_INLOOP',myThid)
52     #endif
53    
54     #ifdef ALLOW_RUNCLOCK
55     IF (useRunClock) THEN
56     RC_CONT=RUNCLOCK_CONTINUE( myThid )
57     IF (.NOT.RC_CONT) RETURN
58     ENDIF
59     #endif /* ALLOW_RUNCLOCK */
60     #ifdef TIME_PER_TIMESTEP
61     CCE107 Time per timestep information
62     _BEGIN_MASTER( myThid )
63     CALL TIMER_GET_TIME( utnew, stnew, wtnew )
64     WRITE(msgBuf,'(A34,3F10.6,I8)')
65     $ 'User, system and wallclock time:', utnew - utold,
66     $ stnew - stold, wtnew - wtold, iloop
67     CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
68     utold = utnew
69     stold = stnew
70     wtold = wtnew
71     _END_MASTER( myThid )
72     #endif
73     #ifdef USE_PAPI_FLOPS
74     CCE107 PAPI summary performance
75     _BEGIN_MASTER( myThid )
76     #ifdef USE_FLIPS
77     call PAPIF_flips(real_time, proc_time, flpops, mflops, check)
78     #else
79     call PAPIF_flops(real_time, proc_time, flpops, mflops, check)
80     #endif
81 ce107 1.2 WRITE(msgBuf,'(F12.6,A,F12.6,A34,I8)')
82 heimbach 1.1 $ mflops, ' ', mflops*proc_time/(real_time + 1E-36),
83     $ 'Mflop/s during timestep ', iloop
84     CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
85     #ifdef PAPI_VERSION
86     call PAPIF_ipc(real_time, proc_time, instr, ipc, check)
87 ce107 1.2 WRITE(msgBuf,'(F12.6,A,F12.6,A34,I8)')
88 heimbach 1.1 $ ipc, ' ', ipc*proc_time/(real_time + 1E-36),
89     $ 'IPC during timestep ', iloop
90     CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
91     #endif
92     _END_MASTER( myThid )
93     #else
94     #ifdef USE_PCL_FLOPS
95     CCE107 PCL summary performance
96     _BEGIN_MASTER( myThid )
97     res = PCLstop(descr, i_result, fp_result, nevents)
98     do ipcl = 1, nevents
99 ce107 1.2 WRITE(msgBuf,'(F12.6,A2,A22,A17,I8)'), fp_result(ipcl),
100 heimbach 1.1 $ ' ', pcl_counter_name(pcl_counter_list(ipcl)),
101     $ 'during timestep ', iloop
102     CALL PRINT_MESSAGE(msgBuf,standardMessageUnit,SQUEEZE_RIGHT,1)
103     enddo
104     res = PCLstart(descr, pcl_counter_list, nevents, flags)
105     _END_MASTER( myThid )
106     #endif
107     #endif
108    
109     #ifdef ALLOW_DEBUG
110     IF (debugMode) CALL DEBUG_LEAVE('SHOWFLOPS_INLOOP',myThid)
111     #endif
112    
113     END
114    

  ViewVC Help
Powered by ViewVC 1.1.22