FMS
2024.03
Flexible Modeling System
mpp_comm.inc
1
! -*-f90-*-
2
3
!***********************************************************************
4
!* GNU Lesser General Public License
5
!*
6
!* This file is part of the GFDL Flexible Modeling System (FMS).
7
!*
8
!* FMS is free software: you can redistribute it and/or modify it under
9
!* the terms of the GNU Lesser General Public License as published by
10
!* the Free Software Foundation, either version 3 of the License, or (at
11
!* your option) any later version.
12
!*
13
!* FMS is distributed in the hope that it will be useful, but WITHOUT
14
!* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
!* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16
!* for more details.
17
!*
18
!* You should have received a copy of the GNU Lesser General Public
19
!* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
20
!***********************************************************************
21
!> @file
22
!> @brief Imports checksum, gather, and scatter routines from other include files used
23
!! for communications and calculations between PE's in @ref mpp_mod
24
25
!> @addtogroup mpp_mod
26
!> @{
27
28
#if defined(use_libMPI)
29
#include <mpp_comm_mpi.inc>
30
#else
31
#include <mpp_comm_nocomm.inc>
32
#endif
33
34
#undef MPP_CHKSUM_INT_
35
#define MPP_CHKSUM_INT_ mpp_chksum_i8_1d
36
#undef MPP_CHKSUM_INT_RMASK_
37
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i8_1d_rmask
38
#undef MPP_TYPE_
39
#define MPP_TYPE_ integer(i8_kind)
40
#undef MPP_RANK_
41
#define MPP_RANK_ (:)
42
#include <mpp_chksum_int.fh>
43
44
#undef MPP_CHKSUM_INT_
45
#define MPP_CHKSUM_INT_ mpp_chksum_i8_2d
46
#undef MPP_CHKSUM_INT_RMASK_
47
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i8_2d_rmask
48
#undef MPP_TYPE_
49
#define MPP_TYPE_ integer(i8_kind)
50
#undef MPP_RANK_
51
#define MPP_RANK_ (:,:)
52
#include <mpp_chksum_int.fh>
53
54
#undef MPP_CHKSUM_INT_
55
#define MPP_CHKSUM_INT_ mpp_chksum_i8_3d
56
#undef MPP_CHKSUM_INT_RMASK_
57
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i8_3d_rmask
58
#undef MPP_TYPE_
59
#define MPP_TYPE_ integer(i8_kind)
60
#undef MPP_RANK_
61
#define MPP_RANK_ (:,:,:)
62
#include <mpp_chksum_int.fh>
63
64
#undef MPP_CHKSUM_INT_
65
#define MPP_CHKSUM_INT_ mpp_chksum_i8_4d
66
#undef MPP_CHKSUM_INT_RMASK_
67
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i8_4d_rmask
68
#undef MPP_TYPE_
69
#define MPP_TYPE_ integer(i8_kind)
70
#undef MPP_RANK_
71
#define MPP_RANK_ (:,:,:,:)
72
#include <mpp_chksum_int.fh>
73
74
#undef MPP_CHKSUM_INT_
75
#define MPP_CHKSUM_INT_ mpp_chksum_i8_5d
76
#undef MPP_CHKSUM_INT_RMASK_
77
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i8_5d_rmask
78
#undef MPP_TYPE_
79
#define MPP_TYPE_ integer(i8_kind)
80
#undef MPP_RANK_
81
#define MPP_RANK_ (:,:,:,:,:)
82
#include <mpp_chksum_int.fh>
83
84
#undef MPP_CHKSUM_INT_
85
#define MPP_CHKSUM_INT_ mpp_chksum_i4_1d
86
#undef MPP_CHKSUM_INT_RMASK_
87
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i4_1d_rmask
88
#undef MPP_TYPE_
89
#define MPP_TYPE_ integer(i4_kind)
90
#undef MPP_RANK_
91
#define MPP_RANK_ (:)
92
#include <mpp_chksum_int.fh>
93
94
#undef MPP_CHKSUM_INT_
95
#define MPP_CHKSUM_INT_ mpp_chksum_i4_2d
96
#undef MPP_CHKSUM_INT_RMASK_
97
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i4_2d_rmask
98
#undef MPP_TYPE_
99
#define MPP_TYPE_ integer(i4_kind)
100
#undef MPP_RANK_
101
#define MPP_RANK_ (:,:)
102
#include <mpp_chksum_int.fh>
103
104
#undef MPP_CHKSUM_INT_
105
#define MPP_CHKSUM_INT_ mpp_chksum_i4_3d
106
#undef MPP_CHKSUM_INT_RMASK_
107
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i4_3d_rmask
108
#undef MPP_TYPE_
109
#define MPP_TYPE_ integer(i4_kind)
110
#undef MPP_RANK_
111
#define MPP_RANK_ (:,:,:)
112
#include <mpp_chksum_int.fh>
113
114
#undef MPP_CHKSUM_INT_
115
#define MPP_CHKSUM_INT_ mpp_chksum_i4_4d
116
#undef MPP_CHKSUM_INT_RMASK_
117
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i4_4d_rmask
118
#undef MPP_TYPE_
119
#define MPP_TYPE_ integer(i4_kind)
120
#undef MPP_RANK_
121
#define MPP_RANK_ (:,:,:,:)
122
#include <mpp_chksum_int.fh>
123
124
#undef MPP_CHKSUM_INT_
125
#define MPP_CHKSUM_INT_ mpp_chksum_i4_5d
126
#undef MPP_CHKSUM_INT_RMASK_
127
#define MPP_CHKSUM_INT_RMASK_ mpp_chksum_i4_5d_rmask
128
#undef MPP_TYPE_
129
#define MPP_TYPE_ integer(i4_kind)
130
#undef MPP_RANK_
131
#define MPP_RANK_ (:,:,:,:,:)
132
#include <mpp_chksum_int.fh>
133
134
#undef MPP_CHKSUM_
135
#define MPP_CHKSUM_ mpp_chksum_r8_0d
136
#undef MPP_TYPE_
137
#define MPP_TYPE_ real(r8_kind)
138
#undef MPP_RANK_
139
#define MPP_RANK_ !
140
#include <mpp_chksum_scalar.fh>
141
142
#undef MPP_CHKSUM_
143
#define MPP_CHKSUM_ mpp_chksum_r8_1d
144
#undef MPP_TRANSFER_KIND_
145
#define MPP_TRANSFER_KIND_ i8_kind
146
#undef MPP_TYPE_
147
#define MPP_TYPE_ real(r8_kind)
148
#undef MPP_RANK_
149
#define MPP_RANK_ (:)
150
#include <mpp_chksum.fh>
151
152
#undef MPP_CHKSUM_
153
#define MPP_CHKSUM_ mpp_chksum_r8_2d
154
#undef MPP_TRANSFER_KIND_
155
#define MPP_TRANSFER_KIND_ i8_kind
156
#undef MPP_TYPE_
157
#define MPP_TYPE_ real(r8_kind)
158
#undef MPP_RANK_
159
#define MPP_RANK_ (:,:)
160
#include <mpp_chksum.fh>
161
162
#undef MPP_CHKSUM_
163
#define MPP_CHKSUM_ mpp_chksum_r8_3d
164
#undef MPP_TRANSFER_KIND_
165
#define MPP_TRANSFER_KIND_ i8_kind
166
#undef MPP_TYPE_
167
#define MPP_TYPE_ real(r8_kind)
168
#undef MPP_RANK_
169
#define MPP_RANK_ (:,:,:)
170
#include <mpp_chksum.fh>
171
172
#undef MPP_CHKSUM_
173
#define MPP_CHKSUM_ mpp_chksum_r8_4d
174
#undef MPP_TRANSFER_KIND_
175
#define MPP_TRANSFER_KIND_ i8_kind
176
#undef MPP_TYPE_
177
#define MPP_TYPE_ real(r8_kind)
178
#undef MPP_RANK_
179
#define MPP_RANK_ (:,:,:,:)
180
#include <mpp_chksum.fh>
181
182
#undef MPP_CHKSUM_
183
#define MPP_CHKSUM_ mpp_chksum_r8_5d
184
#undef MPP_TRANSFER_KIND_
185
#define MPP_TRANSFER_KIND_ i8_kind
186
#undef MPP_TYPE_
187
#define MPP_TYPE_ real(r8_kind)
188
#undef MPP_RANK_
189
#define MPP_RANK_ (:,:,:,:,:)
190
#include <mpp_chksum.fh>
191
192
#ifdef OVERLOAD_C8
193
#undef MPP_CHKSUM_
194
#define MPP_CHKSUM_ mpp_chksum_c8_0d
195
#undef MPP_TRANSFER_KIND_
196
#define MPP_TRANSFER_KIND_ i8_kind
197
#undef MPP_TYPE_
198
#define MPP_TYPE_ complex(c8_kind)
199
#undef MPP_RANK_
200
#define MPP_RANK_ !
201
#include <mpp_chksum_scalar.fh>
202
203
#undef MPP_CHKSUM_
204
#define MPP_CHKSUM_ mpp_chksum_c8_1d
205
#undef MPP_TRANSFER_KIND_
206
#define MPP_TRANSFER_KIND_ i8_kind
207
#undef MPP_TYPE_
208
#define MPP_TYPE_ complex(c8_kind)
209
#undef MPP_RANK_
210
#define MPP_RANK_ (:)
211
#include <mpp_chksum.fh>
212
213
#undef MPP_CHKSUM_
214
#define MPP_CHKSUM_ mpp_chksum_c8_2d
215
#undef MPP_TRANSFER_KIND_
216
#define MPP_TRANSFER_KIND_ i8_kind
217
#undef MPP_TYPE_
218
#define MPP_TYPE_ complex(c8_kind)
219
#undef MPP_RANK_
220
#define MPP_RANK_ (:,:)
221
#include <mpp_chksum.fh>
222
223
#undef MPP_CHKSUM_
224
#define MPP_CHKSUM_ mpp_chksum_c8_3d
225
#undef MPP_TRANSFER_KIND_
226
#define MPP_TRANSFER_KIND_ i8_kind
227
#undef MPP_TYPE_
228
#define MPP_TYPE_ complex(c8_kind)
229
#undef MPP_RANK_
230
#define MPP_RANK_ (:,:,:)
231
#include <mpp_chksum.fh>
232
233
#undef MPP_CHKSUM_
234
#define MPP_CHKSUM_ mpp_chksum_c8_4d
235
#undef MPP_TRANSFER_KIND_
236
#define MPP_TRANSFER_KIND_ i8_kind
237
#undef MPP_TYPE_
238
#define MPP_TYPE_ complex(c8_kind)
239
#undef MPP_RANK_
240
#define MPP_RANK_ (:,:,:,:)
241
#include <mpp_chksum.fh>
242
243
#undef MPP_CHKSUM_
244
#define MPP_CHKSUM_ mpp_chksum_c8_5d
245
#undef MPP_TRANSFER_KIND_
246
#define MPP_TRANSFER_KIND_ i8_kind
247
#undef MPP_TYPE_
248
#define MPP_TYPE_ complex(c8_kind)
249
#undef MPP_RANK_
250
#define MPP_RANK_ (:,:,:,:,:)
251
#include <mpp_chksum.fh>
252
#endif
253
254
#undef MPP_CHKSUM_
255
#define MPP_CHKSUM_ mpp_chksum_r4_0d
256
#undef MPP_TRANSFER_KIND_
257
#define MPP_TRANSFER_KIND_ i4_kind
258
#undef MPP_TYPE_
259
#define MPP_TYPE_ real(r4_kind)
260
#undef MPP_RANK_
261
#define MPP_RANK_ !
262
#include <mpp_chksum_scalar.fh>
263
264
#undef MPP_CHKSUM_
265
#define MPP_CHKSUM_ mpp_chksum_r4_1d
266
#undef MPP_TRANSFER_KIND_
267
#define MPP_TRANSFER_KIND_ i4_kind
268
#undef MPP_TYPE_
269
#define MPP_TYPE_ real(r4_kind)
270
#undef MPP_RANK_
271
#define MPP_RANK_ (:)
272
#include <mpp_chksum.fh>
273
274
#undef MPP_CHKSUM_
275
#define MPP_CHKSUM_ mpp_chksum_r4_2d
276
#undef MPP_TRANSFER_KIND_
277
#define MPP_TRANSFER_KIND_ i4_kind
278
#undef MPP_TYPE_
279
#define MPP_TYPE_ real(r4_kind)
280
#undef MPP_RANK_
281
#define MPP_RANK_ (:,:)
282
#include <mpp_chksum.fh>
283
284
#undef MPP_CHKSUM_
285
#define MPP_CHKSUM_ mpp_chksum_r4_3d
286
#undef MPP_TRANSFER_KIND_
287
#define MPP_TRANSFER_KIND_ i4_kind
288
#undef MPP_TYPE_
289
#define MPP_TYPE_ real(r4_kind)
290
#undef MPP_RANK_
291
#define MPP_RANK_ (:,:,:)
292
#include <mpp_chksum.fh>
293
294
#undef MPP_CHKSUM_
295
#define MPP_CHKSUM_ mpp_chksum_r4_4d
296
#undef MPP_TRANSFER_KIND_
297
#define MPP_TRANSFER_KIND_ i4_kind
298
#undef MPP_TYPE_
299
#define MPP_TYPE_ real(r4_kind)
300
#undef MPP_RANK_
301
#define MPP_RANK_ (:,:,:,:)
302
#include <mpp_chksum.fh>
303
304
#undef MPP_CHKSUM_
305
#define MPP_CHKSUM_ mpp_chksum_r4_5d
306
#undef MPP_TRANSFER_KIND_
307
#define MPP_TRANSFER_KIND_ i4_kind
308
#undef MPP_TYPE_
309
#define MPP_TYPE_ real(r4_kind)
310
#undef MPP_RANK_
311
#define MPP_RANK_ (:,:,:,:,:)
312
#include <mpp_chksum.fh>
313
314
#ifdef OVERLOAD_C4
315
#undef MPP_CHKSUM_
316
#define MPP_CHKSUM_ mpp_chksum_c4_0d
317
#undef MPP_TRANSFER_KIND_
318
#define MPP_TRANSFER_KIND_ i4_kind
319
#undef MPP_TYPE_
320
#define MPP_TYPE_ complex(c4_kind)
321
#undef MPP_RANK_
322
#define MPP_RANK_ !
323
#include <mpp_chksum_scalar.fh>
324
325
#undef MPP_CHKSUM_
326
#define MPP_CHKSUM_ mpp_chksum_c4_1d
327
#undef MPP_TRANSFER_KIND_
328
#define MPP_TRANSFER_KIND_ i4_kind
329
#undef MPP_TYPE_
330
#define MPP_TYPE_ complex(c4_kind)
331
#undef MPP_RANK_
332
#define MPP_RANK_ (:)
333
#include <mpp_chksum.fh>
334
335
#undef MPP_CHKSUM_
336
#define MPP_CHKSUM_ mpp_chksum_c4_2d
337
#undef MPP_TRANSFER_KIND_
338
#define MPP_TRANSFER_KIND_ i4_kind
339
#undef MPP_TYPE_
340
#define MPP_TYPE_ complex(c4_kind)
341
#undef MPP_RANK_
342
#define MPP_RANK_ (:,:)
343
#include <mpp_chksum.fh>
344
345
#undef MPP_CHKSUM_
346
#define MPP_CHKSUM_ mpp_chksum_c4_3d
347
#undef MPP_TRANSFER_KIND_
348
#define MPP_TRANSFER_KIND_ i4_kind
349
#undef MPP_TYPE_
350
#define MPP_TYPE_ complex(c4_kind)
351
#undef MPP_RANK_
352
#define MPP_RANK_ (:,:,:)
353
#include <mpp_chksum.fh>
354
355
#undef MPP_CHKSUM_
356
#define MPP_CHKSUM_ mpp_chksum_c4_4d
357
#undef MPP_TRANSFER_KIND_
358
#define MPP_TRANSFER_KIND_ i4_kind
359
#undef MPP_TYPE_
360
#define MPP_TYPE_ complex(c4_kind)
361
#undef MPP_RANK_
362
#define MPP_RANK_ (:,:,:,:)
363
#include <mpp_chksum.fh>
364
365
#undef MPP_CHKSUM_
366
#define MPP_CHKSUM_ mpp_chksum_c4_5d
367
#undef MPP_TRANSFER_KIND_
368
#define MPP_TRANSFER_KIND_ i4_kind
369
#undef MPP_TYPE_
370
#define MPP_TYPE_ complex(c4_kind)
371
#undef MPP_RANK_
372
#define MPP_RANK_ (:,:,:,:,:)
373
#include <mpp_chksum.fh>
374
#endif
375
376
!#################################################
377
#undef MPP_GATHER_1D_
378
#undef MPP_GATHER_1DV_
379
#undef MPP_TYPE_
380
#define MPP_TYPE_ logical
381
#define MPP_GATHER_1D_ mpp_gather_logical_1d
382
#define MPP_GATHER_1DV_ mpp_gather_logical_1dv
383
#undef MPP_GATHER_PELIST_2D_
384
#undef MPP_GATHER_PELIST_3D_
385
#define MPP_GATHER_PELIST_2D_ mpp_gather_pelist_logical_2d
386
#define MPP_GATHER_PELIST_3D_ mpp_gather_pelist_logical_3d
387
#include <mpp_gather.fh>
388
389
#undef MPP_GATHER_1D_
390
#undef MPP_GATHER_1DV_
391
#undef MPP_TYPE_
392
#define MPP_TYPE_ integer(i4_kind)
393
#define MPP_GATHER_1D_ mpp_gather_int4_1d
394
#define MPP_GATHER_1DV_ mpp_gather_int4_1dv
395
#undef MPP_GATHER_PELIST_2D_
396
#undef MPP_GATHER_PELIST_3D_
397
#define MPP_GATHER_PELIST_2D_ mpp_gather_pelist_int4_2d
398
#define MPP_GATHER_PELIST_3D_ mpp_gather_pelist_int4_3d
399
#include <mpp_gather.fh>
400
401
402
#undef MPP_GATHER_1D_
403
#undef MPP_GATHER_1DV_
404
#undef MPP_TYPE_
405
#define MPP_TYPE_ integer(i8_kind)
406
#define MPP_GATHER_1D_ mpp_gather_int8_1d
407
#define MPP_GATHER_1DV_ mpp_gather_int8_1dv
408
#undef MPP_GATHER_PELIST_2D_
409
#undef MPP_GATHER_PELIST_3D_
410
#define MPP_GATHER_PELIST_2D_ mpp_gather_pelist_int8_2d
411
#define MPP_GATHER_PELIST_3D_ mpp_gather_pelist_int8_3d
412
#include <mpp_gather.fh>
413
414
415
#undef MPP_GATHER_1D_
416
#undef MPP_GATHER_1DV_
417
#undef MPP_TYPE_
418
#define MPP_TYPE_ real(r4_kind)
419
#define MPP_GATHER_1D_ mpp_gather_real4_1d
420
#define MPP_GATHER_1DV_ mpp_gather_real4_1dv
421
#undef MPP_GATHER_PELIST_2D_
422
#undef MPP_GATHER_PELIST_3D_
423
#define MPP_GATHER_PELIST_2D_ mpp_gather_pelist_real4_2d
424
#define MPP_GATHER_PELIST_3D_ mpp_gather_pelist_real4_3d
425
#include <mpp_gather.fh>
426
427
#undef MPP_GATHER_1D_
428
#undef MPP_GATHER_1DV_
429
#undef MPP_TYPE_
430
#define MPP_TYPE_ real(r8_kind)
431
#define MPP_GATHER_1D_ mpp_gather_real8_1d
432
#define MPP_GATHER_1DV_ mpp_gather_real8_1dv
433
#undef MPP_GATHER_PELIST_2D_
434
#undef MPP_GATHER_PELIST_3D_
435
#define MPP_GATHER_PELIST_2D_ mpp_gather_pelist_real8_2d
436
#define MPP_GATHER_PELIST_3D_ mpp_gather_pelist_real8_3d
437
#include <mpp_gather.fh>
438
439
!#################################################
440
#undef MPP_SCATTER_PELIST_2D_
441
#undef MPP_SCATTER_PELIST_3D_
442
#undef MPP_TYPE_
443
#define MPP_TYPE_ integer(i4_kind)
444
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int4_2d
445
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int4_3d
446
#include <mpp_scatter.fh>
447
448
#undef MPP_SCATTER_PELIST_2D_
449
#undef MPP_SCATTER_PELIST_3D_
450
#undef MPP_TYPE_
451
#define MPP_TYPE_ integer(i8_kind)
452
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_int8_2d
453
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_int8_3d
454
#include <mpp_scatter.fh>
455
456
#undef MPP_SCATTER_PELIST_2D_
457
#undef MPP_SCATTER_PELIST_3D_
458
#undef MPP_TYPE_
459
#define MPP_TYPE_ real(r4_kind)
460
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real4_2d
461
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real4_3d
462
#include <mpp_scatter.fh>
463
464
#undef MPP_SCATTER_PELIST_2D_
465
#undef MPP_SCATTER_PELIST_3D_
466
#undef MPP_TYPE_
467
#define MPP_TYPE_ real(r8_kind)
468
#define MPP_SCATTER_PELIST_2D_ mpp_scatter_pelist_real8_2d
469
#define MPP_SCATTER_PELIST_3D_ mpp_scatter_pelist_real8_3d
470
#include <mpp_scatter.fh>
471
!> @}
mpp
include
mpp_comm.inc
Generated by
1.9.1