41 use mpi_f08,
only : mpi_comm
43 use,
intrinsic :: iso_c_binding
60 integer,
allocatable :: lglel(:)
63 generic :: init => init_coef, init_msh_xh, init_params
92 offset_el, gdim, timeout_seconds)
94 integer,
intent(in) :: nelv, lx, ly, lz, glb_nelv, offset_el, gdim
95 integer,
intent(in),
optional :: timeout_seconds
97 integer :: npts, timeout
101 if (
present(timeout_seconds))
then
102 timeout = timeout_seconds
109 call fortran_adios2_initialize(npts, nelv, offset_el, glb_nelv, gdim, &
113 call neko_warning(
'Is not being built with ADIOS2 support.')
114 call neko_warning(
'Not able to use stream/compression functionality')
126 call fortran_adios2_finalize()
129 call neko_warning(
'Is not being built with ADIOS2 support.')
130 call neko_warning(
'Not able to use stream/compression functionality')
139 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
143 call fortran_adios2_stream(fld)
146 call neko_warning(
'Is not being built with ADIOS2 support.')
147 call neko_warning(
'Not able to use stream/compression functionality')
156 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
160 call fortran_adios2_recieve(fld)
163 call neko_warning(
'Is not being built with ADIOS2 support.')
164 call neko_warning(
'Not able to use stream/compression functionality')
178 type(
coef_t),
intent(inout) :: coef
179 integer,
intent(in),
optional :: timeout_seconds
181 call this%init_msh_Xh(coef%msh, coef%Xh, timeout_seconds)
193 type(
mesh_t),
intent(in) :: msh
194 type(
space_t),
intent(in) :: xh
195 integer,
intent(in),
optional :: timeout_seconds
197 call this%init_params(msh%nelv, xh%lx, xh%ly, xh%lz, msh%glb_nelv, &
198 msh%offset_el, msh%gdim, timeout_seconds)
214 subroutine fortran_adios2_initialize(npts, nelv, nelb, nelgv, gdim, &
216 use,
intrinsic :: iso_c_binding
218 integer,
intent(in) :: npts, nelv, nelb, nelgv, gdim
219 integer,
intent(in) :: timeout
220 type(mpi_comm) :: comm
228 subroutine c_adios2_initialize(npts, nelv, nelb, nelgv, gdim, &
229 comm, timeout)
bind(C, name = "adios2_initialize_")
230 use,
intrinsic :: iso_c_binding
233 integer(kind=C_INT) :: npts
234 integer(kind=C_INT) :: nelv
235 integer(kind=C_INT) :: nelb
236 integer(kind=C_INT) :: nelgv
237 integer(kind=C_INT) :: gdim
239 integer(kind=C_INT) :: timeout
240 end subroutine c_adios2_initialize
243 call c_adios2_initialize(npts, nelv, nelb, nelgv, gdim,
comm, timeout)
244 end subroutine fortran_adios2_initialize
248 subroutine fortran_adios2_finalize()
249 use,
intrinsic :: iso_c_binding
254 subroutine c_adios2_finalize()
bind(C, name = "adios2_finalize_")
255 use,
intrinsic :: iso_c_binding
257 end subroutine c_adios2_finalize
260 call c_adios2_finalize()
261 end subroutine fortran_adios2_finalize
268 subroutine fortran_adios2_stream(fld)
269 use,
intrinsic :: iso_c_binding
271 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
275 subroutine c_adios2_stream(fld) &
276 bind(C, name = "adios2_stream_")
277 use,
intrinsic :: iso_c_binding
280 real(kind=
c_rp),
intent(INOUT) :: fld(*)
281 end subroutine c_adios2_stream
284 call c_adios2_stream(fld)
285 end subroutine fortran_adios2_stream
292 subroutine fortran_adios2_recieve(fld)
293 use,
intrinsic :: iso_c_binding
295 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
299 subroutine c_adios2_recieve(fld) &
300 bind(C, name = "adios2_recieve_")
301 use,
intrinsic :: iso_c_binding
304 real(kind=
c_rp),
intent(INOUT) :: fld(*)
305 end subroutine c_adios2_recieve
308 call c_adios2_recieve(fld)
309 end subroutine fortran_adios2_recieve
type(mpi_comm), public neko_comm
MPI communicator.
Implements type data_streamer_t.
subroutine data_streamer_recieve(this, fld)
reciever
subroutine data_streamer_init_coef(this, coef, timeout_seconds)
Constructor from a coef_t object. Kept for backwards compatibility. Wraps the adios2 set-up.
subroutine data_streamer_stream(this, fld)
streamer
subroutine data_streamer_init_params(this, nelv, lx, ly, lz, glb_nelv, offset_el, gdim, timeout_seconds)
Constructor from parameters.
subroutine data_streamer_init_msh_xh(this, msh, xh, timeout_seconds)
Constructor from a mesh and space.
subroutine data_streamer_free(this)
Destructor wraps the adios2 finalize routine. Closes insitu writer.
integer, parameter, public neko_log_debug
Debug log level.
type(log_t), public neko_log
Global log stream.
integer, parameter, public c_rp
integer, parameter, public rp
Global precision used in computations.
Defines a function space.
subroutine, public neko_warning(warning_msg)
Reports a warning to standard output.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Provides access to data streaming by interfacing with c++ ADIOS2 subroutines.
The function space for the SEM solution fields.