Skip to content
Snippets Groups Projects
Commit c8473b72 authored by Matthias Schmiddunser's avatar Matthias Schmiddunser
Browse files

Reducing Output - saving files periodically

Changing write_global_output so that the current output file is always kept
temporarily and deleted after the next output file was written. When
time = n*savstep+savoffset the files are kept permanently.
parent a3dbb6f1
No related branches found
No related tags found
No related merge requests found
......@@ -263,6 +263,8 @@ module definitions
integer levelcut
integer levelapprox
integer nstep
integer savstep
integer savoffset
integer nstep_spinup
integer noctreemax
integer levelmax_oct
......
......@@ -162,6 +162,14 @@ params%nstep_spinup=0
if (iproc==0) call scanfile (params%infile,'nstep_spinup',params%nstep_spinup,ires)
call mpi_bcast(params%nstep_spinup,1,mpi_integer,0,mpi_comm_world,ierr)
params%savstep=1
if (iproc==0) call scanfile (params%infile,'savstep',params%savstep,ires)
call mpi_bcast(params%savstep,1,mpi_integer,0,mpi_comm_world,ierr)
params%savoffset=0
if (iproc==0) call scanfile (params%infile,'savoffset',params%savoffset,ires)
call mpi_bcast(params%savoffset,1,mpi_integer,0,mpi_comm_world,ierr)
!=====[material properties]====================================================
material0=0
......
......@@ -67,9 +67,9 @@ character*5 outputtype
!(((((((((((((((( declaration of the subroutine internal variables )))))))))))))
!------------------------------------------------------------------------------|
integer i,j,is,k,err,size_str(2)
integer iproc,nproc,ierr
character*4 cistep,citer
integer i,j,is,k,err,size_str(2),stat
integer iproc,nproc,ierr,prevstep
character*4 cistep,citer,cprevstep
character(len=5) :: outdir
!------------------------------------------------------------------------------|
......@@ -235,6 +235,17 @@ if (iproc.eq.0) then
close (9)
!delete file from previous timestep if not marked for permanent save
!mschmiddunser 12.14
if (outputtype=='final') then
prevstep = istep-1
if (prevstep < params%savoffset .AND. prevstep >=0 .OR. &
prevstep >= params%savoffset .AND. (.NOT. mod(prevstep-params%savoffset,params%savstep)==0)) then
call int_to_char (cprevstep,4,prevstep)
open (91,file=trim(outdir)//'/time_'//cprevstep//'.bin',iostat=stat,status='old',form='unformatted')
if (stat.eq.0) close(91, status='delete')
end if
end if
end if
return
......
......@@ -46,6 +46,20 @@ produce the DoRuRes. DoRuRe stands for 'Douar Run Report'.
compute_qpgram = F
SAVING
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
The current output file is always kept temporarily and deleted after the next
output file was written. When time equals n*savstep + savoffset the files are
kept permanently.
[int] savoffset is the timestep from which on output will be saved
savoffset = 1
[int] every savstep'th value after savoffset will be saved
savstep = 2
RESTART
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment