35
36
37
38
39
40
41
42
43
44
46 USE spmd_mod
47
48
49
50#include "implicit_f.inc"
51
52
53
54#include "spmd.inc"
55
56
57
58 INTEGER, INTENT(in) :: NB_INTER_SORTED
59 my_real,
dimension(6),
intent(inout) :: box_limit
60
61
62
63 INTEGER :: I
64 REAL(kind=8), dimension(6) :: buffer_s,buffer_r
65#ifdef MPI
66 INTEGER :: ierror
67 INTEGER :: STATUS_(MPI_STATUS_SIZE)
68 CHARACTER(len=4) :: MY_OPERATION
69
70
71
72 DO i=1,3
73 buffer_s(i) = box_limit(i)
74 buffer_s(3+i) = -one * box_limit(3+i)
75 ENDDO
76
77 my_operation(1:4) = ''
78 my_operation(1:3) = "MAX"
79
80 CALL spmd_allreduce(buffer_s,buffer_r,6,spmd_max)
81
82 IF(nb_inter_sorted>0) THEN
83 DO i=1,3
84 box_limit(i) = buffer_r(i)
85 box_limit(3+i) = -one * buffer_r(3+i)
86 ENDDO
87 ENDIF
88
89#endif
90 RETURN