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.38 2003-12-18 20:46:45 chuckv Exp $, $Date: 2003-12-18 20:46:45 $, $Name: not supported by cvs2svn $, $Revision: 1.38 $ |
8 |
|
|
9 |
|
module do_Forces |
10 |
|
use force_globals |
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 |
694 |
|
tau = tau_Temp |
695 |
|
virial = virial_Temp |
696 |
|
endif |
699 |
– |
|
700 |
– |
#endif |
701 |
– |
|
702 |
– |
#ifdef PROFILE |
703 |
– |
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) |
697 |
|
|
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 |
698 |
|
#endif |
699 |
|
|
700 |
|
|
1091 |
|
doesit = FF_uses_RF |
1092 |
|
end function FF_RequiresPostpairCalc |
1093 |
|
|
1094 |
+ |
#ifdef PROFILE |
1095 |
+ |
function getforcetime() return(totalforcetime) |
1096 |
+ |
real(kind=dp) :: totalforcetime |
1097 |
+ |
totalforcetime = forcetime |
1098 |
+ |
end function getforcetime |
1099 |
+ |
#endif |
1100 |
+ |
|
1101 |
|
!! This cleans componets of force arrays belonging only to fortran |
1102 |
|
|
1103 |
|
end module do_Forces |