update new files
[unres.git] / source / maxlik / src_MD_T_maxlik-NEWCORR-PMF-5 / restart.F
1       subroutine write_restart(n,x)
2       implicit none
3       include 'DIMENSIONS'
4       include 'DIMENSIONS.ZSCOPT'
5 #ifdef MPI
6       include 'mpif.h'
7       include 'COMMON.MPI'
8 #endif
9       include 'COMMON.IOUNITS'
10       include 'COMMON.TIME1'
11       integer n
12       double precision x(max_paropt)
13       double precision tt,tcpu
14       integer i
15 #ifdef MPI
16       if (me.eq.Master) then
17 #endif
18       tt = tcpu()
19       if (tt-PREVTIM .ge. rstime) then
20         open(88,file=restartname,status="unknown")
21         write (iout,*) "Writing RESTART file..."
22         do i=1,n
23           write (88,*) x(i)
24         enddo
25         close(88)
26         PREVTIM=tt
27       endif
28 #ifdef MPI
29       endif
30 #endif
31       return
32       end