32 USE spmd_mod
33
34
35
36#include "implicit_f.inc"
37#include "spmd.inc"
38#include "com04_c.inc"
39#include "task_c.inc"
40
41
42
44 . xsec(3,3,nsect),x(3,*)
45 INTEGER (*),WEIGHT(*),ITAB(*)
46
47
48
49#ifdef MPI
50 INTEGER IERROR
52 . xsectmp(3,3,nsect)
53
54 INTEGER I,K1,N1,N2,N3,LEN
55
56 DO i=1,nsect
57 xsectmp(1,1,i)=zero
58 xsectmp(1,2,i)=zero
59 xsectmp(1,3,i)=zero
60
61 xsectmp(2,1,i)=zero
62 xsectmp(2,2,i)=zero
63 xsectmp(2,3,i)=zero
64
65 xsectmp(3,1,i)=zero
66 xsectmp(3,2,i)=zero
67 xsectmp(3,3,i)=zero
68
69 xsec(1,1,i)=zero
70 xsec(1,2,i)=zero
71 xsec(1,3,i)=zero
72
73 xsec(2,1,i)=zero
74 xsec(2,2,i)=zero
75 xsec(2,3,i)=zero
76
77 xsec(3,1,i)=zero
78 xsec(3,2,i)=zero
79 xsec(3,3,i)=zero
80
81 ENDDO
82
83 k1 = 33
84
85 DO i=1,nsect
86 n1 = nstrf(k1+1)
87 n2 = nstrf(k1+2)
88 n3 = nstrf(k1+3)
89 IF (n1>0) THEN
90 IF (weight(n1)==1) THEN
91 xsectmp(1,1,i) = x(1,n1)
92 xsectmp(1,2,i) = x(2,n1)
93 xsectmp(1,3,i) = x(3,n1)
94 ENDIF
95 ENDIF
96
97 IF (n2>0) THEN
98 IF (weight(n2)==1) THEN
99 xsectmp(2,1,i) = x(1,n2)
100 xsectmp(2,2,i) = x(2,n2)
101 xsectmp(2,3,i) = x(3,n2)
102 ENDIF
103 ENDIF
104
105 IF (n3>0) THEN
106 IF (weight(n3)==1) THEN
107 xsectmp(3,1,i) = x(1,n3)
108 xsectmp(3,2,i) = x(2,n3)
109 xsectmp(3,3,i) = x(3,n3)
110 ENDIF
111 ENDIF
112
113 k1= nstrf(k1+22)+2
114 ENDDO
115
116 len = 9*nsect
117
118
120 . real,mpi_sum,it_spmd(1),
121 . spmd_comm_world,ierror)
122
123
124
125
126
127
128
129
130
131
132
133#endif
134 RETURN
subroutine mpi_reduce(sendbuf, recvbuf, cnt, datatype, op, root, comm, ierr)