Fixed the following components:
authorAdam Liwo <adam@piasek4.chem.univ.gda.pl>
Thu, 14 May 2015 09:34:07 +0000 (11:34 +0200)
committerAdam Liwo <adam@piasek4.chem.univ.gda.pl>
Thu, 14 May 2015 09:34:07 +0000 (11:34 +0200)
 - wham: in whamcalc1.F added ehomology_constr and DFA energy components to
         the minimal free energies; lack of this was often causing NaNs in
         the *.thermal files.
- cluster: (i) assigned logical unit 38 to ientin (unasigned in the previou
         source; (ii) Fixed buffer conflict in MPI_AllGather
- wham and cluster: ebend made compatible with that of the unres component

source/cluster/wham/src/energy_p_new.F
source/cluster/wham/src/initialize_p.F
source/unres/src_MD/MP.F
source/unres/src_MD/MREMD.F
source/unres/src_MD/Makefile_MPICH_ifort
source/unres/src_MD/energy_p_new_barrier.F
source/wham/src/enecalc1.F
source/wham/src/energy_p_new.F
source/wham/src/initialize_p.F

index 471eb5d..8ec2d70 100644 (file)
@@ -3,7 +3,7 @@
       include 'DIMENSIONS'
       include 'sizesclu.dat'
 
-      external proc_proc
+c     external proc_proc
 #ifdef WINPGI
 cMS$ATTRIBUTES C ::  proc_proc
 #endif
@@ -189,7 +189,7 @@ c detecting NaNQ
 #ifdef WINPGI
       idumm=proc_proc(etot,i)
 #else
-      call proc_proc(etot,i)
+c     call proc_proc(etot,i)
 #endif
       if(i.eq.1)energia(0)=1.0d+99
 #ifdef MPL
@@ -3438,8 +3438,6 @@ c
 c        sgtheta=-gtheta(k)*theta_diff(k)*sigma_theta(k,i)*waga_theta ! right functional form?
           sum_sgtheta=sum_sgtheta+sgtheta ! cum variable
         enddo
-c       grad_theta3=sum_sgtheta/sum_gtheta 1/*theta(i)? s. line below
-c       grad_theta3=sum_sgtheta/sum_gtheta
 c
 c       Final value of gradient using same var as in Econstr_back
         dutheta(i-2)=sum_sgtheta/sum_gtheta*waga_theta
@@ -4052,7 +4050,7 @@ C
           enddo
         else
           phii1=0.0d0
-          ityp3=nthetyp+1
+          ityp3=ithetyp(itype(i))
           do k=1,nsingle
             cosph2(k)=0.0d0
             sinph2(k)=0.0d0
index 3f0e04b..38ecbf3 100644 (file)
@@ -58,6 +58,7 @@ C
       ibond=28
       isccor=29
       jrms=30
+      ientin=38
 C
 C Set default weights of the energy terms.
 C
index b08897c..724b5fb 100644 (file)
@@ -34,6 +34,7 @@ c  determine # of nodes and current node
       endif
       Nprocs=nodes
       MyRank=me
+      write (*,*) "nodes",nodes," rank",me
 C Determine the number of "fine-grain" tasks
       call getenv_loc("FGPROCS",cfgprocs)
       read (cfgprocs,'(i3)') nfgtasks
index bb1353e..65f7dd0 100644 (file)
@@ -1999,6 +1999,14 @@ c     &                (d_restart1(j,i+2*nres*il),j=1,3)
 #endif
             enddo
                enddo
+#ifdef DEBUG
+            write (iout,*) "Conformation read",il
+            do i=1,nres
+              write (iout,'(i5,3f10.5,5x,3f10.5)') 
+     &          i,(d_restart1(j,i+2*nres*il),j=1,3),
+     &            (d_restart1(j,nres+i+2*nres*il),j=1,3)
+            enddo
+#endif
               enddo
          endif
          call mpi_scatter(d_restart1,3*2*nres,mpi_real,
index 8c860d5..a747321 100644 (file)
@@ -16,6 +16,7 @@ FFLAGSE = -c  -O3 -ipo  -opt_report -I$(INSTALL_DIR)/include
 
 # -lmpl necessary in mpich
 LIBS = -L$(INSTALL_DIR)/lib -lmpich xdrf/libxdrf.a -lmpl -CB
+#LIBS = -L$(INSTALL_DIR)/lib -lmpich xdrf/libxdrf.a -CB
 
 ARCH = LINUX
 PP = /lib/cpp -P
@@ -68,6 +69,7 @@ GAB: ${object} xdrf/libxdrf.a
 E0LL2Y: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DAMD64 -DUNRES -DISNAN -DMP -DMPI \
        -DSPLITELE -DLANG0
 E0LL2Y: BIN = ../../../bin/unres/MD/unres_ifort_MPICH2_E0LL2Y.exe
+#E0LL2Y: BIN = ../../../bin/unres/MD/unres_ifort_MPICH_E0LL2Y.exe
 E0LL2Y: ${object} xdrf/libxdrf.a
        cc -o compinfo compinfo.c
        ./compinfo | true
index 3316a1f..60cb90b 100644 (file)
@@ -6527,9 +6527,12 @@ c
      &              waga_theta*Eval+waga_d*Erot)*waga_homology(iset)
 c     write (iout,*) "ehomology_constr=",ehomology_constr
       endif
-c     write (iout,*) "odleg",odleg," kat",kat," Uconst_back",Uconst_back
-c     write (iout,*) "ehomology_constr",ehomology_constr
-c     ehomology_constr=odleg+kat+Uconst_back
+#ifdef DEBUG
+      write (iout,*) "odleg",waga_dist,odleg," kat",waga_angle,kat,
+     & "Eval",waga_theta,eval,
+     &   "Erot",waga_d,Erot
+      write (iout,*) "ehomology_constr",ehomology_constr
+#endif
       return
 c
 c FP 01/15 end
index 5ef4d77..dcf6a97 100644 (file)
@@ -47,6 +47,7 @@
       integer snk_p(MaxR,MaxT_h,Max_parm)
       logical lerr
       character*64 bprotfile_temp
+      integer scount_t(0:maxprocs-1)
       call opentmp(islice,ientout,bprotfile_temp)
       iii=0
       ii=0
@@ -203,20 +204,21 @@ c        call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
      &         " the value read in: ",energia(0),eini," point",
      &         iii+1,indstart(me1)+iii," T",
      &         1.0d0/(1.987D-3*beta_h(ib,ipar))
+#ifdef DEBUG
              call enerprint(energia(0),fT)
-            write (iout,'(4f10.5,2i5)') 0.0,energia(0),0.0,
+             write (iout,'(4f10.5,2i5)') 0.0,energia(0),0.0,
      &       1.0d0/(beta_h(ib,ipar)*1.987D-3),
      &       0,0
-            write(iout,'(8f10.5)')
+             write(iout,'(8f10.5)')
      &       ((c(l,k),l=1,3),k=1,nres),
      &       ((c(l,k+nres),l=1,3),k=nnt,nct)
-c             itmp=ipdb
-c             ipdb=iout
-c             call pdbout(iii+1,beta_h(ib,ipar),
-c     &                   eini,energia(0),0.0d0,rmsdev)
+             itmp=ipdb
+             ipdb=iout
+             call pdbout(iii+1,beta_h(ib,ipar),
+     &                   eini,energia(0),0.0d0,rmsdev)
              write (iout,*)
              ipdb=itmp
-
+#endif
               errmsg_count=errmsg_count+1
               if (errmsg_count.gt.maxerrmsg_count) 
      &          write (iout,*) "Too many warning messages"
@@ -291,8 +293,11 @@ c     &   " snk",snk_p(iR,ib,ipar)
       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, 
+      call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount_t(0), 1, 
      &  MPI_INTEGER, WHAM_COMM, IERROR)
+      do k=0,nprocs-1
+        scount(k) = scount_t(k)
+      enddo
       indstart(0)=1
       indend(0)=scount(0)
       do i=1, Nprocs-1
index 816e38e..3ca5082 100644 (file)
@@ -3510,8 +3510,6 @@ c
 c        sgtheta=-gtheta(k)*theta_diff(k)*sigma_theta(k,i)*waga_theta ! right functional form?
           sum_sgtheta=sum_sgtheta+sgtheta ! cum variable
         enddo
-c       grad_theta3=sum_sgtheta/sum_gtheta 1/*theta(i)? s. line below
-c       grad_theta3=sum_sgtheta/sum_gtheta
 c
 c       Final value of gradient using same var as in Econstr_back
         dutheta(i-2)=sum_sgtheta/sum_gtheta*waga_theta
@@ -3719,9 +3717,12 @@ c
      &              waga_theta*Eval+waga_d*Erot)*waga_homology(iset)
 c     write (iout,*) "ehomology_constr=",ehomology_constr
       endif
-c     write (iout,*) "odleg",odleg," kat",kat," Uconst_back",Uconst_back
-c     write (iout,*) "ehomology_constr",ehomology_constr
-c     ehomology_constr=odleg+kat+Uconst_back
+#ifdef DEBUG
+      write (iout,*) "odleg",waga_dist,odleg," kat",waga_angle,kat,
+     & "Eval",waga_theta,eval,
+     &   "Erot",waga_d,Erot
+      write (iout,*) "ehomology_constr",ehomology_constr
+#endif
       return
 
   748 format(a8,f12.3,a6,f12.3,a7,f12.3)
@@ -4129,7 +4130,8 @@ c      write (iout,*) "ithetyp",(ithetyp(i),i=1,ntyp1)
           enddo
         else
           phii1=0.0d0
-          ityp3=nthetyp+1
+c          ityp3=nthetyp+1
+          ityp3=ithetyp(itype(i))
           do k=1,nsingle
             cosph2(k)=0.0d0
             sinph2(k)=0.0d0
index 3184e1f..0ba3b77 100644 (file)
@@ -56,6 +56,7 @@ C
       ientout=19
       ibond=28
       isccor=29
+      ientin=38
 C
 C WHAM files
 C