/[MITgcm]/MITgcm/eesupp/src/bar2.F
ViewVC logotype

Contents of /MITgcm/eesupp/src/bar2.F

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


Revision 1.3 - (show annotations) (download)
Sun Feb 4 14:38:42 2001 UTC (23 years, 4 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint36, checkpoint35, checkpoint40pre5, checkpoint40
Branch point for: pre38
Changes since 1.2: +2 -0 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

1 C $Header: $
2 C $Name: $
3 #include "CPP_EEOPTIONS.h"
4
5 SUBROUTINE BAR2_INIT( myThid )
6 IMPLICIT NONE
7 C
8 #include "SIZE.h"
9 #include "EEPARAMS.h"
10 #include "EESUPPORT.h"
11 #include "BAR2.h"
12 C
13 INTEGER myThid
14 INTEGER I
15 C
16 DO I = 1, lShare4
17 BAR2_level(I,myThid) = 0
18 BAR2_barrierCount(I,myThid) = 0
19 BAR2_spinsCount(I,myThid) = 0
20 BAR2_spinsCount(I,myThid) = 0
21 BAR2_spinsMax (I,myThid) = 0
22 BAR2_spinsMin (I,myThid) = 1000000000
23 ENDDO
24 C
25 bar2CollectStatistics = .TRUE.
26 C
27 RETURN
28 END
29 SUBROUTINE BAR2( myThid )
30 IMPLICIT NONE
31 C
32 #include "SIZE.h"
33 #include "EEPARAMS.h"
34 #include "EESUPPORT.h"
35 #include "BAR2.h"
36 C
37 INTEGER myThid
38 C
39 INTEGER myLevel
40 INTEGER nDone
41 INTEGER I
42 INTEGER spinCount
43 C
44 spinCount = 0
45 C
46 IF ( myThid .NE. 1 ) THEN
47
48 BAR2_level(1,myThid) = BAR2_level(1,myThid)+1
49 myLevel = BAR2_level(1,myThid)
50 10 CONTINUE
51 IF ( BAR2_level(1,1) .EQ. myLevel ) GOTO 11
52 spinCount = spinCount+1
53 CALL FOOL_THE_COMPILER( BAR2_level )
54 GOTO 10
55 11 CONTINUE
56
57 ELSE
58
59 myLevel = BAR2_level(1,1)
60 12 CONTINUE
61 CALL FOOL_THE_COMPILER( BAR2_level )
62 nDone = 1
63 DO I = 2, nThreads
64 IF ( BAR2_level(1,1) .EQ. BAR2_level(1,I)-1 ) nDone = nDone+1
65 ENDDO
66 spinCount = spinCount+1
67 IF ( nDone .LT. nThreads ) GOTO 12
68
69 BAR2_level(1,1) = myLevel+1
70
71 ENDIF
72 C
73 BAR2_barrierCount(1,myThid) = BAR2_barrierCount(1,myThid)+1
74 BAR2_spinsCount(1,myThid) = BAR2_spinsCount(1,myThid)+spinCount
75 BAR2_spinsMax (1,myThid) = MAX(BAR2_spinsMax(1,myThid),spinCount)
76 BAR2_spinsMin (1,myThid) = MIN(BAR2_spinsMin(1,myThid),spinCount)
77 C
78 RETURN
79 END
80

  ViewVC Help
Powered by ViewVC 1.1.22