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 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.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.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 696 | 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
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 <
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 1118 | 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