projects
/
unres.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of mmka.chem.univ.gda.pl:unres
[unres.git]
/
source
/
unres
/
src_MD-M
/
unres.F
diff --git
a/source/unres/src_MD-M/unres.F
b/source/unres/src_MD-M/unres.F
index
0039fcc
..
fab67a1
100644
(file)
--- a/
source/unres/src_MD-M/unres.F
+++ b/
source/unres/src_MD-M/unres.F
@@
-56,7
+56,6
@@
c call memmon_print_usage()
if (me.eq.king) call cinfo
C Read force field parameters and job setup data
call readrtns
if (me.eq.king) call cinfo
C Read force field parameters and job setup data
call readrtns
- call flush(iout)
C
if (me.eq.king .or. .not. out1file) then
write (iout,'(2a/)')
C
if (me.eq.king .or. .not. out1file) then
write (iout,'(2a/)')
@@
-103,7
+102,12
@@
C Fine-grain slaves just do energy and gradient components.
else if (modecalc.eq.12) then
call exec_MD
else if (modecalc.eq.14) then
else if (modecalc.eq.12) then
call exec_MD
else if (modecalc.eq.14) then
+#ifdef MPI
call exec_MREMD
call exec_MREMD
+#else
+ write (iout,*) "Need a parallel version to run MREMD."
+ stop
+#endif
else
write (iout,'(a)') 'This calculation type is not supported',
& ModeCalc
else
write (iout,'(a)') 'This calculation type is not supported',
& ModeCalc
@@
-132,13
+136,20
@@
c--------------------------------------------------------------------------
include 'COMMON.SETUP'
include 'COMMON.CONTROL'
include 'COMMON.IOUNITS'
include 'COMMON.SETUP'
include 'COMMON.CONTROL'
include 'COMMON.IOUNITS'
- if (me.eq.king .or. .not. out1file)
- & write (iout,*) "Calling chainbuild"
+c if (me.eq.king .or. .not. out1file) then
+c write (iout,*) "Calling chainbuild"
+c call flush(iout)
+c endif
call chainbuild
call chainbuild
+c if (me.eq.king .or. .not. out1file) then
+c write (iout,*) "Calling MD"
+c call flush(iout)
+c endif
call MD
return
end
c---------------------------------------------------------------------------
call MD
return
end
c---------------------------------------------------------------------------
+#ifdef MPI
subroutine exec_MREMD
include 'DIMENSIONS'
#ifdef MPI
subroutine exec_MREMD
include 'DIMENSIONS'
#ifdef MPI
@@
-163,6
+174,7
@@
c---------------------------------------------------------------------------
endif
return
end
endif
return
end
+#endif
c---------------------------------------------------------------------------
subroutine exec_eeval_or_minim
implicit real*8 (a-h,o-z)
c---------------------------------------------------------------------------
subroutine exec_eeval_or_minim
implicit real*8 (a-h,o-z)
@@
-190,7
+202,11
@@
c---------------------------------------------------------------------------
double precision energy_long(0:n_ene),energy_short(0:n_ene)
double precision varia(maxvar)
if (indpdb.eq.0) call chainbuild
double precision energy_long(0:n_ene),energy_short(0:n_ene)
double precision varia(maxvar)
if (indpdb.eq.0) call chainbuild
+#ifdef MPI
time00=MPI_Wtime()
time00=MPI_Wtime()
+#else
+ time00=tcpu()
+#endif
call chainbuild_cart
if (split_ene) then
print *,"Processor",myrank," after chainbuild"
call chainbuild_cart
if (split_ene) then
print *,"Processor",myrank," after chainbuild"
@@
-209,7
+225,11
@@
c---------------------------------------------------------------------------
call enerprint(energy(0))
endif
call etotal(energy(0))
call enerprint(energy(0))
endif
call etotal(energy(0))
+#ifdef MPI
time_ene=MPI_Wtime()-time00
time_ene=MPI_Wtime()-time00
+#else
+ time_ene=tcpu()-time00
+#endif
write (iout,*) "Time for energy evaluation",time_ene
print *,"after etotal"
etota = energy(0)
write (iout,*) "Time for energy evaluation",time_ene
print *,"after etotal"
etota = energy(0)
@@
-232,8
+252,13
@@
crc overlap test
if (dccart) then
print *, 'Calling MINIM_DC'
if (dccart) then
print *, 'Calling MINIM_DC'
+#ifdef MPI
time1=MPI_WTIME()
time1=MPI_WTIME()
+#else
+ time1=tcpu()
+#endif
call minim_dc(etot,iretcode,nfun)
call minim_dc(etot,iretcode,nfun)
+ if(iretcode.eq.8) call check_ecartint
else
if (indpdb.ne.0) then
call bond_regular
else
if (indpdb.ne.0) then
call bond_regular
@@
-241,11
+266,19
@@
crc overlap test
endif
call geom_to_var(nvar,varia)
print *,'Calling MINIMIZE.'
endif
call geom_to_var(nvar,varia)
print *,'Calling MINIMIZE.'
+#ifdef MPI
time1=MPI_WTIME()
time1=MPI_WTIME()
+#else
+ time1=tcpu()
+#endif
call minimize(etot,varia,iretcode,nfun)
endif
print *,'SUMSL return code is',iretcode,' eval ',nfun
call minimize(etot,varia,iretcode,nfun)
endif
print *,'SUMSL return code is',iretcode,' eval ',nfun
+#ifdef MPI
evals=nfun/(MPI_WTIME()-time1)
evals=nfun/(MPI_WTIME()-time1)
+#else
+ evals=nfun/(tcpu()-time1)
+#endif
print *,'# eval/s',evals
print *,'refstr=',refstr
call hairpin(.true.,nharp,iharp)
print *,'# eval/s',evals
print *,'refstr=',refstr
call hairpin(.true.,nharp,iharp)
@@
-375,7
+408,7
@@
c---------------------------------------------------------------------------
include 'COMMON.SBRIDGE'
double precision varia(maxvar)
dimension ind(6)
include 'COMMON.SBRIDGE'
double precision varia(maxvar)
dimension ind(6)
- double precision energy(0:max_ene)
+ double precision energy(0:n_ene)
logical eof
eof=.false.
#ifdef MPI
logical eof
eof=.false.
#ifdef MPI
@@
-611,7
+644,7
@@
c Broadcast the order to compute internal coordinates to the slaves.
endif
do while (.not. eof)
if (read_cart) then
endif
do while (.not. eof)
if (read_cart) then
- read (intin,'(e15.10,e15.5)',end=1100,err=1100) time,ene
+ read (intin,'(e15.10,e15.5)',end=11,err=11) time,ene
call read_x(intin,*11)
#ifdef MPI
c Broadcast the order to compute internal coordinates to the slaves.
call read_x(intin,*11)
#ifdef MPI
c Broadcast the order to compute internal coordinates to the slaves.
@@
-620,7
+653,7
@@
c Broadcast the order to compute internal coordinates to the slaves.
#endif
call int_from_cart1(.false.)
else
#endif
call int_from_cart1(.false.)
else
- read (intin,'(i5)',end=1100,err=1100) iconf
+ read (intin,'(i5)',end=11,err=11) iconf
call read_angles(intin,*11)
call geom_to_var(nvar,varia)
call chainbuild
call read_angles(intin,*11)
call geom_to_var(nvar,varia)
call chainbuild
@@
-670,7
+703,7
@@
c---------------------------------------------------------------------------
include 'COMMON.MD'
include 'COMMON.SBRIDGE'
common /srutu/ icall
include 'COMMON.MD'
include 'COMMON.SBRIDGE'
common /srutu/ icall
- double precision energy(0:max_ene)
+ double precision energy(0:n_ene)
c do i=2,nres
c vbld(i)=vbld(i)+ran_number(-0.1d0,0.1d0)
c if (itype(i).ne.10)
c do i=2,nres
c vbld(i)=vbld(i)+ran_number(-0.1d0,0.1d0)
c if (itype(i).ne.10)
@@
-707,6
+740,8
@@
c enddo
print *,'icheckgrad=',icheckgrad
goto (10,20,30) icheckgrad
10 call check_ecartint
print *,'icheckgrad=',icheckgrad
goto (10,20,30) icheckgrad
10 call check_ecartint
+ write(iout,*) "kupadupa"
+ call check_ecartint
return
20 call check_cartgrad
return
return
20 call check_cartgrad
return
@@
-741,7
+776,7
@@
c---------------------------------------------------------------------------
include 'DIMENSIONS'
include 'COMMON.IOUNITS'
include 'COMMON.CONTROL'
include 'DIMENSIONS'
include 'COMMON.IOUNITS'
include 'COMMON.CONTROL'
- double precision energy(0:max_ene)
+ double precision energy(0:n_ene)
call chainbuild
call etotal(energy(0))
call enerprint(energy(0))
call chainbuild
call etotal(energy(0))
call enerprint(energy(0))