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 872 by chrisfen, Fri Nov 21 19:31:05 2003 UTC vs.
Revision 887 by mmeineke, Fri Dec 19 17:25:00 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.37 2003-11-21 19:31:05 chrisfen Exp $, $Date: 2003-11-21 19:31:05 $, $Name: not supported by cvs2svn $, $Revision: 1.37 $
7 > !! @version $Id: do_Forces.F90,v 1.39 2003-12-19 17:25:00 mmeineke Exp $, $Date: 2003-12-19 17:25:00 $, $Name: not supported by cvs2svn $, $Revision: 1.39 $
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   #endif
53  
54   contains
# Line 696 | Line 694 | contains
694         tau = tau_Temp
695         virial = virial_Temp
696      endif
697 <
697 >    
698   #endif
699 <
700 < #ifdef PROFILE
701 <    if (do_pot) then
704 <
705 < #ifdef IS_MPI
706 <
707 <      
708 <       call printCommTime()
709 <
710 <       call mpi_allreduce(forceTime,globalForceTime,1,MPI_DOUBLE_PRECISION, &
711 <            mpi_sum,mpi_comm_world,mpi_err)
712 <
713 <       call mpi_allreduce(forceTime,maxForceTime,1,MPI_DOUBLE_PRECISION, &
714 <            MPI_MAX,mpi_comm_world,mpi_err)
715 <      
716 <       call mpi_comm_size( MPI_COMM_WORLD, nprocs,mpi_err)
717 <      
718 <       if (getMyNode() == 0) then
719 <          write(*,*) "Total processor time spent in force calculations is: ", globalForceTime
720 <          write(*,*) "Total Time spent in force loop per processor is: ", globalforceTime/nprocs
721 <          write(*,*) "Maximum force time on any processor is: ", maxForceTime
722 <       end if
723 < #else
724 <       write(*,*) "Time spent in force loop is: ", forceTime
725 < #endif
726 <
727 <    
728 <    endif
729 <
730 < #endif
731 <
699 >    
700 >    
701 >    
702    end subroutine do_force_loop
703  
704    subroutine do_pair(i, j, rijsq, d, do_pot, do_stress, u_l, A, f, t, pot)
# Line 1118 | Line 1088 | contains
1088      doesit = FF_uses_RF
1089    end function FF_RequiresPostpairCalc
1090    
1091 + #ifdef PROFILE
1092 +  function getforcetime() return(totalforcetime)
1093 +    real(kind=dp) :: totalforcetime
1094 +    totalforcetime = forcetime
1095 +  end function getforcetime
1096 + #endif
1097 +
1098   !! This cleans componets of force arrays belonging only to fortran
1099  
1100   end module do_Forces

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines