35
36
37
38 USE spmd_comm_world_mod, ONLY : spmd_comm_world
40#include "implicit_f.inc"
41
42
43
44#include "spmd.inc"
45
46
47
48#include "com01_c.inc"
49#include "com04_c.inc"
50#include "task_c.inc"
51#include "param_c.inc"
52
53
54
55 TYPE(MONVOL_STRUCT_) :: T_MONVOL(NVOLU)
56 INTEGER ITYPTS, NELTS, FR_MV(NSPMD+2,NVOLU)
58 . dt2, volmon(*)
59
60
61
62#ifdef MPI
63 INTEGER I, J, N, MSGTYP, IERROR, LOC_PROC,
64 . INDEX, MSTOP1, MSTOP2, K1, KK1,
65 . LEN, myop,
66 . STATUS(MPI_STATUS_SIZE)
68 . rbuf(3+nvolu*7), rrbuf(3+nvolu*7)
69 INTEGER :: MY_TYPE
70 INTEGER GLOB_MINV
72
73
74
75
76 loc_proc=ispmd+1
77
78 rrbuf(1) = dt2
79 rrbuf(2) = itypts
80 rrbuf(3) = nelts
81 DO i = 1, nvolu*7
82 rrbuf(3+i) = zero
83 END DO
84 k1 = 1
85 kk1 = 0
86 DO i=1,nvolu
87 IF(fr_mv(nspmd+2,i)==ispmd+1) THEN
88 rrbuf(3+(i-1)*7+1)=volmon(kk1+1)
89 rrbuf(3+(i-1)*7+2)=volmon(kk1+2)
90 rrbuf(3+(i-1)*7+3)=volmon(kk1+5)
91 rrbuf(3+(i-1)*7+4)=volmon(kk1+12)
92 rrbuf(3+(i-1)*7+5)=volmon(kk1+16)
93 rrbuf(3+(i-1)*7+6)=volmon(kk1+18)
94 rrbuf(3+(i-1)*7+7)=volmon(kk1+21)
95 END IF
96 k1 = k1 + nimv
97 kk1 = kk1 + nrvolu
98 END DO
99
100 len = 3+nvolu*7
101
105
107 & spmd_comm_world, ierror)
108
111
112 dt2 = rbuf(1)
113 itypts = rbuf(2)
114 nelts = rbuf(3)
115 k1 = 1
116 kk1 = 0
117 DO i=1,nvolu
118 volmon(kk1+1) =rbuf(3+(i-1)*7+1)
119 volmon(kk1+2) =rbuf(3+(i-1)*7+2)
120 volmon(kk1+5) =rbuf(3+(i-1)*7+3)
121 volmon(kk1+12)=rbuf(3+(i-1)*7+4)
122 volmon(kk1+16)=rbuf(3+(i-1)*7+5)
123 volmon(kk1+18)=rbuf(3+(i-1)*7+6)
124 volmon(kk1+21)=rbuf(3+(i-1)*7+7)
125 t_monvol(i)%pressure = volmon(kk1+12)
126 t_monvol(i)%temperature = volmon(kk1+13)
127 t_monvol(i)%area = volmon(kk1+18)
128
129
130
131
132 k1 = k1 + nimv
133 kk1 = kk1 + nrvolu
134 END DO
135
136#endif
137 RETURN
subroutine glob_minv(rin, rinout, len, type)
subroutine mpi_type_free(newtyp, ierr_mpi)
subroutine mpi_type_contiguous(length, datatype, newtype, ierr_mpi)
subroutine mpi_allreduce(sendbuf, recvbuf, cnt, datatype, operation, comm, ierr)
subroutine mpi_type_commit(newtyp, ierr_mpi)
subroutine mpi_op_create(func, commute, op, ierr)
subroutine mpi_op_free(op, ierr)