+#ifdef MPI
Subroutine together
c feeds tasks for parallel processing
implicit real*8 (a-h,o-z)
if (irestart.eq.1) goto 111
c soldier - perform energy minimization
334 call minim_jlee
+
+
ENDIF
ccccccccccccccccccccccccccccccccccc
call find_max
call find_min
-
- call get_diff
+
+ if (tm_score) then
+ call get_diff_p
+ else
+ call get_diff
+ endif
if(nbank.eq.nconf.and.irestart.eq.0) then
adif=avedif
endif
+ write (iout,*) "AVEDIF",avedif
cutdif=adif/cut1
ctdif1=adif/cut2
irecv=irecv+1
call recv(0,ifrom,xout,eout,ind,timeout)
ct print *,' ',irecv,' received from',ifrom,MPI_WTIME()
+
+ if(tm_score) then
+ nft=nft+ind(3)
+ movernx(irecv)=iabs(ind(5))
+ call getx(ind,xout,eout,cout,rad,iw_pdb,irecv)
+ if(vdisulf) then
+ nss_out(irecv)=nss
+ do i=1,nss
+ iss_out(i,irecv)=ihpb(i)
+ jss_out(i,irecv)=jhpb(i)
+ enddo
+ endif
+ if(iw_pdb.gt.0)
+ & call write_csa_pdb(xout,eout,nft,irecv,iw_pdb)
+ endif
+
+ if(tm_score.and.eout(1).lt.ebmax) then
+ if(iref.eq.0 .or.
+ & (rmsn(irecv).le.rmscut.and.pncn(irecv).ge.pnccut))
+ & call refresh_bank_master_tmscore(ifrom,eout(1),irecv)
+ endif
else
ifrom=ifrom+1
endif
ct print *,isent,' sent ',MPI_WTIME()
c store results -----------------------------------------------
- if (isent.ge.nodes.or.iter.gt.0) then
+ if ((isent.ge.nodes.or.iter.gt.0).and..not.tm_score) then
nft=nft+ind(3)
movernx(irecv)=iabs(ind(5))
call getx(ind,xout,eout,cout,rad,iw_pdb,irecv)
iter=iter+1
c----------------- call update(ntry-nodes+1) -------------------
nstep=nstep+ntry-nseed-(nodes-1)
- call refresh_bank(ntry-nodes+1)
+ if (tm_score) then
+ctm call refresh_bank(ntry)
+ call print_mv_stat
+ do i=0,mxmv
+ do j=1,3
+ nstatnx_tot(i,j)=nstatnx_tot(i,j)+nstatnx(i,j)
+ nstatnx(i,j)=0
+ enddo
+ enddo
+ else
+ call refresh_bank(ntry-nodes+1)
+ endif
c!bankt call refresh_bankt(ntry-nodes+1)
else
c----------------- call update(ntry) ---------------------------
print *,'UPDATING ',ntry,irecv
write(iout,*) 'UPDATING ',ntry
nstep=nstep+ntry-nseed
- call refresh_bank(ntry)
+ if (tm_score) then
+ctm call refresh_bank(ntry)
+ call print_mv_stat
+ do i=0,mxmv
+ do j=1,3
+ nstatnx_tot(i,j)=nstatnx_tot(i,j)+nstatnx(i,j)
+ nstatnx(i,j)=0
+ enddo
+ enddo
+ else
+ call refresh_bank(ntry)
+ endif
c!bankt call refresh_bankt(ntry)
endif
c-----------------------------------------------------------------
irecv=0
endif
ELSE
+ if (tm_score) then
+ call get_diff_p
+ endif
c soldier - perform energy minimization
call minim_jlee
print *,'End of minim, proc',me,'time ',MPI_WTIME()-time_start
return
end
+#else
+ Subroutine together
+c feeds tasks for parallel processing
+ implicit real*8 (a-h,o-z)
+ include 'DIMENSIONS'
+ include 'COMMON.IOUNITS'
+ write (iout,*) "Unsupported option for the serial version"
+ return
+ end
+#endif
+#ifdef MPI
c-------------------------------------------------
subroutine feedin(nconf,nft)
c sends out starting conformations and receives results of energy minimization
include 'COMMON.CHAIN'
include 'COMMON.CONTACTS'
dimension ind(9),xout(maxvar),eout(mxch*(mxch+1)/2+1)
+ dimension cout(2)
cjlee
double precision przes(3),obr(3,3)
logical non_conv
c print *,'sending halt to ',man
write(iout,*) 'sending halt to ',man
info(1)=0
+ info(2)=0
call mpi_send(info,12,mpi_integer,man,idint,CG_COMM,ierr)
endif
return
#endif
return
end
+#endif