Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
!***********************************************************************
!
!
SUBROUTINE tree_build
!
!
!***********************************************************************
!
!
! Main routine to control initialization of the tree structure
! for computing the gravitational interaction.
!
!
!=======================================================================
USE fly_h
implicit none
INCLUDE 'mpif.h'
REAL(KIND=8) :: c0a,c1a,cta,c0b,c1b,ctb
INTEGER:: istatus(MPI_STATUS_SIZE),ind_pe,tag0=0
!=======================================================================
CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)
!-----------------------------------------------------------------------
! FLY: Load bodies into the tree.
!-----------------------------------------------------------------------
c0a=MPI_WTIME()
CALL tree_gen
c1a=MPI_WTIME()
cta=c1a-c0a
ctot_tree(1)=cta
CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)
IF(me.eq.0) THEN
write(uterm,*)"============== TREE_GENERATION ============="
write(uterm,*)"PE ",me," sec =",ctot_tree(1)
write(uterm,*)"================================================"
ENDIF
!-----------------------------------------------------------------------
! Check for grouping cells
!-----------------------------------------------------------------------
c0a=MPI_WTIME()
CALL find_group
c1a=MPI_WTIME()
cta=c1a-c0a
ctot_tree(2)=cta
CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)
IF(me.eq.0) THEN
write(uterm,*)"============== FIND GROUP ============="
write(uterm,*)"PE ",me," sec =",ctot_tree(2)
write(uterm,*)"================================================"
ENDIF
!-----------------------------------------------------------------------
! Compute properties of tree cells.
!-----------------------------------------------------------------------
c0b=MPI_WTIME()
CALL cell_prop
c1b=MPI_WTIME()
ctb=c1b-c0b
ctot_tree(3)=ctb
CALL MPI_BARRIER(MPI_COMM_WORLD,ierror)
IF(me.eq.0) THEN
write(uterm,*)"============== CELL_PROP ============="
write(uterm,*)"PE ",me," sec =",ctot_tree(3)
write(uterm,*)"================================================"
ENDIF
RETURN
END