Commit Adam 6/29/2014
[unres.git] / source / wham / src-restraints / enecalc1.F
index 6c39f6c..3a4a3a3 100644 (file)
@@ -33,7 +33,7 @@
       double precision rmsnat,gyrate
       external rmsnat,gyrate
       double precision tole /1.0d-1/
-      integer i,itj,ii,iii,j,k,l,licz
+      integer i,itj,ii,iii,j,k,l,licz,scme
       integer ir,ib,ipar,iparm
       integer iscor,islice
       real*4 csingle(3,maxres2)
@@ -154,7 +154,6 @@ c     &   " kfac",kfac,"quot",quot," fT",fT
      &      wtor_d,wsccor,wbond
 #endif
         call etotal(energia(0),fT)
-#define DEBUG
 #ifdef DEBUG
         write (iout,*) "Conformation",i
         call enerprint(energia(0),fT)
@@ -162,7 +161,6 @@ c        write (iout,'(2i5,21f8.2)') i,iparm,(energia(k),k=1,21)
 c        write (iout,*) "ftors",ftors
 c        call intout
 #endif
-#undef DEBUG
         if (energia(0).ge.1.0d20) then
           write (iout,*) "NaNs detected in some of the energy",
      &     " components for conformation",ii+1
@@ -275,6 +273,7 @@ c     &   " snk",snk_p(iR,ib,ipar)
       write (iout,*) "Me",me," scount",scount(me)
       call flush(iout)
 c  Master gathers updated numbers of conformations written by all procs.
+      scme = scount(me)
       call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1, 
      &  MPI_INTEGER, WHAM_COMM, IERROR)
       indstart(0)=1