37 use mpi_f08,
only: mpi_bcast, mpi_logical
42 character(len=1024) :: fname
43 integer :: counter = 0
44 integer :: start_counter = 0
46 logical :: serial = .false.
67 class(*),
target,
intent(in) :: data
68 real(kind=
rp),
intent(in),
optional :: t
76 class(*),
target,
intent(inout) :: data
86 character(len=*) :: fname
96 integer,
intent(in) :: n
103 integer,
intent(in) :: n
104 this%start_counter = n
110 logical :: file_exists
111 integer :: neko_mpi_ierr
113 file_exists = .false.
115 if (
pe_rank .eq. 0 .or. this%serial)
then
117 inquire(
file = this%fname, exist = file_exists)
120 if (.not. this%serial)
then
121 call mpi_bcast(file_exists, 1, mpi_logical, 0,
neko_comm, neko_mpi_ierr)
124 if (.not. file_exists)
then
125 call neko_error(
'File does not exist: ' // trim(this%fname))
integer, public pe_rank
MPI rank.
type(mpi_comm), public neko_comm
MPI communicator.
Module for file I/O operations.
subroutine generic_file_check_exists(this)
check if the file exists
subroutine generic_file_set_start_counter(this, n)
Set the file start counter to n.
subroutine generic_file_init(this, fname)
Generic file constructor.
subroutine generic_file_set_counter(this, n)
Set the file counter to n.
integer, parameter, public rp
Global precision used in computations.