--- trunk/OOPSE/libmdtools/do_Forces.F90 2003/03/31 21:50:59 438 +++ trunk/OOPSE/libmdtools/do_Forces.F90 2003/03/31 22:09:39 439 @@ -4,7 +4,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: do_Forces.F90,v 1.5 2003-03-31 21:50:59 chuckv Exp $, $Date: 2003-03-31 21:50:59 $, $Name: not supported by cvs2svn $, $Revision: 1.5 $ +!! @version $Id: do_Forces.F90,v 1.6 2003-03-31 22:09:39 chuckv Exp $, $Date: 2003-03-31 22:09:39 $, $Name: not supported by cvs2svn $, $Revision: 1.6 $ module do_Forces use force_globals @@ -167,8 +167,8 @@ contains logical ( kind = 2) :: do_pot_c, do_stress_c logical :: do_pot logical :: do_stress -#ifdef IS_MPI - real( kind = DP ) :: pot_local +#ifdef IS_MPI + real( kind = DP ) :: pot_local = 0.0_dp integer :: nrow integer :: ncol #endif @@ -411,20 +411,20 @@ contains if (do_pot) then ! scatter/gather pot_row into the members of my column call scatter(pot_Row, pot_Temp, plan_row) - + ! scatter/gather pot_local into all other procs ! add resultant to get total pot do i = 1, nlocal pot_local = pot_local + pot_Temp(i) enddo + + pot_Temp = 0.0_DP - pot_Temp = 0.0_DP - call scatter(pot_Col, pot_Temp, plan_col) do i = 1, nlocal pot_local = pot_local + pot_Temp(i) enddo - + endif #endif @@ -472,7 +472,6 @@ contains #ifdef IS_MPI if (do_pot) then - write(*,*) "Fortran is on pot:, pot, pot_local ", pot,pot_local pot = pot_local !! we assume the c code will do the allreduce to get the total potential !! we could do it right here if we needed to...