40 use mpi_f08,
only : mpi_comm
42 use,
intrinsic :: iso_c_binding
59 integer,
allocatable :: lglel(:)
82 type(
coef_t),
intent(inout) :: coef
83 integer,
intent(in),
optional :: timeout_seconds
84 integer :: nelb, nelv, nelgv, npts, gdim, timeout
88 npts = coef%Xh%lx*coef%Xh%ly*coef%Xh%lz
89 nelgv = coef%msh%glb_nelv
90 nelb = coef%msh%offset_el
92 if (
present(timeout_seconds))
then
93 timeout = timeout_seconds
100 call fortran_adios2_initialize(npts, nelv, nelb, nelgv, gdim,
neko_comm, &
104 call neko_warning(
'Is not being built with ADIOS2 support.')
105 call neko_warning(
'Not able to use stream/compression functionality')
118 call fortran_adios2_finalize()
121 call neko_warning(
'Is not being built with ADIOS2 support.')
122 call neko_warning(
'Not able to use stream/compression functionality')
131 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
135 call fortran_adios2_stream(fld)
138 call neko_warning(
'Is not being built with ADIOS2 support.')
139 call neko_warning(
'Not able to use stream/compression functionality')
148 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
152 call fortran_adios2_recieve(fld)
155 call neko_warning(
'Is not being built with ADIOS2 support.')
156 call neko_warning(
'Not able to use stream/compression functionality')
174 subroutine fortran_adios2_initialize(npts, nelv, nelb, nelgv, gdim, &
176 use,
intrinsic :: iso_c_binding
178 integer,
intent(in) :: npts, nelv, nelb, nelgv, gdim
179 integer,
intent(in) :: timeout
180 type(mpi_comm) :: comm
188 subroutine c_adios2_initialize(npts, nelv, nelb, nelgv, gdim, &
189 comm, timeout)
bind(C, name = "adios2_initialize_")
190 use,
intrinsic :: iso_c_binding
193 integer(kind=C_INT) :: npts
194 integer(kind=C_INT) :: nelv
195 integer(kind=C_INT) :: nelb
196 integer(kind=C_INT) :: nelgv
197 integer(kind=C_INT) :: gdim
199 integer(kind=C_INT) :: timeout
200 end subroutine c_adios2_initialize
203 call c_adios2_initialize(npts, nelv, nelb, nelgv, gdim,
comm, timeout)
204 end subroutine fortran_adios2_initialize
208 subroutine fortran_adios2_finalize()
209 use,
intrinsic :: iso_c_binding
214 subroutine c_adios2_finalize()
bind(C, name = "adios2_finalize_")
215 use,
intrinsic :: iso_c_binding
217 end subroutine c_adios2_finalize
220 call c_adios2_finalize()
221 end subroutine fortran_adios2_finalize
228 subroutine fortran_adios2_stream(fld)
229 use,
intrinsic :: iso_c_binding
231 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
235 subroutine c_adios2_stream(fld) &
236 bind(C, name = "adios2_stream_")
237 use,
intrinsic :: iso_c_binding
240 real(kind=
c_rp),
intent(INOUT) :: fld(*)
241 end subroutine c_adios2_stream
244 call c_adios2_stream(fld)
245 end subroutine fortran_adios2_stream
252 subroutine fortran_adios2_recieve(fld)
253 use,
intrinsic :: iso_c_binding
255 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
259 subroutine c_adios2_recieve(fld) &
260 bind(C, name = "adios2_recieve_")
261 use,
intrinsic :: iso_c_binding
264 real(kind=
c_rp),
intent(INOUT) :: fld(*)
265 end subroutine c_adios2_recieve
268 call c_adios2_recieve(fld)
269 end subroutine fortran_adios2_recieve
type(mpi_comm), public neko_comm
MPI communicator.
Implements type data_streamer_t.
subroutine data_streamer_init(this, coef, timeout_seconds)
Constructor Wraps the adios2 set-up.
subroutine data_streamer_recieve(this, fld)
reciever
subroutine data_streamer_stream(this, fld)
streamer
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.
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.