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 834 by gezelter, Tue Oct 28 20:09:45 2003 UTC vs.
Revision 891 by mmeineke, Fri Dec 19 20:36:35 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.33 2003-10-28 20:09:38 gezelter Exp $, $Date: 2003-10-28 20:09:38 $, $Name: not supported by cvs2svn $, $Revision: 1.33 $
7 > !! @version $Id: do_Forces.F90,v 1.40 2003-12-19 20:36:35 mmeineke Exp $, $Date: 2003-12-19 20:36:35 $, $Name: not supported by cvs2svn $, $Revision: 1.40 $
8  
9   module do_Forces
10    use force_globals
# Line 46 | Line 46 | module do_Forces
46    public :: setRlistDF
47  
48   #ifdef PROFILE
49 <  real(kind = dp) :: forceTime
50 <  real(kind = dp) :: forceTimeInitial, forceTimeFinal
51 <  real(kind = dp) :: globalForceTime
52 <  real(kind = dp) :: maxForceTime
53 <  integer, save :: nloops = 0
49 >  public :: getforcetime
50 >  real, save :: forceTime = 0
51 >  real :: forceTimeInitial, forceTimeFinal
52 >  integer :: nLoops
53   #endif
54  
55   contains
# Line 231 | Line 230 | contains
230      integer :: listerror, error
231      integer :: localError
232  
233 <    real(kind=dp) :: listSkin = 1.0
235 <    
233 >    real(kind=dp) :: listSkin = 1.0  
234  
235      !! initialize local variables  
236  
# Line 445 | Line 443 | contains
443   #ifdef IS_MPI
444      
445      if (update_nlist) then
448      
446         !! save current configuration, construct neighbor list,
447         !! and calculate forces
448         call saveNeighborList(nlocal, q)
# Line 511 | Line 508 | contains
508   #else
509      
510      if (update_nlist) then
511 <      
511 >
512         ! save current configuration, contruct neighbor list,
513         ! and calculate forces
514         call saveNeighborList(natoms, q)
# Line 698 | Line 695 | contains
695         tau = tau_Temp
696         virial = virial_Temp
697      endif
698 <
698 >    
699   #endif
700 <
701 < #ifdef PROFILE
702 <    if (do_pot) then
706 <
707 < #ifdef IS_MPI
708 <
709 <      
710 <       call printCommTime()
711 <
712 <       call mpi_allreduce(forceTime,globalForceTime,1,MPI_DOUBLE_PRECISION, &
713 <            mpi_sum,mpi_comm_world,mpi_err)
714 <
715 <       call mpi_allreduce(forceTime,maxForceTime,1,MPI_DOUBLE_PRECISION, &
716 <            MPI_MAX,mpi_comm_world,mpi_err)
717 <      
718 <       call mpi_comm_size( MPI_COMM_WORLD, nprocs,mpi_err)
719 <      
720 <       if (getMyNode() == 0) then
721 <          write(*,*) "Total processor time spent in force calculations is: ", globalForceTime
722 <          write(*,*) "Total Time spent in force loop per processor is: ", globalforceTime/nprocs
723 <          write(*,*) "Maximum force time on any processor is: ", maxForceTime
724 <       end if
725 < #else
726 <       write(*,*) "Time spent in force loop is: ", forceTime
727 < #endif
728 <
729 <    
730 <    endif
731 <
732 < #endif
733 <
734 <
735 <
700 >    
701 >    
702 >    
703    end subroutine do_force_loop
704  
705    subroutine do_pair(i, j, rijsq, d, do_pot, do_stress, u_l, A, f, t, pot)
# Line 1122 | Line 1089 | contains
1089      doesit = FF_uses_RF
1090    end function FF_RequiresPostpairCalc
1091    
1092 + #ifdef PROFILE
1093 +  function getforcetime() result(totalforcetime)
1094 +    real(kind=dp) :: totalforcetime
1095 +    totalforcetime = forcetime
1096 +  end function getforcetime
1097 + #endif
1098 +
1099   !! This cleans componets of force arrays belonging only to fortran
1100  
1101   end module do_Forces

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines