40 use mpi_f08,
only : mpi_comm
41 use,
intrinsic :: iso_c_binding
58 integer,
allocatable :: lglel(:)
81 type(
coef_t),
intent(inout) :: coef
82 integer,
intent(in),
optional :: timeout_seconds
83 integer :: nelb, nelv, nelgv, npts, gdim, timeout
87 npts = coef%Xh%lx*coef%Xh%ly*coef%Xh%lz
88 nelgv = coef%msh%glb_nelv
89 nelb = coef%msh%offset_el
91 if (
present(timeout_seconds))
then
92 timeout = timeout_seconds
99 call fortran_adios2_initialize(npts, nelv, nelb, nelgv, gdim,
neko_comm, timeout)
101 call neko_warning(
'Is not being built with ADIOS2 support.')
102 call neko_warning(
'Not able to use stream/compression functionality')
114 call fortran_adios2_finalize()
116 call neko_warning(
'Is not being built with ADIOS2 support.')
117 call neko_warning(
'Not able to use stream/compression functionality')
126 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
129 call fortran_adios2_stream(fld)
131 call neko_warning(
'Is not being built with ADIOS2 support.')
132 call neko_warning(
'Not able to use stream/compression functionality')
141 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
144 call fortran_adios2_recieve(fld)
146 call neko_warning(
'Is not being built with ADIOS2 support.')
147 call neko_warning(
'Not able to use stream/compression functionality')
165 subroutine fortran_adios2_initialize(npts, nelv, nelb, nelgv, gdim, &
167 use,
intrinsic :: iso_c_binding
169 integer,
intent(in) :: npts, nelv, nelb, nelgv, gdim
170 integer,
intent(in) :: timeout
171 type(mpi_comm) :: comm
179 subroutine c_adios2_initialize(npts, nelv, nelb, nelgv, gdim, &
180 comm, timeout)
bind(C,name="adios2_initialize_")
181 use,
intrinsic :: iso_c_binding
184 integer(kind=C_INT) :: npts
185 integer(kind=C_INT) :: nelv
186 integer(kind=C_INT) :: nelb
187 integer(kind=C_INT) :: nelgv
188 integer(kind=C_INT) :: gdim
190 integer(kind=C_INT) :: timeout
191 end subroutine c_adios2_initialize
194 call c_adios2_initialize(npts, nelv, nelb, nelgv, gdim,
comm, timeout)
195 end subroutine fortran_adios2_initialize
199 subroutine fortran_adios2_finalize()
200 use,
intrinsic :: iso_c_binding
205 subroutine c_adios2_finalize()
bind(C,name="adios2_finalize_")
206 use,
intrinsic :: iso_c_binding
208 end subroutine c_adios2_finalize
211 call c_adios2_finalize()
212 end subroutine fortran_adios2_finalize
219 subroutine fortran_adios2_stream(fld)
220 use,
intrinsic :: iso_c_binding
222 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
226 subroutine c_adios2_stream(fld) &
227 bind(C,name="adios2_stream_")
228 use,
intrinsic :: iso_c_binding
231 real(kind=
c_rp),
intent(INOUT) :: fld(*)
232 end subroutine c_adios2_stream
235 call c_adios2_stream(fld)
236 end subroutine fortran_adios2_stream
243 subroutine fortran_adios2_recieve(fld)
244 use,
intrinsic :: iso_c_binding
246 real(kind=
rp),
dimension(:,:,:,:),
intent(inout) :: fld
250 subroutine c_adios2_recieve(fld) &
251 bind(C,name="adios2_recieve_")
252 use,
intrinsic :: iso_c_binding
255 real(kind=
c_rp),
intent(INOUT) :: fld(*)
256 end subroutine c_adios2_recieve
259 call c_adios2_recieve(fld)
260 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 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.