Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
prgm_lib.F90
Go to the documentation of this file.
1
4 use utils, only : neko_error
5 use, intrinsic :: iso_c_binding, only : c_ptr, c_null_ptr
6 implicit none
7
8#ifdef HAVE_OPENCL
9
11 type(c_ptr), bind(c) :: math_program = c_null_ptr
12
14 type(c_ptr), bind(c) :: mathops_program = c_null_ptr
15
17 type(c_ptr), bind(c) :: dirichlet_program = c_null_ptr
18
20 type(c_ptr), bind(c) :: inflow_program = c_null_ptr
21
23 type(c_ptr), bind(c) :: no_slip_wall_program = c_null_ptr
24
26 type(c_ptr), bind(c) :: symmetry_program = c_null_ptr
27
29 type(c_ptr), bind(c) :: facet_normal_program = c_null_ptr
30
32 type(c_ptr), bind(c) :: inhom_dirichlet_program = c_null_ptr
33
35 type(c_ptr), bind(c) :: dudxyz_program = c_null_ptr
36
38 type(c_ptr), bind(c) :: cdtp_program = c_null_ptr
39
41 type(c_ptr), bind(c) :: conv1_program = c_null_ptr
42
44 type(c_ptr), bind(c) :: cfl_program = c_null_ptr
45
47 type(c_ptr), bind(c) :: opgrad_program = c_null_ptr
48
50 type(c_ptr), bind(c) :: gs_program = c_null_ptr
51
53 type(c_ptr), bind(c) :: ax_helm_program = c_null_ptr
54
56 type(c_ptr), bind(c) :: jacobi_program = c_null_ptr
57
59 type(c_ptr), bind(c) :: rhs_maker_program = c_null_ptr
60
62 type(c_ptr), bind(c) :: pnpn_res_program = c_null_ptr
63
65 type(c_ptr), bind(c) :: fdm_program = c_null_ptr
66
68 type(c_ptr), bind(c) :: tensor_program = c_null_ptr
69
71 type(c_ptr), bind(c) :: schwarz_program = c_null_ptr
72
74 type(c_ptr), bind(c) :: dong_program = c_null_ptr
75
77 type(c_ptr), bind(c) :: coef_program = c_null_ptr
78
80 type(c_ptr), bind(c) :: scalar_residual_program = c_null_ptr
81
83 type(c_ptr), bind(c) :: lambda2_program = c_null_ptr
84
86 type(c_ptr), bind(c) :: filter_program = c_null_ptr
87
88contains
89
91
92 if (c_associated(math_program)) then
94 call neko_error('Failed to release program')
95 end if
96 math_program = c_null_ptr
97 end if
98
99 if (c_associated(mathops_program)) then
101 call neko_error('Failed to release program')
102 end if
103 mathops_program = c_null_ptr
104 end if
105
106 if (c_associated(dirichlet_program)) then
108 call neko_error('Failed to release program')
109 end if
110 dirichlet_program = c_null_ptr
111 end if
112
113 if (c_associated(inflow_program)) then
115 call neko_error('Failed to release program')
116 end if
117 inflow_program = c_null_ptr
118 end if
119
120 if (c_associated(no_slip_wall_program)) then
122 call neko_error('Failed to release program')
123 end if
124 no_slip_wall_program = c_null_ptr
125 end if
126
127 if (c_associated(symmetry_program)) then
129 call neko_error('Failed to release program')
130 end if
131 symmetry_program = c_null_ptr
132 end if
133
134 if (c_associated(facet_normal_program)) then
136 call neko_error('Failed to release program')
137 end if
138 facet_normal_program = c_null_ptr
139 end if
140
141 if (c_associated(inhom_dirichlet_program)) then
143 call neko_error('Failed to release program')
144 end if
145 inhom_dirichlet_program = c_null_ptr
146 end if
147
148 if (c_associated(dudxyz_program)) then
150 call neko_error('Failed to release program')
151 end if
152 dudxyz_program = c_null_ptr
153 end if
154
155 if (c_associated(cdtp_program)) then
157 call neko_error('Failed to release program')
158 end if
159 cdtp_program = c_null_ptr
160 end if
161
162 if (c_associated(conv1_program)) then
164 call neko_error('Failed to release program')
165 end if
166 conv1_program = c_null_ptr
167 end if
168
169 if (c_associated(cfl_program)) then
171 call neko_error('Failed to release program')
172 end if
173 cfl_program = c_null_ptr
174 end if
175
176 if (c_associated(opgrad_program)) then
178 call neko_error('Failed to release program')
179 end if
180 opgrad_program = c_null_ptr
181 end if
182
183 if (c_associated(gs_program)) then
185 call neko_error('Failed to release program')
186 end if
187 gs_program = c_null_ptr
188 end if
189
190 if (c_associated(ax_helm_program)) then
192 call neko_error('Failed to release program')
193 end if
194 ax_helm_program = c_null_ptr
195 end if
196
197 if (c_associated(jacobi_program)) then
199 call neko_error('Failed to release program')
200 end if
201 jacobi_program = c_null_ptr
202 end if
203
204 if (c_associated(rhs_maker_program)) then
206 call neko_error('Failed to release program')
207 end if
208 rhs_maker_program = c_null_ptr
209 end if
210
211 if (c_associated(pnpn_res_program)) then
213 call neko_error('Failed to release program')
214 end if
215 pnpn_res_program = c_null_ptr
216 end if
217
218 if (c_associated(fdm_program)) then
220 call neko_error('Failed to release program')
221 end if
222 fdm_program = c_null_ptr
223 end if
224
225 if (c_associated(tensor_program)) then
227 call neko_error('Failed to release program')
228 end if
229 tensor_program = c_null_ptr
230 end if
231
232 if (c_associated(schwarz_program)) then
234 call neko_error('Failed to release program')
235 end if
236 schwarz_program = c_null_ptr
237 end if
238
239 if (c_associated(dong_program)) then
241 call neko_error('Failed to release program')
242 end if
243 dong_program = c_null_ptr
244 end if
245
246 if (c_associated(coef_program)) then
248 call neko_error('Failed to release program')
249 end if
250 coef_program = c_null_ptr
251 end if
252
253 if (c_associated(scalar_residual_program)) then
255 call neko_error('Failed to release program')
256 end if
257 scalar_residual_program = c_null_ptr
258 end if
259
260 if (c_associated(lambda2_program)) then
262 call neko_error('Failed to release program')
263 end if
264 lambda2_program = c_null_ptr
265 end if
266
267 if (c_associated(filter_program)) then
269 call neko_error('Failed to release program')
270 end if
271 filter_program = c_null_ptr
272 end if
273
274 end subroutine opencl_prgm_lib_release
275
276#endif
277
278end module opencl_prgm_lib
Fortran OpenCL interface.
OpenCL JIT program library.
Definition prgm_lib.F90:2
type(c_ptr), bind(C) scalar_residual_program
Device scalar residual kernels.
Definition prgm_lib.F90:80
type(c_ptr), bind(C) ax_helm_program
Device Ax helm kernels.
Definition prgm_lib.F90:53
type(c_ptr), bind(C) symmetry_program
Device Symmetry kernels.
Definition prgm_lib.F90:26
type(c_ptr), bind(C) cfl_program
Device CFL kernels.
Definition prgm_lib.F90:44
type(c_ptr), bind(C) mathops_program
Device mathops kernels.
Definition prgm_lib.F90:14
type(c_ptr), bind(C) no_slip_wall_program
Device No-slip wall kernels.
Definition prgm_lib.F90:23
type(c_ptr), bind(C) lambda2_program
Device lambda2 kernels.
Definition prgm_lib.F90:83
subroutine opencl_prgm_lib_release
Definition prgm_lib.F90:91
type(c_ptr), bind(C) conv1_program
Device onvective kernels.
Definition prgm_lib.F90:41
type(c_ptr), bind(C) jacobi_program
Device jacobi kernels.
Definition prgm_lib.F90:56
type(c_ptr), bind(C) coef_program
Device coef kernels.
Definition prgm_lib.F90:77
type(c_ptr), bind(C) gs_program
Device Gather-Scatter kernels.
Definition prgm_lib.F90:50
type(c_ptr), bind(C) rhs_maker_program
Device rhs_maker kernels.
Definition prgm_lib.F90:59
type(c_ptr), bind(C) dudxyz_program
Device Derivative kernels.
Definition prgm_lib.F90:35
type(c_ptr), bind(C) cdtp_program
Device kernels.
Definition prgm_lib.F90:38
type(c_ptr), bind(C) facet_normal_program
Device Facet normal kernels.
Definition prgm_lib.F90:29
type(c_ptr), bind(C) schwarz_program
Device schwarz kernels.
Definition prgm_lib.F90:71
type(c_ptr), bind(C) fdm_program
Device fdm kernels.
Definition prgm_lib.F90:65
type(c_ptr), bind(C) dirichlet_program
Device Dirichlet kernels.
Definition prgm_lib.F90:17
type(c_ptr), bind(C) inflow_program
Device Inflow kernels.
Definition prgm_lib.F90:20
type(c_ptr), bind(C) tensor_program
Device tensor kernels.
Definition prgm_lib.F90:68
type(c_ptr), bind(C) opgrad_program
Device Velocity gradient kernels.
Definition prgm_lib.F90:47
type(c_ptr), bind(C) math_program
Device math kernels.
Definition prgm_lib.F90:11
type(c_ptr), bind(C) inhom_dirichlet_program
Device Blasius profile kernel.
Definition prgm_lib.F90:32
type(c_ptr), bind(C) filter_program
Device filter kernels.
Definition prgm_lib.F90:86
type(c_ptr), bind(C) pnpn_res_program
Device pnpn residual kernels.
Definition prgm_lib.F90:62
type(c_ptr), bind(C) dong_program
Device dong kernels.
Definition prgm_lib.F90:74
Utilities.
Definition utils.f90:35