X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Fstochfric.F;h=8d1cf2c161ebbcf48ac879109249ceb73684b203;hb=a6ccbf4c1890b606431091eea825be37b1f5b4c4;hp=99a7502bc285e3385e910d55e544656f62e37f6e;hpb=b7042eb01a1a9be29dd1cea99b3d5d9f5d89a982;p=unres.git diff --git a/source/unres/src_MD-M/stochfric.F b/source/unres/src_MD-M/stochfric.F index 99a7502..8d1cf2c 100644 --- a/source/unres/src_MD-M/stochfric.F +++ b/source/unres/src_MD-M/stochfric.F @@ -39,7 +39,11 @@ ind=ind+3 enddo do i=nnt,nct +<<<<<<< HEAD if (itype(i).ne.10 .and. itype(i).ne.21) then +======= + if (itype(i).ne.10) then +>>>>>>> 2acc991... Wprowadznie potencjalow SC-COR do multichain oraz ich pseudosymetrii dla do j=1,3 d_t_work(ind+j)=d_t(j,i+nres) enddo @@ -68,7 +72,11 @@ ind=ind+3 enddo do i=nnt,nct +<<<<<<< HEAD if (itype(i).ne.10 .and. itype(i).ne.21) then +======= + if (itype(i).ne.10) then +>>>>>>> 2acc991... Wprowadznie potencjalow SC-COR do multichain oraz ich pseudosymetrii dla do j=1,3 friction(j,i+nres)=fric_work(ind+j) enddo @@ -185,7 +193,11 @@ c----------------------------------------------------- enddo x=0.0d0 +#ifdef MPI time00=MPI_Wtime() +#else + time00=tcpu() +#endif c Compute the stochastic forces acting on bodies. Store in force. do i=nnt,nct-1 sig=stdforcp(i) @@ -203,7 +215,11 @@ c Compute the stochastic forces acting on bodies. Store in force. force(j,i+nres)=anorm_distr(x,sig2,lowb2,highb2) enddo enddo +#ifdef MPI time_fsample=time_fsample+MPI_Wtime()-time00 +#else + time_fsample=time_fsample+tcpu()-time00 +#endif c Compute the stochastic forces acting on virtual-bond vectors. do j=1,3 ff(j)=0.0d0 @@ -226,7 +242,11 @@ c Compute the stochastic forces acting on virtual-bond vectors. stochforc(j,0)=ff(j)+force(j,nnt+nres) enddo do i=nnt,nct +<<<<<<< HEAD if (itype(i).ne.10 .and. itype(i).ne.21) then +======= + if (itype(i).ne.10) then +>>>>>>> 2acc991... Wprowadznie potencjalow SC-COR do multichain oraz ich pseudosymetrii dla do j=1,3 stochforc(j,i+nres)=force(j,i+nres) enddo @@ -244,7 +264,11 @@ c Compute the stochastic forces acting on virtual-bond vectors. ind=ind+3 enddo do i=nnt,nct +<<<<<<< HEAD if (itype(i).ne.10 .and. itype(i).ne.21) then +======= + if (itype(i).ne.10) then +>>>>>>> 2acc991... Wprowadznie potencjalow SC-COR do multichain oraz ich pseudosymetrii dla do j=1,3 stochforcvec(ind+j)=stochforc(j,i+nres) enddo @@ -309,7 +333,9 @@ c Compute the stochastic forces acting on virtual-bond vectors. c------------------------------------------------------------------ subroutine setup_fricmat implicit real*8 (a-h,o-z) +#ifdef MPI include 'mpif.h' +#endif include 'DIMENSIONS' include 'COMMON.VAR' include 'COMMON.CHAIN' @@ -355,7 +381,6 @@ c Load the friction coefficients corresponding to peptide groups c Load the friction coefficients corresponding to side chains m=nct-nnt ind=0 - gamsc(ntyp1)=1.0d0 do i=nnt,nct ind=ind+1 ii = ind+m @@ -478,22 +503,38 @@ c enddo if (nfgtasks.gt.1) then if (fg_rank.eq.0) then c The matching BROADCAST for fg processors is called in ERGASTULUM +#ifdef MPI time00=MPI_Wtime() +#else + time00=tcpu() +#endif call MPI_Bcast(10,1,MPI_INTEGER,king,FG_COMM,IERROR) +#ifdef MPI time_Bcast=time_Bcast+MPI_Wtime()-time00 +#else + time_Bcast=time_Bcast+tcpu()-time00 +#endif c print *,"Processor",myrank, c & " BROADCAST iorder in SETUP_FRICMAT" endif c licznik=licznik+1 c write (iout,*) "setup_fricmat licznik",licznik +#ifdef MPI time00=MPI_Wtime() +#else + time00=tcpu() +#endif c Scatter the friction matrix call MPI_Scatterv(fricmat(1,1),nginv_counts(0), & nginv_start(0),MPI_DOUBLE_PRECISION,fcopy(1,1), & myginv_ng_count,MPI_DOUBLE_PRECISION,king,FG_COMM,IERROR) - time_scatter=time_scatter+MPI_Wtime()-time00 #ifdef TIMING +#ifdef MPI time_scatter_fmat=time_scatter_fmat+MPI_Wtime()-time00 +#else + time_scatter=time_scatter+tcpu()-time00 + time_scatter_fmat=time_scatter_fmat+tcpu()-time00 +#endif #endif do i=1,dimen do j=1,2*my_ng_count @@ -532,7 +573,7 @@ c include 'COMMON.NAMES' double precision radius(maxres2),gamvec(maxres2) parameter (twosix=1.122462048309372981d0) - logical lprn /.true./ + logical lprn /.false./ c c determine new friction coefficients every few SD steps c