if (nfgtasks.gt.1)
& call MPI_Bcast(-1,1,MPI_INTEGER,king,FG_COMM,IERROR)
time1=MPI_WTIME()
-c if (me.eq.king .or. .not. out1file) then
+ if (me.eq.king .or. .not. out1file) then
write (iout,'(a,i4,a)') 'CG processor',me,' is finishing work.'
write (iout,*) 'Total wall clock time',time1-walltime,' sec'
if (nfgtasks.gt.1) then
& time_scatter," SENDRECV",time_sendrecv,
& " BARRIER ene",time_barrier_e," BARRIER grad",time_barrier_g
endif
-c endif
+ endif
write (*,'(a,i4,a)') 'CG processor',me,' is finishing work.'
if (ilen(tmpdir).gt.0) then
write (*,*) "Processor",me,
time02=MPI_WTIME()
synflag=.false.
- write(iout,*) 'REMD before',me,t_bath
+c write(iout,*) 'REMD before',me,t_bath
c call mpi_gather(t_bath,1,mpi_double_precision,
c & remd_t_bath,1,mpi_double_precision,king,
c write (iout,*) "Gather itask_cont_to ended"
c call flush(iout)
if (fg_rank.eq.king) then
+ if (me.eq.0 .or. .not. out1file) then
write (iout,*)"Contact receive task map (proc, #tasks, tasks)"
do i=0,nfgtasks-1
write (iout,'(20i4)') i,ntask_cont_from_all(i),
enddo
write (iout,*)
call flush(iout)
+ endif
C Check if every send will have a matching receive
ncheck_to=0
ncheck_from=0
ncheck_to=ncheck_to+ntask_cont_to_all(i)
ncheck_from=ncheck_from+ntask_cont_from_all(i)
enddo
- write (iout,*) "Control sums",ncheck_from,ncheck_to
+ if (me.eq.0 .or. .not. out1file)
+ & write (iout,*) "Control sums",ncheck_from,ncheck_to
if (ncheck_from.ne.ncheck_to) then
write (iout,*) "Error: #receive differs from #send."
write (iout,*) "Terminating program...!"
my_ng_count=igmult_end-igmult_start
call MPI_Allgather(3*my_ng_count,1,MPI_INTEGER,ng_counts(0),1,
& MPI_INTEGER,FG_COMM,IERROR)
- write (iout,*) 'Processor:',fg_rank,' CG group',kolor,
+ if (me.eq.king .or. .not. out1file) then
+ write (iout,*) 'Processor:',fg_rank,' CG group',kolor,
& ' absolute rank',myrank,' igmult_start',igmult_start,
& ' igmult_end',igmult_end,' count',my_ng_count
- write (iout,*) "ng_start",(ng_start(i),i=0,nfgtasks-1)
- write (iout,*) "ng_counts",(ng_counts(i),i=0,nfgtasks-1)
- call flush(iout)
+ write (iout,*) "ng_start",(ng_start(i),i=0,nfgtasks-1)
+ write (iout,*) "ng_counts",(ng_counts(i),i=0,nfgtasks-1)
+ call flush(iout)
+ endif
else
#endif
igmult_start=1
enddo
call flush(iout)
endif
- write (2,*) "Start reading THETA_PDB",ithep_pdb
+c write (2,*) "Start reading THETA_PDB",ithep_pdb
do i=1,ntyp
c write (2,*) 'i=',i
read (ithep_pdb,*,err=111,end=111)
gthet(j,i)=gthet(j,-i)
enddo
enddo
- write (2,*) "End reading THETA_PDB"
+c write (2,*) "End reading THETA_PDB"
close (ithep_pdb)
#endif
close(ithep)
C Read the parameters of the probability distribution/energy expression
C of the side chains.
C
- write (2,*) "Start reading ROTAM_PDB"
+c write (2,*) "Start reading ROTAM_PDB"
do i=1,ntyp
read (irotam_pdb,'(3x,i3,f8.3)',end=112,err=112) nlob(i),dsc(i)
if (i.eq.10) then
endif
enddo
close (irotam_pdb)
- write (2,*) "End reading ROTAM_PDB"
+c write (2,*) "End reading ROTAM_PDB"
#endif
close(irotam)
do i=-ntyp,-1
itortyp(i)=-itortyp(-i)
enddo
- write (iout,*) 'ntortyp',ntortyp
+c write (iout,*) 'ntortyp',ntortyp
do i=0,ntortyp-1
do j=-ntortyp+1,ntortyp-1
read (itorp,*,end=113,err=113) nterm(i,j,iblock),
itype(ires_old)=ntyp1
iterter(ires_old)=1
ibeg=2
- write (iout,*) "Chain ended",ires,ishift,ires_old
+c write (iout,*) "Chain ended",ires,ishift,ires_old
if (unres_pdb) then
do j=1,3
dc(j,ires)=sccor(j,iii)
ires=ires_old
cycle
else if (ibeg.eq.1) then
- write (iout,*) "BEG ires",ires
+c write (iout,*) "BEG ires",ires
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
c Start a new chain
ishift=-ires_old+ires-1
ires=ires_old+1
- write (iout,*) "New chain started",ires,ishift
+c write (iout,*) "New chain started",ires,ishift
ibeg=0
else
ishift=ishift-(ires-ishift+ishift1-ires_old-1)
endif
enddo
enddo
- write (iout,*) chain_length
+c write (iout,*) chain_length
if (chain_length.eq.0) chain_length=nres
do j=1,3
chain_rep(j,chain_length,symetr)=chain_rep(j,chain_length,1)
c enddo
c enddiagnostic
C makes copy of chains
- write (iout,*) "symetr", symetr
+c write (iout,*) "symetr", symetr
if (symetr.gt.1) then
call permut(symetr)
itype(ires_old)=ntyp1
iterter(ires_old)=1
ibeg=2
- write (iout,*) "Chain ended",ires,ishift,ires_old
+c write (iout,*) "Chain ended",ires,ishift,ires_old
if (unres_pdb) then
do j=1,3
dc(j,ires)=sccor(j,iii)
c Start a new chain
ishift=-ires_old+ires-1
ires=ires_old+1
- write (iout,*) "New chain started",ires,ishift
+c write (iout,*) "New chain started",ires,ishift
ibeg=0
else
ishift=ishift-(ires-ishift+ishift1-ires_old-1)
enddo
enddo
- write (iout,*) chain_length
+c write (iout,*) chain_length
if (chain_length.eq.0) chain_length=nres
do j=1,3
chain_rep(j,chain_length,symetr)=chain_rep(j,chain_length,1)
if ((lipbufthick*2.0d0).gt.lipthick)
&write(iout,*) "WARNING WRONG SIZE OF LIP AQ BUF"
endif
- write(iout,*) "bordliptop=",bordliptop
- write(iout,*) "bordlipbot=",bordlipbot
- write(iout,*) "bufliptop=",bufliptop
- write(iout,*) "buflipbot=",buflipbot
+c write(iout,*) "bordliptop=",bordliptop
+c write(iout,*) "bordlipbot=",bordlipbot
+c write(iout,*) "bufliptop=",bufliptop
+c write(iout,*) "buflipbot=",buflipbot
if (me.eq.king .or. .not.out1file )
c write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup
call flush(iout)
if (constr_dist.gt.0) call read_dist_constr
- write (iout,*) "After read_dist_constr nhpb",nhpb
+c write (iout,*) "After read_dist_constr nhpb",nhpb
if ((AFMlog.gt.0).or.(selfguide.gt.0)) call read_afminp
if(me.eq.king.or..not.out1file)
& write (iout,*) 'Contact order:',co
include 'DIMENSIONS'
include 'COMMON.MINIM'
include 'COMMON.IOUNITS'
+ include 'COMMON.CONTROL'
+ include 'COMMON.SETUP'
character*80 ucase
character*320 minimcard
call card_concat(minimcard)
print_min_stat=min0(index(minimcard,'PRINT_MIN_STAT'),1)
print_min_res=min0(index(minimcard,'PRINT_MIN_RES'),1)
print_min_ini=min0(index(minimcard,'PRINT_MIN_INI'),1)
+#ifdef MPI
+ if (.not. out1file .or. me.eq.king) then
+#endif
write (iout,'(/80(1h*)/20x,a/80(1h*))')
& 'Options in energy minimization:'
write (iout,'(4(a,i5),a,1pe14.5,a,1pe14.5)')
& 'MaxMin:',MaxMin,' MaxFun:',MaxFun,
& 'MinMin:',MinMin,' MinFun:',MinFun,
& ' TolF:',TolF,' RTolF:',RTolF
+#ifdef MPI
+ endif
+#endif
return
end
c----------------------------------------------------------------------------
read2sigma=(index(controlcard,'READ2SIGMA').gt.0)
start_from_model=(index(controlcard,'START_FROM_MODELS').gt.0)
if(.not.read2sigma.and.start_from_model) then
- write(iout,*) 'START_FROM_MODELS works only with READ2SIGMA'
+ if(me.eq.king .or. .not. out1file .and. fg_rank.eq.0)
+ & write(iout,*) 'START_FROM_MODELS works only with READ2SIGMA'
start_from_model=.false.
endif
- if(start_from_model) write(iout,*) 'START_FROM_MODELS is ON'
+ if(start_from_model .and. (me.eq.king .or. .not. out1file))
+ & write(iout,*) 'START_FROM_MODELS is ON'
if(start_from_model .and. rest) then
- write(iout,*) 'START_FROM_MODELS is OFF'
- write(iout,*) 'remove restart keyword from input'
+ if(me.eq.king .or. .not. out1file .and. fg_rank.eq.0) then
+ write(iout,*) 'START_FROM_MODELS is OFF'
+ write(iout,*) 'remove restart keyword from input'
+ endif
endif
if (homol_nset.gt.1)then
call card_concat(controlcard)
lim_odl=0
lim_dih=0
c
- write(iout,*) 'nnt=',nnt,'nct=',nct
+c write(iout,*) 'nnt=',nnt,'nct=',nct
c
do i = nnt,nct
do k=1,constr_homology
do k=1,constr_homology
read(inp,'(a)') pdbfile
-c Next stament causes error upon compilation (?)
-c if(me.eq.king.or. .not. out1file)
-c write (iout,'(2a)') 'PDB data will be read from file ',
-c & pdbfile(:ilen(pdbfile))
- write (iout,'(a,5x,a)') 'HOMOL: Opening PDB file',
+ if(me.eq.king .or. .not. out1file)
+ & write (iout,'(a,5x,a)') 'HOMOL: Opening PDB file',
& pdbfile(:ilen(pdbfile))
open(ipdbin,file=pdbfile,status='old',err=33)
goto 34
rescore(k,i_tmp)=rescore_tmp
rescore2(k,i_tmp)=rescore2_tmp
rescore3(k,i_tmp)=rescore3_tmp
- write(iout,'(a7,i5,3f10.5,i5)') "rescore",
+ if (.not. out1file .or. me.eq.king)
+ & write(iout,'(a7,i5,3f10.5,i5)') "rescore",
& i_tmp,rescore2_tmp,rescore_tmp,
& rescore3_tmp,idomain_tmp
else