remove all hit3d restart file except for the latest one
This commit is contained in:
parent
c8d81aaf92
commit
8fc5c79bf6
4 changed files with 15 additions and 2 deletions
|
|
@ -102,6 +102,11 @@ contains
|
|||
! endif
|
||||
! endif
|
||||
|
||||
if(ITMIN.eq.0) then
|
||||
open(unit=restart_pair,file="restart_pair.txt")
|
||||
else
|
||||
open(unit=restart_pair,file="restart_pair.txt",status='old',position='append')
|
||||
endif
|
||||
|
||||
|
||||
end subroutine result_files_open
|
||||
|
|
|
|||
4
m_io.f90
4
m_io.f90
|
|
@ -9,7 +9,7 @@ module m_io
|
|||
use m_openmpi
|
||||
implicit none
|
||||
|
||||
character*6 :: file_ext
|
||||
character*6 :: file_ext, ex_file_ext
|
||||
character*80 :: fname
|
||||
! output file handle
|
||||
integer :: in=10, out=11
|
||||
|
|
@ -24,6 +24,8 @@ contains
|
|||
|
||||
implicit none
|
||||
|
||||
file_ext(:) = '0'
|
||||
ex_file_ext(:) = '0'
|
||||
write(fname,"('d',i4.4,'.txt')") myid_world
|
||||
open(out,file=fname,position="append")
|
||||
write(out,"('-------------------------------------')")
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ module m_parameters
|
|||
integer, parameter :: tp_eps_spec = 503
|
||||
integer, parameter :: tp_max_min_uvw = 504
|
||||
integer, parameter :: St_data = 505
|
||||
integer, parameter :: restart_pair = 506
|
||||
|
||||
|
||||
!================================================================================
|
||||
|
|
|
|||
7
main.f90
7
main.f90
|
|
@ -51,7 +51,7 @@ program x_code
|
|||
! getting the wallclock runlimit for the job
|
||||
call get_job_runlimit
|
||||
|
||||
call result_files_open
|
||||
if (task.eq.'hydro' .and. myid.eq.master) call result_files_open
|
||||
|
||||
!-----------------------------------------------------------------------
|
||||
! Starting from the beginning or from the saved flowfield
|
||||
|
|
@ -190,13 +190,18 @@ program x_code
|
|||
! write the restart file if it's the time
|
||||
if (mod(itime,IPRINT2).eq.0) then
|
||||
call restart_write_parallel
|
||||
!remove hit restart file
|
||||
call system ('rm -f '//run_name//'.64.'//ex_file_ext)
|
||||
if (fdm_sw.ne.0) then ! Reacting
|
||||
call gather_4
|
||||
if (myid.eq.master) then
|
||||
!write itime, savenum pair
|
||||
call fdm_restart_write
|
||||
write (restart_pair, *) file_ext, fullsavenum-1
|
||||
end if
|
||||
call MPI_BARRIER(MPI_COMM_TASK, mpi_err)
|
||||
endif
|
||||
ex_file_ext = file_ext
|
||||
endif
|
||||
|
||||
! change the timestep in case we're running with variable timestep
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue