COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cinc_gatherHyb.f
Go to the documentation of this file.
1 
2  do i = 1, noofassites
3  call mpi_gather(asobssites(i).age, 1, mpi_real8,
4  * ager, 1, mpi_real8, 0, mpi_comm_world, icon)
5  call mpi_gather(asobssites(i).esize, 1, mpi_real8,
6  * esizer, 1, mpi_real8, 0, mpi_comm_world, icon)
7  if(mpirank .eq. 0) then
8  wage = 0.
9  wsize = 0.
10  do j = 1, mpisize
11  wage = wage + ager(j)*esizer(j)
12  wsize = wsize + esizer(j)
13  enddo
14  if(wsize .gt. 0.) then
15  asobssites(i).age =wage/wsize
16  asobssites(i).esize = wsize
17  else
18  asobssites(i).age =0.
19  asobssites(i).esize =0.
20  endif
21  endif
22  enddo
23 
24  if( mpirank .eq. 0 ) then
25  do i = 1, noofsites
26  nga(i) =0.
27  nea(i) =0.
28  nmua(i) = 0.
29  nhada(i) = 0.
30  sumelossa(i) = 0.
31  enddo
32  endif
33 
34  call mpi_reduce(ng, nga, noofsites,
35  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
36 
37  call mpi_reduce(ne, nea, noofsites,
38  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
39 
40  call mpi_reduce(nmu, nmua, noofsites,
41  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
42 
43  call mpi_reduce(nhad, nhada, noofsites,
44  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
45 
46  call mpi_reduce(sumeloss, sumelossa, noofsites,
47  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
others if is ng
Definition: cblkManager.h:9
nodes i
int nmu[nl][nth]
Definition: Zprivate.h:12
int ne[nl][nth]
Definition: Zprivate.h:11
integer mpisize
Definition: Zmpibasic.h:1
integer mpirank
Definition: Zmpibasic.h:1
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36