Skip to content

Commit

Permalink
Check to see whether seedname.wout exists before appending on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
mostofi committed May 2, 2006
1 parent a34b693 commit 0ea100a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/wannier_prog.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ program wannier

real(kind=dp) time0,time1,time2
character(len=9) :: stat,pos,cdate,ctime
logical :: wout_found

time0=io_time()

Expand All @@ -67,7 +68,12 @@ program wannier
stat='replace'
pos ='rewind'
else
stat='old'
inquire(file=trim(seedname)//'.wout',exist=wout_found)
if (wout_found) then
stat='old'
else
stat='replace'
endif
pos='append'
endif

Expand Down

0 comments on commit 0ea100a

Please sign in to comment.