cluster average over multiple temperatures
[unres.git] / source / cluster / wham / src-M / main_clust.F
index 9835c01..5b3cfe8 100644 (file)
@@ -41,6 +41,7 @@ C
       double precision hrtime,mintime,sectime
       logical eof
       external ilen
+      integer nTend
 #ifdef MPI
       call MPI_Init( IERROR )
       call MPI_Comm_rank( MPI_COMM_WORLD, me, IERROR )
@@ -62,6 +63,7 @@ C
 
       call initialize
       call openunits
+      call cinfo
       call parmread
       call read_control
       call molread
@@ -122,7 +124,12 @@ c      call flush(iout)
       write (iout,*) 'from read_coords: ncon',ncon
       
       write (iout,*) "nT",nT
-      do iT=1,nT
+      if (cumul_prob) then
+        nTend=1
+      else
+        nTend=nT
+      endif
+      do iT=1,nTend
       write (iout,*) "iT",iT
 #ifdef MPI
       call work_partition(.true.,ncon)
@@ -148,8 +155,6 @@ C
 C CALCULATE DISTANCES
 C
       call daread_ccoords(1,ncon_work)
-      write (iout,*) "AM I HERE"
-      call flush(iout)
       ind1=0
       DO I=1,NCON_work-1
         if (mod(i,100).eq.0) print *,'Calculating RMS i=',i
@@ -191,7 +196,7 @@ c          write (iout,'(2i4,i10,f10.5)') i,j,ind,DISS(IND)
 
 
 #ifdef MPI
-      WRITE (iout,*) "Wchodze do call MPI_Gatherv"
+c      WRITE (iout,*) "Wchodze do call MPI_Gatherv"
       call MPI_Gatherv(diss_buf(1),scount_buf,MPI_REAL,diss(1),
      &     scount(0),idispl(0),MPI_REAL,Master,MPI_COMM_WORLD, IERROR)
       if (me.eq.master) then