aboutsummaryrefslogtreecommitdiff
path: root/Examples/WaveCaKernel/schedule.ccl
blob: 9dea53bf9764a9cf57733d1ff6ecff6277cb493d (plain)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File produced by Kranc


if (other_timelevels == 1)
{
  STORAGE: xCopy_g[1]
}

if (timelevels == 1)
{
  STORAGE: phi_g[1]
}
if (timelevels == 2)
{
  STORAGE: phi_g[2]
}

if (timelevels == 1)
{
  STORAGE: pi_g[1]
}
if (timelevels == 2)
{
  STORAGE: pi_g[2]
}

if (rhs_timelevels == 1)
{
  STORAGE: phi_grhs[1]
}
if (rhs_timelevels == 2)
{
  STORAGE: phi_grhs[2]
}

if (rhs_timelevels == 1)
{
  STORAGE: pi_grhs[1]
}
if (rhs_timelevels == 2)
{
  STORAGE: pi_grhs[2]
}

schedule WaveCaKernel_Startup at STARTUP
{
  LANG: C
  OPTIONS: meta
} "create banner"

schedule WaveCaKernel_RegisterSymmetries in SymmetryRegister
{
  LANG: C
  OPTIONS: meta
} "register symmetries"

schedule initial_gaussian AT INITIAL
{
  LANG: C
  READS:    grid::x
  WRITES:   WaveCaKernel::phi
  WRITES:   WaveCaKernel::pi
  WRITES:   WaveCaKernel::xCopy
} "initial_gaussian"


if (fdOrder == 2)
{
  schedule CAKERNEL_Launch_calc_rhs_2 as calc_rhs_2 in MoL_CalcRHS
  {
    LANG: C
    TAGS: Device=1
    READS:    WaveCaKernel::phi
    READS:    WaveCaKernel::pi
    WRITES:   WaveCaKernel::phirhs
    WRITES:   WaveCaKernel::pirhs
  } "calc_rhs_2"
}


if (fdOrder == 2)
{
  schedule CAKERNEL_Launch_calc_rhs_2 as calc_rhs_2 at ANALYSIS
  {
    LANG: C
    SYNC: phi_grhs
    SYNC: pi_grhs
    TAGS: Device=1
    READS:    WaveCaKernel::phi
    READS:    WaveCaKernel::pi
    WRITES:   WaveCaKernel::phirhs
    WRITES:   WaveCaKernel::pirhs
  } "calc_rhs_2"
}


if (fdOrder == 4)
{
  schedule CAKERNEL_Launch_calc_rhs_4 as calc_rhs_4 in MoL_CalcRHS
  {
    LANG: C
    TAGS: Device=1
    READS:    WaveCaKernel::phi
    READS:    WaveCaKernel::pi
    WRITES:   WaveCaKernel::phirhs
    WRITES:   WaveCaKernel::pirhs
  } "calc_rhs_4"
}


if (fdOrder == 4)
{
  schedule CAKERNEL_Launch_calc_rhs_4 as calc_rhs_4 at ANALYSIS
  {
    LANG: C
    SYNC: phi_grhs
    SYNC: pi_grhs
    TAGS: Device=1
    READS:    WaveCaKernel::phi
    READS:    WaveCaKernel::pi
    WRITES:   WaveCaKernel::phirhs
    WRITES:   WaveCaKernel::pirhs
  } "calc_rhs_4"
}

schedule CAKERNEL_Launch_calc_bound_rhs as calc_bound_rhs in MoL_RHSBoundaries
{
  LANG: C
  TAGS: Device=1
  READS:    WaveCaKernel::xCopy
  WRITES:   WaveCaKernel::phirhs
  WRITES:   WaveCaKernel::pirhs
} "calc_bound_rhs"

schedule CAKERNEL_Launch_calc_bound_rhs as calc_bound_rhs at ANALYSIS
{
  LANG: C
  SYNC: phi_grhs
  SYNC: pi_grhs
  TAGS: Device=1
  READS:    WaveCaKernel::xCopy
  WRITES:   WaveCaKernel::phirhs
  WRITES:   WaveCaKernel::pirhs
} "calc_bound_rhs"

schedule CAKERNEL_Launch_copy_to_device as copy_to_device at INITIAL after initial_gaussian
{
  LANG: C
  TAGS: Device=1
  READS:    WaveCaKernel::phi
  READS:    WaveCaKernel::pi
  WRITES:   WaveCaKernel::phi
  WRITES:   WaveCaKernel::pi
} "copy_to_device"

schedule WaveCaKernel_SelectBoundConds in MoL_PostStep
{
  LANG: C
  OPTIONS: level
  SYNC: phi_g
  SYNC: pi_g
} "select boundary conditions"

schedule WaveCaKernel_CheckBoundaries at BASEGRID
{
  LANG: C
  OPTIONS: meta
} "check boundaries treatment"

schedule WaveCaKernel_RegisterVars in MoL_Register
{
  LANG: C
  OPTIONS: meta
} "Register Variables for MoL"

schedule WaveCaKernel_Init in CCTK_BASEGRID after Accelerator_SetDevice
{
  LANG: C
  OPTIONS: local
} "Initialize CUDA Device"

schedule group ApplyBCs as WaveCaKernel_ApplyBCs in MoL_PostStep after WaveCaKernel_SelectBoundConds
{
  # no language specified
} "Apply boundary conditions controlled by thorn Boundary"