COSMOS v7.655  COSMOSv7655
(AirShowerMC)
inc_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 ! MPI_IN_PLACE dose not work at KEKB
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 ! if(mpirank .eq. 0) then
35  call mpi_reduce(ng, nga, noofsites,
36  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
37 ! call mpi_reduce(MPI_IN_PLACE, Ng, NoOfSites,
38 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
39 
40  call mpi_reduce(ne, nea, noofsites,
41  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
42 ! call mpi_reduce(MPI_IN_PLACE, Ne, NoOfSites,
43 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
44 
45  call mpi_reduce(nmu, nmua, noofsites,
46  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
47 ! call mpi_reduce(MPI_IN_PLACE, Nmu, NoOfSites,
48 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
49 
50  call mpi_reduce(nhad, nhada, noofsites,
51  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
52 ! call mpi_reduce(MPI_IN_PLACE, Nhad, NoOfSites,
53 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
54 
55  call mpi_reduce(sumeloss, sumelossa, noofsites,
56  * mpi_real8, mpi_sum, 0, mpi_comm_world, icon)
57 ! call mpi_reduce(MPI_IN_PLACE, SumEloss, NoOfSites,
58 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
59 
60 ! else
61 
62 ! call mpi_reduce(Ng, Ng, NoOfSites,
63 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
64 
65 ! call mpi_reduce(Ne, Ne, NoOfSites,
66 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
67 
68 ! call mpi_reduce(Nmu, Nmu, NoOfSites,
69 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
70 
71 ! call mpi_reduce(Nhad, Nhad, NoOfSites,
72 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
73 
74 ! call mpi_reduce(SumEloss, SumEloss, NoOfSites,
75 ! * MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, icon)
76 
77 ! endif
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