projects
/
unres.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
correction in restart - adding dc0 -critical bug
[unres.git]
/
source
/
unres
/
src_MD-M
/
MREMD.F
diff --git
a/source/unres/src_MD-M/MREMD.F
b/source/unres/src_MD-M/MREMD.F
index
f29b6b5
..
7a72b17
100644
(file)
--- a/
source/unres/src_MD-M/MREMD.F
+++ b/
source/unres/src_MD-M/MREMD.F
@@
-572,10
+572,10
@@
C call enerprint(remd_ene(0,i))
endif
open(irest2,file=rest2name,status='unknown')
write(irest2,*) totT,EK,potE,totE,t_bath
endif
open(irest2,file=rest2name,status='unknown')
write(irest2,*) totT,EK,potE,totE,t_bath
- do i=1,2*nres
+ do i=0,2*nres
write (irest2,'(3e15.5)') (d_t(j,i),j=1,3)
enddo
write (irest2,'(3e15.5)') (d_t(j,i),j=1,3)
enddo
- do i=1,2*nres
+ do i=0,2*nres
write (irest2,'(3e15.5)') (dc(j,i),j=1,3)
enddo
if(usampl) then
write (irest2,'(3e15.5)') (dc(j,i),j=1,3)
enddo
if(usampl) then
@@
-1232,8
+1232,8
@@
c-----------------------------------------------------------------------
include 'COMMON.SBRIDGE'
include 'COMMON.INTERACT'
include 'COMMON.SBRIDGE'
include 'COMMON.INTERACT'
- real d_restart1(3,2*maxres*maxprocs),r_d(3,2*maxres),
- & d_restart2(3,2*maxres*maxprocs)
+ real d_restart1(3,2*(maxres+1)*maxprocs),r_d(3,2*(maxres+1)),
+ & d_restart2(3,2*(maxres+1)*maxprocs)
real t5_restart1(5)
integer iret,itmp
integer*2 i_index
real t5_restart1(5)
integer iret,itmp
integer*2 i_index
@@
-1250,23
+1250,23
@@
c-----------------------------------------------------------------------
& t_restart1,5,mpi_real,king,CG_COMM,ierr)
& t_restart1,5,mpi_real,king,CG_COMM,ierr)
- do i=1,2*nres
+ do i=0,2*nres
do j=1,3
r_d(j,i)=d_t(j,i)
enddo
enddo
do j=1,3
r_d(j,i)=d_t(j,i)
enddo
enddo
- call mpi_gather(r_d,3*2*nres,mpi_real,
- & d_restart1,3*2*nres,mpi_real,king,
+ call mpi_gather(r_d,3*2*(nres+1),mpi_real,
+ & d_restart1,3*2*(nres+1),mpi_real,king,
& CG_COMM,ierr)
& CG_COMM,ierr)
- do i=1,2*nres
+ do i=0,2*nres
do j=1,3
r_d(j,i)=dc(j,i)
enddo
enddo
do j=1,3
r_d(j,i)=dc(j,i)
enddo
enddo
- call mpi_gather(r_d,3*2*nres,mpi_real,
- & d_restart2,3*2*nres,mpi_real,king,
+ call mpi_gather(r_d,3*2*(nres+1),mpi_real,
+ & d_restart2,3*2*(nres+1),mpi_real,king,
& CG_COMM,ierr)
if(me.eq.king) then
& CG_COMM,ierr)
if(me.eq.king) then
@@
-1295,16
+1295,18
@@
c-----------------------------------------------------------------------
enddo
do il=0,nodes-1
enddo
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
do j=1,3
do j=1,3
- call xdrffloat_(ixdrf, d_restart1(j,i+2*nres*il), iret)
+ call
+ & xdrffloat_(ixdrf, d_restart1(j,i+2*(nres+1)*il), iret)
enddo
enddo
enddo
do il=0,nodes-1
enddo
enddo
enddo
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
do j=1,3
do j=1,3
- call xdrffloat_(ixdrf, d_restart2(j,i+2*nres*il), iret)
+ call
+ & xdrffloat_(ixdrf, d_restart2(j,i+2*(nres+1)*il), iret)
enddo
enddo
enddo
enddo
enddo
enddo
@@
-1355,16
+1357,18
@@
c-----------------------------------------------------------------------
enddo
do il=0,nodes-1
enddo
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
do j=1,3
do j=1,3
- call xdrffloat(ixdrf, d_restart1(j,i+2*nres*il), iret)
+ call
+ & xdrffloat(ixdrf, d_restart1(j,i+2*(nres+1)*il), iret)
enddo
enddo
enddo
do il=0,nodes-1
enddo
enddo
enddo
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
do j=1,3
do j=1,3
- call xdrffloat(ixdrf, d_restart2(j,i+2*nres*il), iret)
+ call
+ & xdrffloat(ixdrf, d_restart2(j,i+2*(nres+1)*il), iret)
enddo
enddo
enddo
enddo
enddo
enddo
@@
-1631,7
+1635,7
@@
c end debugging
include 'COMMON.CHAIN'
include 'COMMON.SBRIDGE'
include 'COMMON.INTERACT'
include 'COMMON.CHAIN'
include 'COMMON.SBRIDGE'
include 'COMMON.INTERACT'
- real d_restart1(3,2*maxres*maxprocs),r_d(3,2*maxres),
+ real d_restart1(3,2*(maxres+1)*maxprocs),r_d(3,2*(maxres+1)),
& t5_restart1(5)
integer*2 i_index
& (maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
& t5_restart1(5)
integer*2 i_index
& (maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
@@
-1707,45
+1711,47
@@
c end debugging
if(me.eq.king)then
do il=0,nodes-1
if(me.eq.king)then
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
c read(irest2,'(3e15.5)')
c & (d_restart1(j,i+2*nres*il),j=1,3)
do j=1,3
#ifdef AIX
c read(irest2,'(3e15.5)')
c & (d_restart1(j,i+2*nres*il),j=1,3)
do j=1,3
#ifdef AIX
- call xdrffloat_(ixdrf, d_restart1(j,i+2*nres*il), iret)
+ call xdrffloat_(ixdrf, d_restart1(j,i+2*(nres+1)*il), iret)
#else
#else
- call xdrffloat(ixdrf, d_restart1(j,i+2*nres*il), iret)
+ call xdrffloat(ixdrf, d_restart1(j,i+2*(nres+1)*il), iret)
#endif
enddo
enddo
enddo
endif
#endif
enddo
enddo
enddo
endif
- call mpi_scatter(d_restart1,3*2*nres,mpi_real,
- & r_d,3*2*nres,mpi_real,king,CG_COMM,ierr)
+ call mpi_scatter(d_restart1,3*2*(nres+1),mpi_real,
+ & r_d,3*2*(nres+1),mpi_real,king,CG_COMM,ierr)
- do i=1,2*nres
+ do i=0,2*nres
do j=1,3
d_t(j,i)=r_d(j,i)
enddo
enddo
if(me.eq.king)then
do il=0,nodes-1
do j=1,3
d_t(j,i)=r_d(j,i)
enddo
enddo
if(me.eq.king)then
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
c read(irest2,'(3e15.5)')
c & (d_restart1(j,i+2*nres*il),j=1,3)
do j=1,3
#ifdef AIX
c read(irest2,'(3e15.5)')
c & (d_restart1(j,i+2*nres*il),j=1,3)
do j=1,3
#ifdef AIX
- call xdrffloat_(ixdrf, d_restart1(j,i+2*nres*il), iret)
+ call
+ & xdrffloat_(ixdrf, d_restart1(j,i+2*(nres+1)*il), iret)
#else
#else
- call xdrffloat(ixdrf, d_restart1(j,i+2*nres*il), iret)
+ call
+ & xdrffloat(ixdrf, d_restart1(j,i+2*(nres+1)*il), iret)
#endif
enddo
enddo
enddo
endif
#endif
enddo
enddo
enddo
endif
- call mpi_scatter(d_restart1,3*2*nres,mpi_real,
- & r_d,3*2*nres,mpi_real,king,CG_COMM,ierr)
- do i=1,2*nres
+ call mpi_scatter(d_restart1,3*2*(nres+1),mpi_real,
+ & r_d,3*2*(nres+1),mpi_real,king,CG_COMM,ierr)
+ do i=0,2*nres
do j=1,3
dc(j,i)=r_d(j,i)
enddo
do j=1,3
dc(j,i)=r_d(j,i)
enddo
@@
-1841,14
+1847,14
@@
c & (d_restart1(j,i+2*nres*il),j=1,3)
if(me.eq.king)then
do il=0,nodes-1
if(me.eq.king)then
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
read(irest2,'(3e15.5)')
read(irest2,'(3e15.5)')
- & (d_restart1(j,i+2*nres*il),j=1,3)
+ & (d_restart1(j,i+2*(nres+1)*il),j=1,3)
enddo
enddo
endif
enddo
enddo
endif
- call mpi_scatter(d_restart1,3*2*nres,mpi_real,
- & r_d,3*2*nres,mpi_real,king,CG_COMM,ierr)
+ call mpi_scatter(d_restart1,3*2*(nres+1),mpi_real,
+ & r_d,3*2*(nres+1),mpi_real,king,CG_COMM,ierr)
do i=1,2*nres
do j=1,3
do i=1,2*nres
do j=1,3
@@
-1857,14
+1863,14
@@
c & (d_restart1(j,i+2*nres*il),j=1,3)
enddo
if(me.eq.king)then
do il=0,nodes-1
enddo
if(me.eq.king)then
do il=0,nodes-1
- do i=1,2*nres
+ do i=0,2*nres
read(irest2,'(3e15.5)')
read(irest2,'(3e15.5)')
- & (d_restart1(j,i+2*nres*il),j=1,3)
+ & (d_restart1(j,i+2*(nres+1)*il),j=1,3)
enddo
enddo
endif
enddo
enddo
endif
- call mpi_scatter(d_restart1,3*2*nres,mpi_real,
- & r_d,3*2*nres,mpi_real,king,CG_COMM,ierr)
+ call mpi_scatter(d_restart1,3*2*(nres+1),mpi_real,
+ & r_d,3*2*(nres+1),mpi_real,king,CG_COMM,ierr)
do i=1,2*nres
do j=1,3
dc(j,i)=r_d(j,i)
do i=1,2*nres
do j=1,3
dc(j,i)=r_d(j,i)