MREMD corrected; Langevin mode (bcast instead of scatter i2rep)
[unres.git] / source / unres / src_MD-M / MREMD.F
index 026c1b6..66532d0 100644 (file)
@@ -1792,10 +1792,14 @@ c     &                (d_restart1(j,i+2*nres*il),j=1,3)
               enddo
              endif
 #endif
-              call mpi_scatter(i2set,1,mpi_integer,
-     &           iset,1,mpi_integer,king,
-     &           CG_COMM,ierr) 
-
+Corrected AL 8/19/2014: each processor needs whole iset array not only its
+c own element
+c              call mpi_scatter(i2set,1,mpi_integer,
+c     &           iset,1,mpi_integer,king,
+c     &           CG_COMM,ierr)
+              call mpi_bcast(i2set(0),nodes,mpi_integer,king,
+     &         CG_COMM,ierr)
+              iset=i2set(me)
            endif