ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/do_Forces.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/do_Forces.F90 (file contents):
Revision 438 by chuckv, Mon Mar 31 21:50:59 2003 UTC vs.
Revision 439 by chuckv, Mon Mar 31 22:09:39 2003 UTC

# Line 4 | Line 4
4  
5   !! @author Charles F. Vardeman II
6   !! @author Matthew Meineke
7 < !! @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 $
7 > !! @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 $
8  
9   module do_Forces
10    use force_globals
# Line 167 | Line 167 | contains
167      logical ( kind = 2) :: do_pot_c, do_stress_c
168      logical :: do_pot
169      logical :: do_stress
170 < #ifdef IS_MPI
171 <    real( kind = DP ) :: pot_local
170 > #ifdef IS_MPI
171 >    real( kind = DP ) :: pot_local = 0.0_dp
172      integer :: nrow
173      integer :: ncol
174   #endif
# Line 411 | Line 411 | contains
411      if (do_pot) then
412         ! scatter/gather pot_row into the members of my column
413         call scatter(pot_Row, pot_Temp, plan_row)
414 <      
414 >
415         ! scatter/gather pot_local into all other procs
416         ! add resultant to get total pot
417         do i = 1, nlocal
418            pot_local = pot_local + pot_Temp(i)
419         enddo
420 +      
421 +       pot_Temp = 0.0_DP
422  
421       pot_Temp = 0.0_DP
422
423         call scatter(pot_Col, pot_Temp, plan_col)
424         do i = 1, nlocal
425            pot_local = pot_local + pot_Temp(i)
426         enddo
427 <      
427 >
428      endif    
429   #endif
430  
# Line 472 | Line 472 | contains
472   #ifdef IS_MPI
473  
474      if (do_pot) then
475       write(*,*) "Fortran is on pot:, pot, pot_local ", pot,pot_local
475         pot = pot_local
476         !! we assume the c code will do the allreduce to get the total potential
477         !! we could do it right here if we needed to...

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines