34 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
38 use mpi_f08,
only: mpi_sum, mpi_in_place, mpi_allreduce
46 s12_d, s13_d, s23_d, &
48 bind(c, name =
'hip_s_abs_compute')
49 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
51 type(c_ptr),
value :: s_abs_d, s11_d, s22_d, s33_d, &
52 s12_d, s13_d, s23_d, &
59 l12_d, l13_d, l23_d, &
62 fuu_d, fvv_d, fww_d, &
63 fuv_d, fuw_d, fvw_d, n) &
64 bind(c, name =
'hip_lij_compute_part1')
65 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
67 type(c_ptr),
value :: l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, &
68 u_d, v_d, w_d, fu_d, fv_d, fw_d, &
69 fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d
75 l12_d, l13_d, l23_d, &
76 fuu_d, fvv_d, fww_d, &
77 fuv_d, fuw_d, fvw_d, n) &
78 bind(c, name =
'hip_lij_compute_part2')
79 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
81 type(c_ptr),
value :: l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, &
82 fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d
88 m12_d, m13_d, m23_d, &
89 s_abs_d, s11_d, s22_d, s33_d, &
90 s12_d, s13_d, s23_d, &
91 fs_abs_d, fs11_d, fs22_d, fs33_d, &
92 fs12_d, fs13_d, fs23_d, &
93 fsabss11_d, fsabss22_d, fsabss33_d, &
94 fsabss12_d, fsabss13_d, fsabss23_d, &
96 bind(c, name =
'hip_mij_compute_part1')
97 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
99 type(c_ptr),
value :: m11_d, m22_d, m33_d, &
100 m12_d, m13_d, m23_d, &
101 s_abs_d, s11_d, s22_d, s33_d, &
102 s12_d, s13_d, s23_d, &
103 fs_abs_d, fs11_d, fs22_d, fs33_d, &
104 fs12_d, fs13_d, fs23_d, &
105 fsabss11_d, fsabss22_d, fsabss33_d, &
106 fsabss12_d, fsabss13_d, fsabss23_d
107 real(c_rp) :: delta_ratio2
113 m12_d, m13_d, m23_d, &
114 l11_d, l22_d, l33_d, &
115 l12_d, l13_d, l23_d, &
116 fsabss11_d, fsabss22_d, fsabss33_d, &
117 fsabss12_d, fsabss13_d, fsabss23_d, &
118 num_d, den_d, c_dyn_d, delta_d, &
119 s_abs_d, nut_d, alpha, n) &
120 bind(c, name =
'hip_mij_nut_compute_part2')
121 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
123 type(c_ptr),
value :: m11_d, m22_d, m33_d, &
124 m12_d, m13_d, m23_d, &
125 l11_d, l22_d, l33_d, &
126 l12_d, l13_d, l23_d, &
127 fsabss11_d, fsabss22_d, fsabss33_d, &
128 fsabss12_d, fsabss13_d, fsabss23_d, &
129 num_d, den_d, c_dyn_d, delta_d, s_abs_d, nut_d
137 s12_d, s13_d, s23_d, &
139 bind(c, name =
'cuda_s_abs_compute')
140 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
142 type(c_ptr),
value :: s_abs_d, s11_d, s22_d, s33_d, &
143 s12_d, s13_d, s23_d, &
150 l12_d, l13_d, l23_d, &
153 fuu_d, fvv_d, fww_d, &
154 fuv_d, fuw_d, fvw_d, n) &
155 bind(c, name =
'cuda_lij_compute_part1')
156 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
158 type(c_ptr),
value :: l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, &
159 u_d, v_d, w_d, fu_d, fv_d, fw_d, &
160 fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d
166 l12_d, l13_d, l23_d, &
167 fuu_d, fvv_d, fww_d, &
168 fuv_d, fuw_d, fvw_d, n) &
169 bind(c, name =
'cuda_lij_compute_part2')
170 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
172 type(c_ptr),
value :: l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, &
173 fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d
179 m12_d, m13_d, m23_d, &
180 s_abs_d, s11_d, s22_d, s33_d, &
181 s12_d, s13_d, s23_d, &
182 fs_abs_d, fs11_d, fs22_d, fs33_d, &
183 fs12_d, fs13_d, fs23_d, &
184 fsabss11_d, fsabss22_d, fsabss33_d, &
185 fsabss12_d, fsabss13_d, fsabss23_d, &
187 bind(c, name =
'cuda_mij_compute_part1')
188 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
190 type(c_ptr),
value :: m11_d, m22_d, m33_d, &
191 m12_d, m13_d, m23_d, &
192 s_abs_d, s11_d, s22_d, s33_d, &
193 s12_d, s13_d, s23_d, &
194 fs_abs_d, fs11_d, fs22_d, fs33_d, &
195 fs12_d, fs13_d, fs23_d, &
196 fsabss11_d, fsabss22_d, fsabss33_d, &
197 fsabss12_d, fsabss13_d, fsabss23_d
198 real(c_rp) :: delta_ratio2
204 m12_d, m13_d, m23_d, &
205 l11_d, l22_d, l33_d, &
206 l12_d, l13_d, l23_d, &
207 fsabss11_d, fsabss22_d, fsabss33_d, &
208 fsabss12_d, fsabss13_d, fsabss23_d, &
209 num_d, den_d, c_dyn_d, delta_d, &
210 s_abs_d, nut_d, alpha, n) &
211 bind(c, name =
'cuda_mij_nut_compute_part2')
212 use,
intrinsic :: iso_c_binding, only: c_ptr, c_int
214 type(c_ptr),
value :: m11_d, m22_d, m33_d, &
215 m12_d, m13_d, m23_d, &
216 l11_d, l22_d, l33_d, &
217 l12_d, l13_d, l23_d, &
218 fsabss11_d, fsabss22_d, fsabss33_d, &
219 fsabss12_d, fsabss13_d, fsabss23_d, &
220 num_d, den_d, c_dyn_d, delta_d, s_abs_d, nut_d
235 s12_d, s13_d, s23_d, &
237 type(c_ptr) :: s_abs_d, s11_d, s22_d, s33_d, &
238 s12_d, s13_d, s23_d, &
243 s12_d, s13_d, s23_d, &
247 s12_d, s13_d, s23_d, &
250 call neko_error(
'opencl backend is not supported for device_s_abs_compute')
252 call neko_error(
'no device backend configured')
258 l12_d, l13_d, l23_d, &
261 fuu_d, fvv_d, fww_d, &
262 fuv_d, fuw_d, fvw_d, n)
263 type(c_ptr) :: l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, &
264 u_d, v_d, w_d, fu_d, fv_d, fw_d, &
265 fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d
269 l12_d, l13_d, l23_d, &
272 fuu_d, fvv_d, fww_d, &
273 fuv_d, fuw_d, fvw_d, n)
276 l12_d, l13_d, l23_d, &
279 fuu_d, fvv_d, fww_d, &
280 fuv_d, fuw_d, fvw_d, n)
282 call neko_error(
'opencl backend is not supported &
283 &for device_lij_compute_part1')
285 call neko_error(
'no device backend configured')
291 l12_d, l13_d, l23_d, &
292 fuu_d, fvv_d, fww_d, &
293 fuv_d, fuw_d, fvw_d, n)
294 type(c_ptr) :: l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, &
295 fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d
299 l12_d, l13_d, l23_d, &
300 fuu_d, fvv_d, fww_d, &
301 fuv_d, fuw_d, fvw_d, n)
304 l12_d, l13_d, l23_d, &
305 fuu_d, fvv_d, fww_d, &
306 fuv_d, fuw_d, fvw_d, n)
308 call neko_error(
'opencl backend is not supported &
309 &for device_lij_compute_part2')
311 call neko_error(
'no device backend configured')
317 m12_d, m13_d, m23_d, &
318 s_abs_d, s11_d, s22_d, s33_d, &
319 s12_d, s13_d, s23_d, &
320 fs_abs_d, fs11_d, fs22_d, fs33_d, &
321 fs12_d, fs13_d, fs23_d, &
322 fsabss11_d, fsabss22_d, fsabss33_d, &
323 fsabss12_d, fsabss13_d, fsabss23_d, &
325 type(c_ptr) :: m11_d, m22_d, m33_d, &
326 m12_d, m13_d, m23_d, &
327 s_abs_d, s11_d, s22_d, s33_d, &
328 s12_d, s13_d, s23_d, &
329 fs_abs_d, fs11_d, fs22_d, fs33_d, &
330 fs12_d, fs13_d, fs23_d, &
331 fsabss11_d, fsabss22_d, fsabss33_d, &
332 fsabss12_d, fsabss13_d, fsabss23_d
333 real(kind=
rp) :: delta_ratio2
338 m12_d, m13_d, m23_d, &
339 s_abs_d, s11_d, s22_d, s33_d, &
340 s12_d, s13_d, s23_d, &
341 fs_abs_d, fs11_d, fs22_d, fs33_d, &
342 fs12_d, fs13_d, fs23_d, &
343 fsabss11_d, fsabss22_d, fsabss33_d, &
344 fsabss12_d, fsabss13_d, fsabss23_d, &
348 m12_d, m13_d, m23_d, &
349 s_abs_d, s11_d, s22_d, s33_d, &
350 s12_d, s13_d, s23_d, &
351 fs_abs_d, fs11_d, fs22_d, fs33_d, &
352 fs12_d, fs13_d, fs23_d, &
353 fsabss11_d, fsabss22_d, fsabss33_d, &
354 fsabss12_d, fsabss13_d, fsabss23_d, &
357 call neko_error(
'opencl backend is not supported for &
358 &device_mij_compute_part1')
360 call neko_error(
'no device backend configured')
366 m12_d, m13_d, m23_d, &
367 l11_d, l22_d, l33_d, &
368 l12_d, l13_d, l23_d, &
369 fsabss11_d, fsabss22_d, fsabss33_d, &
370 fsabss12_d, fsabss13_d, fsabss23_d, &
371 num_d, den_d, c_dyn_d, delta_d, &
372 s_abs_d, nut_d, alpha, n)
373 type(c_ptr) :: m11_d, m22_d, m33_d, &
374 m12_d, m13_d, m23_d, &
375 l11_d, l22_d, l33_d, &
376 l12_d, l13_d, l23_d, &
377 fsabss11_d, fsabss22_d, fsabss33_d, &
378 fsabss12_d, fsabss13_d, fsabss23_d, &
379 num_d, den_d, c_dyn_d, delta_d, s_abs_d, nut_d
380 real(kind=
rp) :: alpha
385 m12_d, m13_d, m23_d, &
386 l11_d, l22_d, l33_d, &
387 l12_d, l13_d, l23_d, &
388 fsabss11_d, fsabss22_d, fsabss33_d, &
389 fsabss12_d, fsabss13_d, fsabss23_d, &
390 num_d, den_d, c_dyn_d, delta_d, &
391 s_abs_d, nut_d, alpha, n)
394 m12_d, m13_d, m23_d, &
395 l11_d, l22_d, l33_d, &
396 l12_d, l13_d, l23_d, &
397 fsabss11_d, fsabss22_d, fsabss33_d, &
398 fsabss12_d, fsabss13_d, fsabss23_d, &
399 num_d, den_d, c_dyn_d, delta_d, &
400 s_abs_d, nut_d, alpha, n)
402 call neko_error(
'opencl backend is not supported for &
403 &device_mij_nut_compute_part2')
405 call neko_error(
'no device backend configured')
410end module device_dynamic_smagorinsky_nut
void cuda_mij_compute_part1(void *m11, void *m22, void *m33, void *m12, void *m13, void *m23, void *s_abs, void *s11, void *s22, void *s33, void *s12, void *s13, void *s23, void *fs_abs, void *fs11, void *fs22, void *fs33, void *fs12, void *fs13, void *fs23, void *fsabss11, void *fsabss22, void *fsabss33, void *fsabss12, void *fsabss13, void *fsabss23, real *delta_ratio2, int *n)
void cuda_s_abs_compute(void *s_abs, void *s11, void *s22, void *s33, void *s12, void *s13, void *s23, void *mult, int *n)
void cuda_lij_compute_part1(void *l11, void *l22, void *l33, void *l12, void *l13, void *l23, void *u, void *v, void *w, void *fu, void *fv, void *fw, void *fuu, void *fvv, void *fww, void *fuv, void *fuw, void *fvw, int *n)
void cuda_mij_nut_compute_part2(void *m11, void *m22, void *m33, void *m12, void *m13, void *m23, void *l11, void *l22, void *l33, void *l12, void *l13, void *l23, void *fsabss11, void *fsabss22, void *fsabss33, void *fsabss12, void *fsabss13, void *fsabss23, void *num, void *den, void *c_dyn, void *delta, void *s_abs, void *nut, real *alpha, int *n)
void cuda_lij_compute_part2(void *l11, void *l22, void *l33, void *l12, void *l13, void *l23, void *fuu, void *fvv, void *fww, void *fuv, void *fuw, void *fvw, int *n)
type(mpi_comm) neko_comm
MPI communicator.
type(mpi_datatype) mpi_real_precision
MPI type for working precision of REAL types.
integer pe_size
MPI size of communicator.
subroutine, public device_lij_compute_part1(l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, u_d, v_d, w_d, fu_d, fv_d, fw_d, fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d, n)
part 1 of the computing of the lij field
subroutine, public device_mij_nut_compute_part2(m11_d, m22_d, m33_d, m12_d, m13_d, m23_d, l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, fsabss11_d, fsabss22_d, fsabss33_d, fsabss12_d, fsabss13_d, fsabss23_d, num_d, den_d, c_dyn_d, delta_d, s_abs_d, nut_d, alpha, n)
part 1 of the computing of the mij field
subroutine, public device_mij_compute_part1(m11_d, m22_d, m33_d, m12_d, m13_d, m23_d, s_abs_d, s11_d, s22_d, s33_d, s12_d, s13_d, s23_d, fs_abs_d, fs11_d, fs22_d, fs33_d, fs12_d, fs13_d, fs23_d, fsabss11_d, fsabss22_d, fsabss33_d, fsabss12_d, fsabss13_d, fsabss23_d, delta_ratio2, n)
part 1 of the computing of the mij field
subroutine, public device_s_abs_compute(s_abs_d, s11_d, s22_d, s33_d, s12_d, s13_d, s23_d, mult_d, n)
Compute the s_abs field for the Sigma model indevice.
subroutine, public device_lij_compute_part2(l11_d, l22_d, l33_d, l12_d, l13_d, l23_d, fuu_d, fvv_d, fww_d, fuv_d, fuw_d, fvw_d, n)
part 2 of the computing of the lij field
integer, parameter, public c_rp
integer, parameter, public rp
Global precision used in computations.