You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rerunning a simulation with a shortened timestep creates a duplicate output of the first timestep after the restart.
I think this is because the i/o counter is defined by finding the last record in the output file with a timestamp earlier than the current time and adding 1. If you need to rerun part of a simulation with a shorter timestep than was previously used (for example, after a blowup), the first timestep after the restart will not be overwritten because it will have a slightly earlier timestamp than the first output of the restarted run (old timestep - new timestep). You then have two near-duplicate records.
From io_meandata.F90:
!_______________________________________________________________
! if the time rtime at the rec_count is larger than ctime we
! look for the closest record with the timestamp less than ctime
do k=entry%rec_count, 1, -1
!PS if (partit%flag_debug) print *, achar(27)//'[33m'//' -I/O-> call assert_nf B'//achar(27)//'[0m'//', k=',k, ', rootpart=', entry%root_rank
! determine rtime from exiting file
call assert_nf( nf_get_vara_double(entry%ncid, entry%tID, k, 1, rtime, 1), __LINE__)
if (ctime > rtime) then
entry%rec_count=k+1
exit ! a proper rec_count detected, exit the loop
end if
if (k==1) then
write(*,*) 'I/O '//trim(entry%name)//' WARNING: the existing output file will be overwritten'//'; ', entry%rec_count, ' records in the file;'
entry%rec_count=1
exit ! no appropriate rec_count detected
end if
end do
Could the i/o counter be initialized by finding the number of records in the output file with timestamps earlier than the restart time and updated by 1 after each output?
The text was updated successfully, but these errors were encountered:
Rerunning a simulation with a shortened timestep creates a duplicate output of the first timestep after the restart.
I think this is because the i/o counter is defined by finding the last record in the output file with a timestamp earlier than the current time and adding 1. If you need to rerun part of a simulation with a shorter timestep than was previously used (for example, after a blowup), the first timestep after the restart will not be overwritten because it will have a slightly earlier timestamp than the first output of the restarted run (old timestep - new timestep). You then have two near-duplicate records.
From io_meandata.F90:
Could the i/o counter be initialized by finding the number of records in the output file with timestamps earlier than the restart time and updated by 1 after each output?
The text was updated successfully, but these errors were encountered: