GCC Code Coverage Report


Directory: ./
File: phy_common/mod_phys_lmdz_transfert_para.f90
Date: 2022-01-11 19:19:34
Exec Total Coverage
Lines: 53 400 13.2%
Branches: 11 280 3.9%

Line Branch Exec Source
1 !
2 !$Id: mod_phys_lmdz_transfert_para.F90 3465 2019-03-14 09:34:31Z fairhead $
3 !
4 MODULE mod_phys_lmdz_transfert_para
5
6 USE mod_phys_lmdz_mpi_transfert
7 USE mod_phys_lmdz_omp_transfert
8
9
10
11 INTERFACE bcast
12 MODULE PROCEDURE bcast_c, &
13 bcast_i,bcast_i1,bcast_i2,bcast_i3,bcast_i4, &
14 bcast_r,bcast_r1,bcast_r2,bcast_r3,bcast_r4, &
15 bcast_l,bcast_l1,bcast_l2,bcast_l3,bcast_l4
16 END INTERFACE
17
18 INTERFACE scatter
19 MODULE PROCEDURE scatter_i,scatter_i1,scatter_i2,scatter_i3, &
20 scatter_r,scatter_r1,scatter_r2,scatter_r3, &
21 scatter_l,scatter_l1,scatter_l2,scatter_l3
22 END INTERFACE
23
24
25 INTERFACE gather
26 MODULE PROCEDURE gather_i,gather_i1,gather_i2,gather_i3, &
27 gather_r,gather_r1,gather_r2,gather_r3, &
28 gather_l,gather_l1,gather_l2,gather_l3
29 END INTERFACE
30
31 INTERFACE scatter2D
32 MODULE PROCEDURE scatter2D_i,scatter2D_i1,scatter2D_i2,scatter2D_i3, &
33 scatter2D_r,scatter2D_r1,scatter2D_r2,scatter2D_r3, &
34 scatter2D_l,scatter2D_l1,scatter2D_l2,scatter2D_l3
35 END INTERFACE
36
37 INTERFACE gather2D
38 MODULE PROCEDURE gather2D_i,gather2D_i1,gather2D_i2,gather2D_i3, &
39 gather2D_r,gather2D_r1,gather2D_r2,gather2D_r3, &
40 gather2D_l,gather2D_l1,gather2D_l2,gather2D_l3
41 END INTERFACE
42
43 INTERFACE reduce_sum
44 MODULE PROCEDURE reduce_sum_i,reduce_sum_i1,reduce_sum_i2,reduce_sum_i3,reduce_sum_i4, &
45 reduce_sum_r,reduce_sum_r1,reduce_sum_r2,reduce_sum_r3,reduce_sum_r4
46 END INTERFACE
47
48 INTERFACE reduce_min
49 MODULE PROCEDURE reduce_min_i,reduce_min_i1,reduce_min_i2,reduce_min_i3,reduce_min_i4, &
50 reduce_min_r,reduce_min_r1,reduce_min_r2,reduce_min_r3,reduce_min_r4
51 END INTERFACE
52
53 CONTAINS
54
55 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
56 !! Definition des Broadcast --> 4D !!
57 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
58
59 !! -- Les chaine de charact´┐Żre -- !!
60
61 2 SUBROUTINE bcast_c(var)
62 IMPLICIT NONE
63 CHARACTER(LEN=*),INTENT(INOUT) :: Var
64
65 !$OMP MASTER
66 2 CALL bcast_mpi(Var)
67 !$OMP END MASTER
68 2 CALL bcast_omp(Var)
69
70 2 END SUBROUTINE bcast_c
71
72 !! -- Les entiers -- !!
73
74 757 SUBROUTINE bcast_i(var)
75 IMPLICIT NONE
76 INTEGER,INTENT(INOUT) :: Var
77 !$OMP MASTER
78 757 CALL bcast_mpi(Var)
79 !$OMP END MASTER
80 757 CALL bcast_omp(Var)
81
82 757 END SUBROUTINE bcast_i
83
84 SUBROUTINE bcast_i1(var)
85 IMPLICIT NONE
86 INTEGER,INTENT(INOUT) :: Var(:)
87
88 !$OMP MASTER
89 CALL bcast_mpi(Var)
90 !$OMP END MASTER
91 CALL bcast_omp(Var)
92
93 END SUBROUTINE bcast_i1
94
95
96 SUBROUTINE bcast_i2(var)
97 IMPLICIT NONE
98 INTEGER,INTENT(INOUT) :: Var(:,:)
99
100 !$OMP MASTER
101 CALL bcast_mpi(Var)
102 !$OMP END MASTER
103 CALL bcast_omp(Var)
104
105 END SUBROUTINE bcast_i2
106
107
108 SUBROUTINE bcast_i3(var)
109 IMPLICIT NONE
110 INTEGER,INTENT(INOUT) :: Var(:,:,:)
111
112 !$OMP MASTER
113 CALL bcast_mpi(Var)
114 !$OMP END MASTER
115 CALL bcast_omp(Var)
116
117 END SUBROUTINE bcast_i3
118
119
120 SUBROUTINE bcast_i4(var)
121 IMPLICIT NONE
122 INTEGER,INTENT(INOUT) :: Var(:,:,:,:)
123
124 !$OMP MASTER
125 CALL bcast_mpi(Var)
126 !$OMP END MASTER
127 CALL bcast_omp(Var)
128
129 END SUBROUTINE bcast_i4
130
131
132 !! -- Les reels -- !!
133
134 540 SUBROUTINE bcast_r(var)
135 IMPLICIT NONE
136 REAL,INTENT(INOUT) :: Var
137
138 !$OMP MASTER
139 540 CALL bcast_mpi(Var)
140 !$OMP END MASTER
141 540 CALL bcast_omp(Var)
142
143 540 END SUBROUTINE bcast_r
144
145
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
5 SUBROUTINE bcast_r1(var)
146 IMPLICIT NONE
147 REAL,INTENT(INOUT) :: Var(:)
148
149 !$OMP MASTER
150 5 CALL bcast_mpi(Var)
151 !$OMP END MASTER
152 5 CALL bcast_omp(Var)
153
154 5 END SUBROUTINE bcast_r1
155
156
157 SUBROUTINE bcast_r2(var)
158 IMPLICIT NONE
159 REAL,INTENT(INOUT) :: Var(:,:)
160
161 !$OMP MASTER
162 CALL bcast_mpi(Var)
163 !$OMP END MASTER
164 CALL bcast_omp(Var)
165
166 END SUBROUTINE bcast_r2
167
168
169 SUBROUTINE bcast_r3(var)
170 IMPLICIT NONE
171 REAL,INTENT(INOUT) :: Var(:,:,:)
172
173 !$OMP MASTER
174 CALL bcast_mpi(Var)
175 !$OMP END MASTER
176 CALL bcast_omp(Var)
177
178 END SUBROUTINE bcast_r3
179
180
181 SUBROUTINE bcast_r4(var)
182 IMPLICIT NONE
183 REAL,INTENT(INOUT) :: Var(:,:,:,:)
184
185 !$OMP MASTER
186 CALL bcast_mpi(Var)
187 !$OMP END MASTER
188 CALL bcast_omp(Var)
189
190 END SUBROUTINE bcast_r4
191
192
193 !! -- Les booleens -- !!
194
195 855 SUBROUTINE bcast_l(var)
196 IMPLICIT NONE
197 LOGICAL,INTENT(INOUT) :: Var
198 !$OMP MASTER
199 855 CALL bcast_mpi(Var)
200 !$OMP END MASTER
201 855 CALL bcast_omp(Var)
202
203 855 END SUBROUTINE bcast_l
204
205 SUBROUTINE bcast_l1(var)
206 IMPLICIT NONE
207 LOGICAL,INTENT(INOUT) :: Var(:)
208
209 !$OMP MASTER
210 CALL bcast_mpi(Var)
211 !$OMP END MASTER
212 CALL bcast_omp(Var)
213
214 END SUBROUTINE bcast_l1
215
216
217 SUBROUTINE bcast_l2(var)
218 IMPLICIT NONE
219 LOGICAL,INTENT(INOUT) :: Var(:,:)
220
221 !$OMP MASTER
222 CALL bcast_mpi(Var)
223 !$OMP END MASTER
224 CALL bcast_omp(Var)
225
226 END SUBROUTINE bcast_l2
227
228
229 SUBROUTINE bcast_l3(var)
230 IMPLICIT NONE
231 LOGICAL,INTENT(INOUT) :: Var(:,:,:)
232
233 !$OMP MASTER
234 CALL bcast_mpi(Var)
235 !$OMP END MASTER
236 CALL bcast_omp(Var)
237
238 END SUBROUTINE bcast_l3
239
240
241 SUBROUTINE bcast_l4(var)
242 IMPLICIT NONE
243 LOGICAL,INTENT(INOUT) :: Var(:,:,:,:)
244
245 !$OMP MASTER
246 CALL bcast_mpi(Var)
247 !$OMP END MASTER
248 CALL bcast_omp(Var)
249
250 END SUBROUTINE bcast_l4
251
252
253 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
254 !! Definition des Scatter --> 4D !!
255 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
256
257 SUBROUTINE scatter_i(VarIn, VarOut)
258 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
259 IMPLICIT NONE
260
261 INTEGER,INTENT(IN),DIMENSION(:) :: VarIn
262 INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
263
264 INTEGER,DIMENSION(klon_mpi) :: Var_tmp
265
266 !$OMP MASTER
267 CALL scatter_mpi(VarIn,Var_tmp)
268 !$OMP END MASTER
269
270 CALL scatter_omp(Var_tmp,Varout)
271
272 END SUBROUTINE scatter_i
273
274
275 SUBROUTINE scatter_i1(VarIn, VarOut)
276 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
277 IMPLICIT NONE
278
279 INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
280 INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
281
282 INTEGER,DIMENSION(klon_mpi,SIZE(Varout,2)) :: Var_tmp
283
284 !$OMP MASTER
285 CALL scatter_mpi(VarIn,Var_tmp)
286 !$OMP END MASTER
287 CALL scatter_omp(Var_tmp,Varout)
288
289 END SUBROUTINE scatter_i1
290
291
292 SUBROUTINE scatter_i2(VarIn, VarOut)
293 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
294 IMPLICIT NONE
295
296 INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
297 INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
298
299 INTEGER,DIMENSION(klon_mpi,SIZE(Varout,2),SIZE(Varout,3)) :: Var_tmp
300
301 !$OMP MASTER
302 CALL scatter_mpi(VarIn,Var_tmp)
303 !$OMP END MASTER
304 CALL scatter_omp(Var_tmp,Varout)
305
306 END SUBROUTINE scatter_i2
307
308
309 SUBROUTINE scatter_i3(VarIn, VarOut)
310 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
311 IMPLICIT NONE
312
313 INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
314 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
315
316 INTEGER,DIMENSION(klon_mpi,SIZE(Varout,2),SIZE(Varout,3),SIZE(Varout,4)) :: Var_tmp
317
318 !$OMP MASTER
319 CALL scatter_mpi(VarIn,Var_tmp)
320 !$OMP END MASTER
321 CALL scatter_omp(Var_tmp,VarOut)
322
323 END SUBROUTINE scatter_i3
324
325
326
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 52 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 52 times.
52 SUBROUTINE scatter_r(VarIn, VarOut)
327 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
328 IMPLICIT NONE
329
330 REAL,INTENT(IN),DIMENSION(:) :: VarIn
331 REAL,INTENT(OUT),DIMENSION(:) :: VarOut
332
333 104 REAL,DIMENSION(klon_mpi) :: Var_tmp
334
335 !$OMP MASTER
336 52 CALL scatter_mpi(VarIn,Var_tmp)
337 !$OMP END MASTER
338
339 52 CALL scatter_omp(Var_tmp,Varout)
340
341 52 END SUBROUTINE scatter_r
342
343
344
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 322 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 322 times.
322 SUBROUTINE scatter_r1(VarIn, VarOut)
345 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
346 IMPLICIT NONE
347
348 REAL,INTENT(IN),DIMENSION(:,:) :: VarIn
349 REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
350
351 644 REAL,DIMENSION(klon_mpi,SIZE(Varout,2)) :: Var_tmp
352
353 !$OMP MASTER
354 322 CALL scatter_mpi(VarIn,Var_tmp)
355 !$OMP END MASTER
356 322 CALL scatter_omp(Var_tmp,Varout)
357
358 322 END SUBROUTINE scatter_r1
359
360
361 SUBROUTINE scatter_r2(VarIn, VarOut)
362 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
363 IMPLICIT NONE
364
365 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
366 REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
367
368 REAL,DIMENSION(klon_mpi,SIZE(Varout,2),SIZE(Varout,3)) :: Var_tmp
369
370 !$OMP MASTER
371 CALL scatter_mpi(VarIn,Var_tmp)
372 !$OMP END MASTER
373 CALL scatter_omp(Var_tmp,Varout)
374
375 END SUBROUTINE scatter_r2
376
377
378 SUBROUTINE scatter_r3(VarIn, VarOut)
379 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
380 IMPLICIT NONE
381
382 REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
383 REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
384
385 REAL,DIMENSION(klon_mpi,SIZE(Varout,2),SIZE(Varout,3),SIZE(Varout,4)) :: Var_tmp
386
387 !$OMP MASTER
388 CALL scatter_mpi(VarIn,Var_tmp)
389 !$OMP END MASTER
390 CALL scatter_omp(Var_tmp,VarOut)
391
392 END SUBROUTINE scatter_r3
393
394
395
396 SUBROUTINE scatter_l(VarIn, VarOut)
397 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
398 IMPLICIT NONE
399
400 LOGICAL,INTENT(IN),DIMENSION(:) :: VarIn
401 LOGICAL,INTENT(OUT),DIMENSION(:) :: VarOut
402
403 LOGICAL,DIMENSION(klon_mpi) :: Var_tmp
404
405 !$OMP MASTER
406 CALL scatter_mpi(VarIn,Var_tmp)
407 !$OMP END MASTER
408
409 CALL scatter_omp(Var_tmp,Varout)
410
411 END SUBROUTINE scatter_l
412
413
414 SUBROUTINE scatter_l1(VarIn, VarOut)
415 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
416 IMPLICIT NONE
417
418 LOGICAL,INTENT(IN),DIMENSION(:,:) :: VarIn
419 LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
420
421 LOGICAL,DIMENSION(klon_mpi,SIZE(Varout,2)) :: Var_tmp
422
423 !$OMP MASTER
424 CALL scatter_mpi(VarIn,Var_tmp)
425 !$OMP END MASTER
426 CALL scatter_omp(Var_tmp,Varout)
427
428 END SUBROUTINE scatter_l1
429
430
431 SUBROUTINE scatter_l2(VarIn, VarOut)
432 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
433 IMPLICIT NONE
434
435 LOGICAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
436 LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
437
438 LOGICAL,DIMENSION(klon_mpi,SIZE(Varout,2),SIZE(Varout,3)) :: Var_tmp
439
440 !$OMP MASTER
441 CALL scatter_mpi(VarIn,Var_tmp)
442 !$OMP END MASTER
443 CALL scatter_omp(Var_tmp,Varout)
444
445 END SUBROUTINE scatter_l2
446
447
448 SUBROUTINE scatter_l3(VarIn, VarOut)
449 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
450 IMPLICIT NONE
451
452 LOGICAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
453 LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
454
455 LOGICAL,DIMENSION(klon_mpi,SIZE(Varout,2),SIZE(Varout,3),SIZE(Varout,4)) :: Var_tmp
456
457 !$OMP MASTER
458 CALL scatter_mpi(VarIn,Var_tmp)
459 !$OMP END MASTER
460 CALL scatter_omp(Var_tmp,VarOut)
461
462 END SUBROUTINE scatter_l3
463
464
465
466 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
467 !! Definition des Gather --> 4D !!
468 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
469
470 !!!!! --> Les entiers
471
472
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 563 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 563 times.
563 SUBROUTINE gather_i(VarIn, VarOut)
473 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
474 IMPLICIT NONE
475
476 INTEGER,INTENT(IN),DIMENSION(:) :: VarIn
477 INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
478
479 1126 INTEGER, DIMENSION(klon_mpi) :: Var_tmp
480
481 563 CALL gather_omp(VarIn,Var_tmp)
482 !$OMP MASTER
483 563 CALL gather_mpi(Var_tmp,Varout)
484 !$OMP END MASTER
485
486 563 END SUBROUTINE gather_i
487
488
489 SUBROUTINE gather_i1(VarIn, VarOut)
490 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
491 IMPLICIT NONE
492
493 INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
494 INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
495
496 INTEGER, DIMENSION(klon_mpi,SIZE(VarIn,2)) :: Var_tmp
497
498 CALL gather_omp(VarIn,Var_tmp)
499 !$OMP MASTER
500 CALL gather_mpi(Var_tmp,Varout)
501 !$OMP END MASTER
502
503 END SUBROUTINE gather_i1
504
505
506 SUBROUTINE gather_i2(VarIn, VarOut)
507 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
508 IMPLICIT NONE
509
510 INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
511 INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
512
513 INTEGER, DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
514
515 CALL gather_omp(VarIn,Var_tmp)
516 !$OMP MASTER
517 CALL gather_mpi(Var_tmp,VarOut)
518 !$OMP END MASTER
519
520 END SUBROUTINE gather_i2
521
522
523 SUBROUTINE gather_i3(VarIn, VarOut)
524 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
525 IMPLICIT NONE
526
527 INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
528 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
529
530 INTEGER, DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
531
532 CALL gather_omp(VarIn,Var_tmp)
533 !$OMP MASTER
534 CALL gather_mpi(Var_tmp,VarOut)
535 !$OMP END MASTER
536
537 END SUBROUTINE gather_i3
538
539
540 !!!!! --> Les reels
541
542
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 4 times.
4 SUBROUTINE gather_r(VarIn, VarOut)
543 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
544 IMPLICIT NONE
545
546 REAL,INTENT(IN),DIMENSION(:) :: VarIn
547 REAL,INTENT(OUT),DIMENSION(:) :: VarOut
548
549 8 REAL, DIMENSION(klon_mpi) :: Var_tmp
550
551 4 CALL gather_omp(VarIn,Var_tmp)
552 !$OMP MASTER
553 4 CALL gather_mpi(Var_tmp,VarOut)
554 !$OMP END MASTER
555
556 4 END SUBROUTINE gather_r
557
558
559
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 214 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 214 times.
214 SUBROUTINE gather_r1(VarIn, VarOut)
560 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
561 IMPLICIT NONE
562
563 REAL,INTENT(IN),DIMENSION(:,:) :: VarIn
564 REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
565
566 428 REAL, DIMENSION(klon_mpi,SIZE(VarIn,2)) :: Var_tmp
567
568 214 CALL gather_omp(VarIn,Var_tmp)
569 !$OMP MASTER
570 214 CALL gather_mpi(Var_tmp,VarOut)
571 !$OMP END MASTER
572
573 214 END SUBROUTINE gather_r1
574
575
576 SUBROUTINE gather_r2(VarIn, VarOut)
577 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
578 IMPLICIT NONE
579
580 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
581 REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
582
583 REAL, DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
584
585 CALL gather_omp(VarIn,Var_tmp)
586 !$OMP MASTER
587 CALL gather_mpi(Var_tmp,VarOut)
588 !$OMP END MASTER
589
590 END SUBROUTINE gather_r2
591
592
593 SUBROUTINE gather_r3(VarIn, VarOut)
594 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
595 IMPLICIT NONE
596
597 REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
598 REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
599
600 REAL, DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
601
602 CALL gather_omp(VarIn,Var_tmp)
603 !$OMP MASTER
604 CALL gather_mpi(Var_tmp,VarOut)
605 !$OMP END MASTER
606
607 END SUBROUTINE gather_r3
608
609
610 !!!!! --> Les booleens
611
612 SUBROUTINE gather_l(VarIn, VarOut)
613 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
614 IMPLICIT NONE
615
616 LOGICAL,INTENT(IN),DIMENSION(:) :: VarIn
617 LOGICAL,INTENT(OUT),DIMENSION(:) :: VarOut
618
619 LOGICAL, DIMENSION(klon_mpi) :: Var_tmp
620
621 CALL gather_omp(VarIn,Var_tmp)
622 !$OMP MASTER
623 CALL gather_mpi(Var_tmp,VarOut)
624 !$OMP END MASTER
625
626 END SUBROUTINE gather_l
627
628
629 SUBROUTINE gather_l1(VarIn, VarOut)
630 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
631 IMPLICIT NONE
632
633 LOGICAL,INTENT(IN),DIMENSION(:,:) :: VarIn
634 LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
635
636 LOGICAL, DIMENSION(klon_mpi,SIZE(VarIn,2)) :: Var_tmp
637
638 CALL gather_omp(VarIn,Var_tmp)
639 !$OMP MASTER
640 CALL gather_mpi(Var_tmp,VarOut)
641 !$OMP END MASTER
642
643 END SUBROUTINE gather_l1
644
645
646 SUBROUTINE gather_l2(VarIn, VarOut)
647 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
648 IMPLICIT NONE
649
650 LOGICAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
651 LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
652
653 LOGICAL, DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
654
655 CALL gather_omp(VarIn,Var_tmp)
656 !$OMP MASTER
657 CALL gather_mpi(Var_tmp,VarOut)
658 !$OMP END MASTER
659
660 END SUBROUTINE gather_l2
661
662
663 SUBROUTINE gather_l3(VarIn, VarOut)
664 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
665 IMPLICIT NONE
666
667 LOGICAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
668 LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
669
670 LOGICAL, DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
671
672 CALL gather_omp(VarIn,Var_tmp)
673 !$OMP MASTER
674 CALL gather_mpi(Var_tmp,VarOut)
675 !$OMP END MASTER
676
677 END SUBROUTINE gather_l3
678
679
680 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
681 !! Definition des Scatter2D --> 4D !!
682 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
683
684
685 !!!!! --> Les entiers
686
687 SUBROUTINE scatter2D_i(VarIn, VarOut)
688 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
689 IMPLICIT NONE
690
691 INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
692 INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
693
694 INTEGER,DIMENSION(klon_mpi) :: Var_tmp
695
696 !$OMP MASTER
697 CALL scatter2D_mpi(VarIn,Var_tmp)
698 !$OMP END MASTER
699 CALL scatter_omp(Var_tmp,VarOut)
700
701 END SUBROUTINE scatter2D_i
702
703
704 SUBROUTINE scatter2D_i1(VarIn, VarOut)
705 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
706 IMPLICIT NONE
707
708 INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
709 INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
710
711 INTEGER,DIMENSION(klon_mpi,SIZE(VarOut,2)) :: Var_tmp
712
713 !$OMP MASTER
714 CALL scatter2D_mpi(VarIn,Var_tmp)
715 !$OMP END MASTER
716 CALL scatter_omp(Var_tmp,VarOut)
717
718 END SUBROUTINE scatter2D_i1
719
720
721 SUBROUTINE scatter2D_i2(VarIn, VarOut)
722 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
723 IMPLICIT NONE
724
725 INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
726 INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
727
728 INTEGER,DIMENSION(klon_mpi,SIZE(VarOut,2),SIZE(VarOut,3)) :: Var_tmp
729
730 !$OMP MASTER
731 CALL scatter2D_mpi(VarIn,Var_tmp)
732 !$OMP END MASTER
733 CALL scatter_omp(Var_tmp,VarOut)
734
735 END SUBROUTINE scatter2D_i2
736
737
738 SUBROUTINE scatter2D_i3(VarIn, VarOut)
739 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
740 IMPLICIT NONE
741
742 INTEGER,INTENT(IN),DIMENSION(:,:,:,:,:) :: VarIn
743 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
744
745 INTEGER,DIMENSION(klon_mpi,SIZE(VarOut,2),SIZE(VarOut,3),SIZE(VarOut,4)) :: Var_tmp
746
747 !$OMP MASTER
748 CALL scatter2D_mpi(VarIn,Var_tmp)
749 !$OMP END MASTER
750 CALL scatter_omp(Var_tmp,VarOut)
751
752 END SUBROUTINE scatter2D_i3
753
754
755 !!!!! --> Les reels
756
757 SUBROUTINE scatter2D_r(VarIn, VarOut)
758 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
759 IMPLICIT NONE
760
761 REAL,INTENT(IN),DIMENSION(:,:) :: VarIn
762 REAL,INTENT(OUT),DIMENSION(:) :: VarOut
763
764 REAL,DIMENSION(klon_mpi) :: Var_tmp
765
766 !$OMP MASTER
767 CALL scatter2D_mpi(VarIn,Var_tmp)
768 !$OMP END MASTER
769 CALL scatter_omp(Var_tmp,VarOut)
770
771 END SUBROUTINE scatter2D_r
772
773
774 SUBROUTINE scatter2D_r1(VarIn, VarOut)
775 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
776 IMPLICIT NONE
777
778 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
779 REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
780
781 REAL,DIMENSION(klon_mpi,SIZE(VarOut,2)) :: Var_tmp
782
783 !$OMP MASTER
784 CALL scatter2D_mpi(VarIn,Var_tmp)
785 !$OMP END MASTER
786 CALL scatter_omp(Var_tmp,VarOut)
787
788 END SUBROUTINE scatter2D_r1
789
790
791 SUBROUTINE scatter2D_r2(VarIn, VarOut)
792 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
793 IMPLICIT NONE
794
795 REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
796 REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
797
798 REAL,DIMENSION(klon_mpi,SIZE(VarOut,2),SIZE(VarOut,3)) :: Var_tmp
799
800 !$OMP MASTER
801 CALL scatter2D_mpi(VarIn,Var_tmp)
802 !$OMP END MASTER
803 CALL scatter_omp(Var_tmp,VarOut)
804
805 END SUBROUTINE scatter2D_r2
806
807
808 SUBROUTINE scatter2D_r3(VarIn, VarOut)
809 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
810 IMPLICIT NONE
811
812 REAL,INTENT(IN),DIMENSION(:,:,:,:,:) :: VarIn
813 REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
814
815 REAL,DIMENSION(klon_mpi,SIZE(VarOut,2),SIZE(VarOut,3),SIZE(VarOut,4)) :: Var_tmp
816
817 !$OMP MASTER
818 CALL scatter2D_mpi(VarIn,Var_tmp)
819 !$OMP END MASTER
820 CALL scatter_omp(Var_tmp,VarOut)
821
822 END SUBROUTINE scatter2D_r3
823
824
825 !!!!! --> Les booleens
826
827
828 SUBROUTINE scatter2D_l(VarIn, VarOut)
829 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
830 IMPLICIT NONE
831
832 LOGICAL,INTENT(IN),DIMENSION(:,:) :: VarIn
833 LOGICAL,INTENT(OUT),DIMENSION(:) :: VarOut
834
835 LOGICAL,DIMENSION(klon_mpi) :: Var_tmp
836
837 !$OMP MASTER
838 CALL scatter2D_mpi(VarIn,Var_tmp)
839 !$OMP END MASTER
840 CALL scatter_omp(Var_tmp,VarOut)
841
842 END SUBROUTINE scatter2D_l
843
844
845 SUBROUTINE scatter2D_l1(VarIn, VarOut)
846 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
847 IMPLICIT NONE
848
849 LOGICAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
850 LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
851
852 LOGICAL,DIMENSION(klon_mpi,SIZE(VarOut,2)) :: Var_tmp
853
854 !$OMP MASTER
855 CALL scatter2D_mpi(VarIn,Var_tmp)
856 !$OMP END MASTER
857 CALL scatter_omp(Var_tmp,VarOut)
858
859 END SUBROUTINE scatter2D_l1
860
861
862 SUBROUTINE scatter2D_l2(VarIn, VarOut)
863 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
864 IMPLICIT NONE
865
866 LOGICAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
867 LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
868
869 LOGICAL,DIMENSION(klon_mpi,SIZE(VarOut,2),SIZE(VarOut,3)) :: Var_tmp
870
871 !$OMP MASTER
872 CALL scatter2D_mpi(VarIn,Var_tmp)
873 !$OMP END MASTER
874 CALL scatter_omp(Var_tmp,VarOut)
875
876 END SUBROUTINE scatter2D_l2
877
878
879 SUBROUTINE scatter2D_l3(VarIn, VarOut)
880 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
881 IMPLICIT NONE
882
883 LOGICAL,INTENT(IN),DIMENSION(:,:,:,:,:) :: VarIn
884 LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
885
886 LOGICAL,DIMENSION(klon_mpi,SIZE(VarOut,2),SIZE(VarOut,3),SIZE(VarOut,4)) :: Var_tmp
887
888 !$OMP MASTER
889 CALL scatter2D_mpi(VarIn,Var_tmp)
890 !$OMP END MASTER
891 CALL scatter_omp(Var_tmp,VarOut)
892
893 END SUBROUTINE scatter2D_l3
894
895
896 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
897 !! Definition des Gather2D --> 4D !!
898 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
899
900 !!!!! --> Les entiers
901
902 SUBROUTINE gather2D_i(VarIn, VarOut)
903 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
904 IMPLICIT NONE
905
906 INTEGER,INTENT(IN),DIMENSION(:) :: VarIn
907 INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
908
909 INTEGER,DIMENSION(klon_mpi) :: Var_tmp
910
911 CALL gather_omp(VarIn,Var_tmp)
912 !$OMP MASTER
913 CALL gather2D_mpi(Var_tmp,VarOut)
914 !$OMP END MASTER
915
916 END SUBROUTINE gather2D_i
917
918
919 SUBROUTINE gather2D_i1(VarIn, VarOut)
920 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
921 IMPLICIT NONE
922
923 INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
924 INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
925
926 INTEGER,DIMENSION(klon_mpi,SIZE(VarIn,2)) :: Var_tmp
927
928 CALL gather_omp(VarIn,Var_tmp)
929 !$OMP MASTER
930 CALL gather2D_mpi(Var_tmp,VarOut)
931 !$OMP END MASTER
932
933 END SUBROUTINE gather2D_i1
934
935
936 SUBROUTINE gather2D_i2(VarIn, VarOut)
937 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
938 IMPLICIT NONE
939
940 INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
941 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
942
943 INTEGER,DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
944
945 CALL gather_omp(VarIn,Var_tmp)
946 !$OMP MASTER
947 CALL gather2D_mpi(Var_tmp,VarOut)
948 !$OMP END MASTER
949
950 END SUBROUTINE gather2D_i2
951
952
953 SUBROUTINE gather2D_i3(VarIn, VarOut)
954 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
955 IMPLICIT NONE
956
957 INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
958 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
959
960 INTEGER,DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
961
962 CALL gather_omp(VarIn,Var_tmp)
963 !$OMP MASTER
964 CALL gather2D_mpi(Var_tmp,VarOut)
965 !$OMP END MASTER
966
967 END SUBROUTINE gather2D_i3
968
969
970 !!!!! --> Les reels
971
972 SUBROUTINE gather2D_r(VarIn, VarOut)
973 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
974 IMPLICIT NONE
975
976 REAL,INTENT(IN),DIMENSION(:) :: VarIn
977 REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
978
979 REAL,DIMENSION(klon_mpi) :: Var_tmp
980
981 CALL gather_omp(VarIn,Var_tmp)
982 !$OMP MASTER
983 CALL gather2D_mpi(Var_tmp,VarOut)
984 !$OMP END MASTER
985
986 END SUBROUTINE gather2D_r
987
988
989 SUBROUTINE gather2D_r1(VarIn, VarOut)
990 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
991 IMPLICIT NONE
992
993 REAL,INTENT(IN),DIMENSION(:,:) :: VarIn
994 REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
995
996 REAL,DIMENSION(klon_mpi,SIZE(VarIn,2)) :: Var_tmp
997
998 CALL gather_omp(VarIn,Var_tmp)
999 !$OMP MASTER
1000 CALL gather2D_mpi(Var_tmp,VarOut)
1001 !$OMP END MASTER
1002
1003 END SUBROUTINE gather2D_r1
1004
1005
1006 SUBROUTINE gather2D_r2(VarIn, VarOut)
1007 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
1008 IMPLICIT NONE
1009
1010 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
1011 REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
1012
1013 REAL,DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
1014
1015 CALL gather_omp(VarIn,Var_tmp)
1016 !$OMP MASTER
1017 CALL gather2D_mpi(Var_tmp,VarOut)
1018 !$OMP END MASTER
1019
1020 END SUBROUTINE gather2D_r2
1021
1022
1023 SUBROUTINE gather2D_r3(VarIn, VarOut)
1024 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
1025 IMPLICIT NONE
1026
1027 REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
1028 REAL,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
1029
1030 REAL,DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
1031
1032 CALL gather_omp(VarIn,Var_tmp)
1033 !$OMP MASTER
1034 CALL gather2D_mpi(Var_tmp,VarOut)
1035 !$OMP END MASTER
1036
1037 END SUBROUTINE gather2D_r3
1038
1039
1040 !!!!! --> Les booleens
1041
1042 SUBROUTINE gather2D_l(VarIn, VarOut)
1043 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
1044 IMPLICIT NONE
1045
1046 LOGICAL,INTENT(IN),DIMENSION(:) :: VarIn
1047 LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
1048
1049 LOGICAL,DIMENSION(klon_mpi) :: Var_tmp
1050
1051 CALL gather_omp(VarIn,Var_tmp)
1052 !$OMP MASTER
1053 CALL gather2D_mpi(Var_tmp,VarOut)
1054 !$OMP END MASTER
1055
1056 END SUBROUTINE gather2D_l
1057
1058
1059 SUBROUTINE gather2D_l1(VarIn, VarOut)
1060 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
1061 IMPLICIT NONE
1062
1063 LOGICAL,INTENT(IN),DIMENSION(:,:) :: VarIn
1064 LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
1065
1066 LOGICAL,DIMENSION(klon_mpi,SIZE(VarIn,2)) :: Var_tmp
1067
1068 CALL gather_omp(VarIn,Var_tmp)
1069 !$OMP MASTER
1070 CALL gather2D_mpi(Var_tmp,VarOut)
1071 !$OMP END MASTER
1072
1073 END SUBROUTINE gather2D_l1
1074
1075
1076 SUBROUTINE gather2D_l2(VarIn, VarOut)
1077 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
1078 IMPLICIT NONE
1079
1080 LOGICAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
1081 LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
1082
1083 LOGICAL,DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
1084
1085 CALL gather_omp(VarIn,Var_tmp)
1086 !$OMP MASTER
1087 CALL gather2D_mpi(Var_tmp,VarOut)
1088 !$OMP END MASTER
1089
1090 END SUBROUTINE gather2D_l2
1091
1092
1093 SUBROUTINE gather2D_l3(VarIn, VarOut)
1094 USE mod_phys_lmdz_mpi_data, ONLY : klon_mpi
1095 IMPLICIT NONE
1096
1097 LOGICAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
1098 LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
1099
1100 LOGICAL,DIMENSION(klon_mpi,SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
1101
1102 CALL gather_omp(VarIn,Var_tmp)
1103 !$OMP MASTER
1104 CALL gather2D_mpi(Var_tmp,VarOut)
1105 !$OMP END MASTER
1106
1107 END SUBROUTINE gather2D_l3
1108
1109
1110 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1111 !! Definition des reduce_sum --> 4D !!
1112 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1113
1114 ! Les entiers
1115
1116 2 SUBROUTINE reduce_sum_i(VarIn, VarOut)
1117 IMPLICIT NONE
1118
1119 INTEGER,INTENT(IN) :: VarIn
1120 INTEGER,INTENT(OUT) :: VarOut
1121
1122 INTEGER :: Var_tmp
1123
1124 2 CALL reduce_sum_omp(VarIn,Var_tmp)
1125 !$OMP MASTER
1126 2 CALL reduce_sum_mpi(Var_tmp,VarOut)
1127 !$OMP END MASTER
1128
1129 2 END SUBROUTINE reduce_sum_i
1130
1131
1132 SUBROUTINE reduce_sum_i1(VarIn, VarOut)
1133 IMPLICIT NONE
1134
1135 INTEGER,INTENT(IN),DIMENSION(:) :: VarIn
1136 INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
1137
1138 INTEGER,DIMENSION(SIZE(VarIn)) :: Var_tmp
1139
1140 CALL reduce_sum_omp(VarIn,Var_tmp)
1141 !$OMP MASTER
1142 CALL reduce_sum_mpi(Var_tmp,VarOut)
1143 !$OMP END MASTER
1144
1145 END SUBROUTINE reduce_sum_i1
1146
1147
1148 SUBROUTINE reduce_sum_i2(VarIn, VarOut)
1149 IMPLICIT NONE
1150
1151 INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
1152 INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
1153
1154 INTEGER,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2)) :: Var_tmp
1155
1156 CALL reduce_sum_omp(VarIn,Var_tmp)
1157 !$OMP MASTER
1158 CALL reduce_sum_mpi(Var_tmp,VarOut)
1159 !$OMP END MASTER
1160
1161 END SUBROUTINE reduce_sum_i2
1162
1163
1164 SUBROUTINE reduce_sum_i3(VarIn, VarOut)
1165 IMPLICIT NONE
1166
1167 INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
1168 INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
1169
1170 INTEGER,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
1171
1172 CALL reduce_sum_omp(VarIn,Var_tmp)
1173 !$OMP MASTER
1174 CALL reduce_sum_mpi(Var_tmp,VarOut)
1175 !$OMP END MASTER
1176
1177 END SUBROUTINE reduce_sum_i3
1178
1179
1180 SUBROUTINE reduce_sum_i4(VarIn, VarOut)
1181 IMPLICIT NONE
1182
1183 INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
1184 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
1185
1186 INTEGER,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
1187
1188 CALL reduce_sum_omp(VarIn,Var_tmp)
1189 !$OMP MASTER
1190 CALL reduce_sum_mpi(Var_tmp,VarOut)
1191 !$OMP END MASTER
1192
1193 END SUBROUTINE reduce_sum_i4
1194
1195
1196 ! Les reels
1197
1198 SUBROUTINE reduce_sum_r(VarIn, VarOut)
1199 IMPLICIT NONE
1200
1201 REAL,INTENT(IN) :: VarIn
1202 REAL,INTENT(OUT) :: VarOut
1203
1204 REAL :: Var_tmp
1205
1206 CALL reduce_sum_omp(VarIn,Var_tmp)
1207 !$OMP MASTER
1208 CALL reduce_sum_mpi(Var_tmp,VarOut)
1209 !$OMP END MASTER
1210
1211 END SUBROUTINE reduce_sum_r
1212
1213
1214 SUBROUTINE reduce_sum_r1(VarIn, VarOut)
1215 IMPLICIT NONE
1216
1217 REAL,INTENT(IN),DIMENSION(:) :: VarIn
1218 REAL,INTENT(OUT),DIMENSION(:) :: VarOut
1219
1220 REAL,DIMENSION(SIZE(VarIn)) :: Var_tmp
1221
1222 CALL reduce_sum_omp(VarIn,Var_tmp)
1223 !$OMP MASTER
1224 CALL reduce_sum_mpi(Var_tmp,VarOut)
1225 !$OMP END MASTER
1226
1227 END SUBROUTINE reduce_sum_r1
1228
1229
1230 SUBROUTINE reduce_sum_r2(VarIn, VarOut)
1231 IMPLICIT NONE
1232
1233 REAL,INTENT(IN),DIMENSION(:,:) :: VarIn
1234 REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
1235
1236 REAL,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2)) :: Var_tmp
1237
1238 CALL reduce_sum_omp(VarIn,Var_tmp)
1239 !$OMP MASTER
1240 CALL reduce_sum_mpi(Var_tmp,VarOut)
1241 !$OMP END MASTER
1242
1243 END SUBROUTINE reduce_sum_r2
1244
1245
1246 SUBROUTINE reduce_sum_r3(VarIn, VarOut)
1247 IMPLICIT NONE
1248
1249 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
1250 REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
1251
1252 REAL,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
1253
1254 CALL reduce_sum_omp(VarIn,Var_tmp)
1255 !$OMP MASTER
1256 CALL reduce_sum_mpi(Var_tmp,VarOut)
1257 !$OMP END MASTER
1258
1259 END SUBROUTINE reduce_sum_r3
1260
1261
1262 SUBROUTINE reduce_sum_r4(VarIn, VarOut)
1263 IMPLICIT NONE
1264
1265 REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
1266 REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
1267
1268 REAL,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
1269
1270 CALL reduce_sum_omp(VarIn,Var_tmp)
1271 !$OMP MASTER
1272 CALL reduce_sum_mpi(Var_tmp,VarOut)
1273 !$OMP END MASTER
1274
1275 END SUBROUTINE reduce_sum_r4
1276
1277
1278 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1279 !! Definition des reduce_min --> 4D !!
1280 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1281
1282 ! Les entiers
1283
1284 SUBROUTINE reduce_min_i(VarIn, VarOut)
1285 IMPLICIT NONE
1286
1287 INTEGER,INTENT(IN) :: VarIn
1288 INTEGER,INTENT(OUT) :: VarOut
1289
1290 INTEGER :: Var_tmp
1291
1292 CALL reduce_min_omp(VarIn,Var_tmp)
1293 !$OMP MASTER
1294 CALL reduce_min_mpi(Var_tmp,VarOut)
1295 !$OMP END MASTER
1296
1297 END SUBROUTINE reduce_min_i
1298
1299
1300 SUBROUTINE reduce_min_i1(VarIn, VarOut)
1301 IMPLICIT NONE
1302
1303 INTEGER,INTENT(IN),DIMENSION(:) :: VarIn
1304 INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
1305
1306 INTEGER,DIMENSION(SIZE(VarIn)) :: Var_tmp
1307
1308 CALL reduce_min_omp(VarIn,Var_tmp)
1309 !$OMP MASTER
1310 CALL reduce_min_mpi(Var_tmp,VarOut)
1311 !$OMP END MASTER
1312
1313 END SUBROUTINE reduce_min_i1
1314
1315
1316 SUBROUTINE reduce_min_i2(VarIn, VarOut)
1317 IMPLICIT NONE
1318
1319 INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
1320 INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
1321
1322 INTEGER,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2)) :: Var_tmp
1323
1324 CALL reduce_min_omp(VarIn,Var_tmp)
1325 !$OMP MASTER
1326 CALL reduce_min_mpi(Var_tmp,VarOut)
1327 !$OMP END MASTER
1328
1329 END SUBROUTINE reduce_min_i2
1330
1331
1332 SUBROUTINE reduce_min_i3(VarIn, VarOut)
1333 IMPLICIT NONE
1334
1335 INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
1336 INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
1337
1338 INTEGER,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
1339
1340 CALL reduce_min_omp(VarIn,Var_tmp)
1341 !$OMP MASTER
1342 CALL reduce_min_mpi(Var_tmp,VarOut)
1343 !$OMP END MASTER
1344
1345 END SUBROUTINE reduce_min_i3
1346
1347
1348 SUBROUTINE reduce_min_i4(VarIn, VarOut)
1349 IMPLICIT NONE
1350
1351 INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
1352 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
1353
1354 INTEGER,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
1355
1356 CALL reduce_min_omp(VarIn,Var_tmp)
1357 !$OMP MASTER
1358 CALL reduce_min_mpi(Var_tmp,VarOut)
1359 !$OMP END MASTER
1360
1361 END SUBROUTINE reduce_min_i4
1362
1363
1364 ! Les reels
1365
1366 1 SUBROUTINE reduce_min_r(VarIn, VarOut)
1367 IMPLICIT NONE
1368
1369 REAL,INTENT(IN) :: VarIn
1370 REAL,INTENT(OUT) :: VarOut
1371
1372 REAL :: Var_tmp
1373
1374 1 CALL reduce_min_omp(VarIn,Var_tmp)
1375 !$OMP MASTER
1376 1 CALL reduce_min_mpi(Var_tmp,VarOut)
1377 !$OMP END MASTER
1378
1379 1 END SUBROUTINE reduce_min_r
1380
1381
1382 SUBROUTINE reduce_min_r1(VarIn, VarOut)
1383 IMPLICIT NONE
1384
1385 REAL,INTENT(IN),DIMENSION(:) :: VarIn
1386 REAL,INTENT(OUT),DIMENSION(:) :: VarOut
1387
1388 REAL,DIMENSION(SIZE(VarIn)) :: Var_tmp
1389
1390 CALL reduce_min_omp(VarIn,Var_tmp)
1391 !$OMP MASTER
1392 CALL reduce_min_mpi(Var_tmp,VarOut)
1393 !$OMP END MASTER
1394
1395 END SUBROUTINE reduce_min_r1
1396
1397
1398 SUBROUTINE reduce_min_r2(VarIn, VarOut)
1399 IMPLICIT NONE
1400
1401 REAL,INTENT(IN),DIMENSION(:,:) :: VarIn
1402 REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
1403
1404 REAL,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2)) :: Var_tmp
1405
1406 CALL reduce_min_omp(VarIn,Var_tmp)
1407 !$OMP MASTER
1408 CALL reduce_min_mpi(Var_tmp,VarOut)
1409 !$OMP END MASTER
1410
1411 END SUBROUTINE reduce_min_r2
1412
1413
1414 SUBROUTINE reduce_min_r3(VarIn, VarOut)
1415 IMPLICIT NONE
1416
1417 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
1418 REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
1419
1420 REAL,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3)) :: Var_tmp
1421
1422 CALL reduce_min_omp(VarIn,Var_tmp)
1423 !$OMP MASTER
1424 CALL reduce_min_mpi(Var_tmp,VarOut)
1425 !$OMP END MASTER
1426
1427 END SUBROUTINE reduce_min_r3
1428
1429
1430 SUBROUTINE reduce_min_r4(VarIn, VarOut)
1431 IMPLICIT NONE
1432
1433 REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
1434 REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
1435
1436 REAL,DIMENSION(SIZE(VarIn,1),SIZE(VarIn,2),SIZE(VarIn,3),SIZE(VarIn,4)) :: Var_tmp
1437
1438 CALL reduce_min_omp(VarIn,Var_tmp)
1439 !$OMP MASTER
1440 CALL reduce_min_mpi(Var_tmp,VarOut)
1441 !$OMP END MASTER
1442
1443 END SUBROUTINE reduce_min_r4
1444
1445
1446
1447 END MODULE mod_phys_lmdz_transfert_para
1448
1449