Merge branch 'prerelease-3.2.1' into czarek
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 19 Feb 2013 00:10:29 +0000 (01:10 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 19 Feb 2013 00:10:29 +0000 (01:10 +0100)
Conflicts:
bin/unres/MD/unres_gfortran_single_GAB.exe
bin/unres/MD/unres_ifort_MPICH_GAB.exe
source/unres/src_MD/cinfo.f

bin/unres/MD/unres_ifort_MPICH_E0LL2Y.exe
source/unres/src_MD/cinfo.f
source/unres/src_MD/energy_p_new_barrier.F
source/unres/src_MD/readrtns.F
source/unres/src_MD/ssMD.F

index c9769dd..709c25e 100755 (executable)
Binary files a/bin/unres/MD/unres_ifort_MPICH_E0LL2Y.exe and b/bin/unres/MD/unres_ifort_MPICH_E0LL2Y.exe differ
index 07a66c9..2e0a78a 100644 (file)
@@ -1,10 +1,10 @@
 C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 3 1 53
+C 3 2 104
       subroutine cinfo
       include 'COMMON.IOUNITS'
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 3.1 build 53'
-      write(iout,*)'compiled Sun Feb 17 03:17:55 2013'
+      write(iout,*)'Version 3.2 build 104'
+      write(iout,*)'compiled Tue Feb 19 01:04:40 2013'
       write(iout,*)'compiled by czarek@piasek3'
       write(iout,*)'OS name:    Linux '
       write(iout,*)'OS release: 2.6.32-42-generic '
index d2cea5f..8d588af 100644 (file)
@@ -134,7 +134,7 @@ C
 cmc
 cmc Sep-06: egb takes care of dynamic ss bonds too
 cmc
-      if (dyn_ss) call dyn_set_nss
+c      if (dyn_ss) call dyn_set_nss
 
 c      print *,"Processor",myrank," computed USCSC"
 #ifdef TIMING
@@ -331,6 +331,7 @@ C
       energia(23)=evdw_m
 c      print *," Processor",myrank," calls SUM_ENERGY"
       call sum_energy(energia,.true.)
+      if (dyn_ss) call dyn_set_nss
 c      print *," Processor",myrank," left SUM_ENERGY"
 #ifdef TIMING
 #ifdef MPI
index 332a2f7..b861fdb 100644 (file)
@@ -940,8 +940,8 @@ C 10/03/12 Adam: Recalculate coordinates with new side chain positions
          call chainbuild
         endif  
 C Following 2 lines for diagnostics; comment out if not needed
-        write (iout,*) "After sideadd"
-        call intout
+c        write (iout,*) "After sideadd"
+c        call intout
       endif
       if (indpdb.eq.0) then
 C Read sequence if not taken from the pdb file.
@@ -1357,7 +1357,8 @@ C Check whether the specified bridging residues are cystines.
 C Read preformed bridges.
       if (ns.gt.0) then
       read (inp,*) nss,(ihpb(i),jhpb(i),i=1,nss)
-      write (iout,*) 'nss=',nss,' ihpb,jhpb: ',(ihpb(i),jhpb(i),i=1,nss)
+      if(fg_rank.eq.0)
+     & write(iout,*)'nss=',nss,' ihpb,jhpb: ',(ihpb(i),jhpb(i),i=1,nss)
       if (nss.gt.0) then
         nhpb=nss
 C Check if the residues involved in bridges are in the specified list of
@@ -2485,7 +2486,7 @@ c        write (iout,*) i,ifrag_(1,i),ifrag_(2,i),wfrag_(i)
         if (wfrag_(i).gt.0.0d0) then
         do j=ifrag_(1,i),ifrag_(2,i)-1
           do k=j+1,ifrag_(2,i)
-            write (iout,*) "j",j," k",k
+c            write (iout,*) "j",j," k",k
             ddjk=dist(j,k)
             if (constr_dist.eq.1) then
             nhpb=nhpb+1
index dc205be..eab3c70 100644 (file)
@@ -512,9 +512,13 @@ c      implicit none
 
 c     Includes
       include 'DIMENSIONS'
+#ifdef MPI
+      include "mpif.h"
+#endif
       include 'COMMON.SBRIDGE'
       include 'COMMON.CHAIN'
       include 'COMMON.IOUNITS'
+      include 'COMMON.SETUP'
 #ifndef CLUST
 #ifndef WHAM
       include 'COMMON.MD'
@@ -528,7 +532,8 @@ c     Local variables
      &     allihpb(maxdim),alljhpb(maxdim),
      &     newnss,newihpb(maxdim),newjhpb(maxdim)
       logical found
-
+      integer i_newnss(max_fg_procs),displ(max_fg_procs)
+      integer g_newihpb(maxdim),g_newjhpb(maxdim),g_newnss
 
       allnss=0
       do i=1,nres-1
@@ -576,6 +581,37 @@ cmc      write(iout,*)"ALLNSS ",allnss,(allihpb(i),alljhpb(i),i=1,allnss)
           newjhpb(newnss)=alljhpb(i)
         endif
       enddo
+
+#ifdef MPI
+      if (nfgtasks.gt.1)then
+
+        call MPI_Reduce(newnss,g_newnss,1,
+     &    MPI_INTEGER,MPI_SUM,king,FG_COMM,IERR)
+        call MPI_Gather(newnss,1,MPI_INTEGER,
+     &                  i_newnss,1,MPI_INTEGER,king,FG_COMM,IERR)
+        displ(0)=0
+        do i=1,nfgtasks-1,1
+          displ(i)=i_newnss(i-1)+displ(i-1)
+        enddo
+        call MPI_Gatherv(newihpb,newnss,MPI_INTEGER,
+     &                   g_newihpb,i_newnss,displ,MPI_INTEGER,
+     &                   king,FG_COMM,IERR)     
+        call MPI_Gatherv(newjhpb,newnss,MPI_INTEGER,
+     &                   g_newjhpb,i_newnss,displ,MPI_INTEGER,
+     &                   king,FG_COMM,IERR)     
+        if(fg_rank.eq.0) then
+c         print *,'g_newnss',g_newnss
+c         print *,'g_newihpb',(g_newihpb(i),i=1,g_newnss)
+c         print *,'g_newjhpb',(g_newjhpb(i),i=1,g_newnss)
+         newnss=g_newnss  
+         do i=1,newnss
+          newihpb(i)=g_newihpb(i)
+          newjhpb(i)=g_newjhpb(i)
+         enddo
+        endif
+      endif
+#endif
+
       diff=newnss-nss
 
 cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
@@ -588,7 +624,8 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
         enddo
 #ifndef CLUST
 #ifndef WHAM
-        if (.not.found) write(iout,'(a15,f12.2,f8.1,2i5)')
+        if (.not.found.and.fg_rank.eq.0) 
+     &      write(iout,'(a15,f12.2,f8.1,2i5)')
      &       "SSBOND_BREAK",totT,t_bath,idssb(i),jdssb(i)
 #endif
 #endif
@@ -602,7 +639,8 @@ cmc      write(iout,*)"NEWNSS ",newnss,(newihpb(i),newjhpb(i),i=1,newnss)
         enddo
 #ifndef CLUST
 #ifndef WHAM
-        if (.not.found) write(iout,'(a15,f12.2,f8.1,2i5)')
+        if (.not.found.and.fg_rank.eq.0) 
+     &      write(iout,'(a15,f12.2,f8.1,2i5)')
      &       "SSBOND_FORM",totT,t_bath,newihpb(i),newjhpb(i)
 #endif
 #endif