Skip to content

Commit 7a05539

Browse files
Fixed IB marker write issue with something more sustainable
1 parent a301fbc commit 7a05539

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/post_process/m_data_input.f90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,11 @@ impure subroutine s_read_ib_data_files(file_loc_base, t_step)
183183

184184
data_size = (m + 1)*(n + 1)*(p + 1)
185185
var_MOK = int(sys_size + 1, MPI_OFFSET_KIND)
186-
disp = m_MOK*max(MOK, n_MOK)*max(MOK, p_MOK)*WP_MOK*(var_MOK - 1 + int(save_index, MPI_OFFSET_KIND))
186+
if (t_step == 0) then
187+
disp = 0
188+
else
189+
disp = m_MOK*max(MOK, n_MOK)*max(MOK, p_MOK)*WP_MOK*(var_MOK - 1 + int(save_index, MPI_OFFSET_KIND))
190+
end if
187191

188192
call MPI_FILE_SET_VIEW(ifile, disp, MPI_INTEGER, MPI_IO_IB_DATA%view, &
189193
'native', mpi_info_int, ierr)

0 commit comments

Comments
 (0)