Statistics
| Branch: | Revision:

root / synthbench / euroben-dm / mod1h / .svn / text-base / mod1h.f.svn-base @ 0:839f52ef7657

History | View | Annotate | Download (5.6 kB)

1
      Program mod1h
2
**********************************************************************
3
*** This program is part of the EuroBen distributed                ***
4
*** memory Benchmark.                                              ***
5
***                                                                ***
6
*** Copyright: European Benchmark Group p/o                        ***
7
***            Utrecht University, Computational Physics Dept.     ***
8
***            P.O. Box 80195                                      ***
9
***            3508 TD Utrecht                                     ***
10
***            The Netherlands                                     ***
11
***                                                                ***
12
*** Authors of this program: Charles Grassl (SGI),                 ***
13
*** Michiel van den Hout, Aad van der Steen, Utrecht University,   ***
14
*** Computational Physics Dept.                                    ***
15
*** Date                    Spring 1999                            ***
16
**********************************************************************
17
! ---------------------------------------------------------------------
18
      Use             numerics
19
      Use             max_params
20
      Implicit        None
21
      Include         'mpif.h'
22

    
23
      Character*50 :: title
24
      Real(l_)     :: tn(maxcases), ops
25
      Real(l_)     :: start_time, end_time
26
      Integer      :: log2n, nrpt, ncases
27
      Integer      :: me, npes, n
28
      Integer      :: comm, ie
29
      Logical      :: first, last
30
      External        ping2, ping2_i, broadcast, collect, reduction,
31
     &                trans_2d, bisec2_reg, bisec2_rand, nearn_1d, 
32
     &                nearn_2d, nearn_3d
33
! ---------------------------------------------------------------------
34
      comm = MPI_Comm_World
35
      
36
      Call MPI_Init( ie )
37
      Call MPI_Comm_rank( comm, me, ie )
38
      Call MPI_Comm_size( comm, npes, ie )
39
      start_time = MPI_Wtime()
40
      If ( me == 0 ) Call state( 'mod1h   ' )
41
      first = .TRUE.
42
      last  = .FALSE.     
43
      Do log2n = 0, log2nmax
44
         n    = 2**log2n
45
         last = log2n .EQ. log2nmax 
46
         Call hull( ping2, title, me, npes, nrpt, ncases, n, tn,
47
     &              ops )
48
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
49
     &                first, last )
50
      End Do
51

    
52
      Do log2n = 0, log2nmax
53
         n    = 2**log2n
54
         last = log2n .EQ. log2nmax
55
         Call hull( ping2_i, title, me, npes, nrpt, ncases, n, tn,
56
     &              ops )
57
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
58
     &                first, last )
59
      End Do
60

    
61
      Do log2n = 0, log2nmax
62
         n    = 2**log2n
63
         last = log2n .EQ. log2nmax
64
         Call hull( broadcast, title, me, npes, nrpt, ncases, n, tn,
65
     &              ops )
66
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
67
     &                first, last )
68
      End Do
69

    
70
      Do log2n = 0, log2nmax
71
         n    = 2**log2n
72
         last = log2n .EQ. log2nmax
73
         Call hull( collect, title, me, npes, nrpt, ncases, n, tn,
74
     &              ops )
75
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
76
     &                first, last )
77
      End Do
78

    
79
      Do log2n = 0, log2nmax
80
         n    = 2**log2n
81
         last = log2n .EQ. log2nmax
82
         Call hull( reduction, title, me, npes, nrpt, ncases, n, tn,
83
     &              ops )
84
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
85
     &                first, last )
86
      End Do
87
  
88
      Do log2n = 0, log2nmax
89
         n    = 2**log2n
90
         last = log2n .EQ. log2nmax
91
         Call hull( trans_2d, title, me, npes, nrpt, ncases, n, tn,
92
     &              ops )
93
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
94
     &                first, last )
95
      End Do
96

    
97
      Do log2n = 0, log2nmax
98
         n    = 2**log2n
99
         last = log2n .EQ. log2nmax
100
         Call hull( bisec2_reg, title, me, npes, nrpt, ncases, n, tn,
101
     &              ops )
102
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
103
     &                first, last )
104
      End Do
105

    
106
      Do log2n = 0, log2nmax
107
         n    = 2**log2n
108
         last = log2n .EQ. log2nmax
109
         Call hull( bisec2_rand, title, me, npes, nrpt, ncases, n, tn,
110
     &              ops )
111
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
112
     &                first, last )
113
      End Do
114

    
115
      Do log2n = 0, log2nmax
116
         n    = 2**log2n
117
         last = log2n .EQ. log2nmax
118
         Call hull( nearn_1d, title, me, npes, nrpt, ncases, n, tn,
119
     &              ops )
120
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
121
     &                first, last )
122
      End Do
123
 
124
      Do log2n = 0, log2nmax
125
         n    = 2**log2n
126
         last = log2n .EQ. log2nmax
127
         Call hull( nearn_2d, title, me, npes, nrpt, ncases, n, tn,
128
     &              ops )
129
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
130
     &                first, last )
131
      End Do
132

    
133
      Do log2n = 0, log2nmax
134
         n    = 2**log2n
135
         last = log2n .EQ. log2nmax
136
         Call hull( nearn_3d, title, me, npes, nrpt, ncases, n, tn,
137
     &              ops )
138
         Call report( title, me, npes, nrpt, ncases, n, tn, ops,
139
     &                first, last )
140
      End Do
141

    
142
      end_time =  MPI_Wtime() - start_time
143
      If (me == 0) Then
144
         Write(6,22) 'Walltime: ', end_time, " s"
145
 22      Format(A,F9.3,A)
146
         Write(6,*) 'Program terminated normally'
147
      End If
148
      Call MPI_Finalize (ie)
149
     
150
! ----------------------------------------------------------------------
151
      End Program mod1h