small changes in cation cation interactions and wham correction
[unres4.git] / source / wham / enecalc.F90
index 9adc19a..f1546ad 100644 (file)
@@ -1478,13 +1478,22 @@ write(iout,*)"end of store_parm"
 #endif
           enddo   ! i
 #ifdef MPI
+          scount_(:)=0
           do i=1,scount(me1)
             Fdimless_(i)=Fdimless(i)
           enddo
+          write(iout,*) "before gather Fdimless"
+          write(iout,*) scount(me),scount_(0),idispl(0)
+          write (iout,*) "added update of scount_"
+         call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount_(0), 1, &
+        MPI_INTEGER, WHAM_COMM, IERROR)
+
+
           call MPI_Gatherv(Fdimless_(1),scount(me),&
            MPI_REAL,Fdimless(1),&
            scount_(0),idispl(0),MPI_REAL,Master,&
            WHAM_COMM, IERROR)
+          write(iout,*) "after gather Fdimless"
 #ifdef DEBUG
           call MPI_Gatherv(potE(1,iparm),scount_(me),&
            MPI_DOUBLE_PRECISION,potE(1,iparm),&