forked from KuangLab-Harvard/SAM_SRCv6.11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
task_util_NOMPI.f9000
294 lines (242 loc) · 8.88 KB
/
task_util_NOMPI.f9000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
subroutine task_start(rank,numtasks)
integer rank,numtasks
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_abort()
print*,'Aborting the program...'
stop
end
!----------------------------------------------------------------------
subroutine task_stop()
print*,'program is finished...'
stop
end
!----------------------------------------------------------------------
subroutine task_barrier()
return
end
!----------------------------------------------------------------------
subroutine task_bcast_float4(rank_from,buffer,length)
implicit none
integer rank_from ! broadcasting task's rank
real(4) buffer(*) ! buffer of data
integer length ! buffers' length
integer ierr
return
end
!----------------------------------------------------------------------
subroutine task_bcast_real8(rank_from,buffer,length)
implicit none
integer rank_from ! broadcasting task's rank
real*8 buffer(*) ! buffer of data
integer length ! buffers' length
integer ierr
return
end
!----------------------------------------------------------------------
subroutine task_bcast_integer(rank_from,buffer,length)
implicit none
integer rank_from ! broadcasting task's rank
integer buffer(*) ! buffer of data
integer length ! buffers' length
integer ierr
return
end
!----------------------------------------------------------------------
subroutine task_bcast_float(rank_from,buffer,length)
implicit none
integer rank_from ! broadcasting task's rank
real buffer(*) ! buffer of data
integer length ! buffers' length
print*, 'MPIsndf call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_send_float(rank_to,buffer,length,tag,request)
implicit none
integer rank_to ! receiving task's rank
real buffer(*) ! buffer of data
integer length ! buffers' length
integer tag ! tag of the message
integer request ! request id
print*, 'MPIsndf call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_send_integer(rank_to,buffer,length,tag,request)
implicit none
integer rank_to ! receiving task's rank
integer buffer(*) ! buffer of data
integer length ! buffers' length
integer tag ! tag of the message
integer request
print*, 'MPIsndi call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_send_character(rank_to,buffer,length,tag,request)
implicit none
integer rank_to ! receiving task's rank
character*1 buffer(*) ! buffer of data
integer length ! buffers' length
integer tag ! tag of the message
integer request
print*, 'MPIsndi call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_receive_float(buffer,length,request)
real buffer(*) ! buffer of data
integer length ! buffers' length
integer request
print*, 'MPIrcvf call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_receive_float4(buffer,length,request)
real(4) buffer(*) ! buffer of data
integer length ! buffers' length
integer request
print*, 'MPIrcvf call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_receive_charcater(buffer,length,request)
character*1 buffer(*) ! buffer of data
integer length ! buffers' length
integer request
print*, 'MPIrcvi call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_receive_integer(buffer,length,request)
integer buffer(*) ! buffer of data
integer length ! buffers' length
integer request
print*, 'MPIrcvi call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_bsend_float(rank_to,buffer,length,tag)
integer rank_to ! receiving task's rank
real buffer(*) ! buffer of data
integer length ! buffers' length
integer tag ! tag of the message
print*, 'MPI call from a single task program! Exiting...'
stop
return
end
!----------------------------------------------------------------------
subroutine task_bsend_float4(rank_to,buffer,length,tag)
integer rank_to ! receiving task's rank
real(4) buffer(*) ! buffer of data
integer length ! buffers' length
integer tag ! tag of the message
print*, 'MPI call from a single task program! Exiting...'
stop
return
end
!----------------------------------------------------------------------
subroutine task_wait(request,rank,tag)
integer request
integer rank, tag
return
end
!----------------------------------------------------------------------
subroutine task_waitall(count,reqs,ranks,tags)
integer count,reqs(count)
integer ranks(count),tags(count)
return
end
!----------------------------------------------------------------------
subroutine task_test(request,flag,rank,tag)
integer request
integer rank, tag
logical flag
print*, 'MPItst call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_sum_real(buffer1,buffer2,length)
real buffer1(*) ! buffer of data
real buffer2(*) ! buffer of data
integer length ! buffers' length
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_sum_real8(buffer1,buffer2,length)
real buffer1(*) ! buffer of data
real buffer2(*) ! buffer of data
integer length ! buffers' length
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_sum_integer(buffer1,buffer2,length)
real buffer1(*) ! buffer of data
real buffer2(*) ! buffer of data
integer length ! buffers' length
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_max_real(buffer1,buffer2,length)
real buffer1(*) ! buffer of data
real buffer2(*) ! buffer of data
integer length ! buffers' length
return
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_max_real4(buffer1,buffer2,length)
real(4) buffer1(*) ! buffer of data
real(4) buffer2(*) ! buffer of data
integer length ! buffers' length
return
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_max_integer(buffer1,buffer2,length)
real buffer1(*) ! buffer of data
real buffer2(*) ! buffer of data
integer length ! buffers' length
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_min_real(buffer1,buffer2,length)
real buffer1(*) ! buffer of data
real buffer2(*) ! buffer of data
integer length ! buffers' length
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_min_real4(buffer1,buffer2,length)
real(4) buffer1(*) ! buffer of data
real(4) buffer2(*) ! buffer of data
integer length ! buffers' length
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_min_integer(buffer1,buffer2,length)
real buffer1(*) ! buffer of data
real buffer2(*) ! buffer of data
integer length ! buffers' length
print*, 'MPI call from a single task program! Exiting...'
stop
end
!----------------------------------------------------------------------
subroutine task_receive_character(buffer,length,request)
character*1 buffer(*) ! buffer of data
integer length ! buffers' length
integer request
print*, 'MPI call from a single task program! Exiting...'
stop
end