<p><b>dwj07@fsu.edu</b> 2012-08-16 15:07:19 -0600 (Thu, 16 Aug 2012)</p><p><br>
        -- TRUNK COMMIT --<br>
<br>
        Fixing an issue within mpas_timer when using MPI_WTime for the timing interface.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/mpas/src/framework/mpas_timer.F
===================================================================
--- trunk/mpas/src/framework/mpas_timer.F        2012-08-16 20:57:13 UTC (rev 2105)
+++ trunk/mpas/src/framework/mpas_timer.F        2012-08-16 21:07:19 UTC (rev 2106)
@@ -1,20 +1,15 @@
       module mpas_timer
 
+        use mpas_kind_types
         use mpas_grid_types
-        use mpas_dmpar
 
         implicit none
         save
-!       private
 
 #ifdef _PAPI
         include 'f90papi.h'
 #endif
 
-!#ifdef _MPI
-!        include 'mpif.h'
-!#endif
-
         type timer_node
           character (len=StrKIND) :: timer_name
           logical :: running, printable
@@ -38,6 +33,10 @@
         contains
 
         subroutine mpas_timer_start(timer_name, clear_timer, timer_ptr)!{{{
+#         ifdef _MPI
+          use mpi
+#         endif
+
           character (len=*), intent (in) :: timer_name !&lt; Input: name of timer, stored as name of timer
           logical, optional, intent(in) :: clear_timer !&lt; Input: flag to clear timer
           type (timer_node), optional, pointer :: timer_ptr !&lt; Output: pointer to store timer in module
@@ -159,6 +158,10 @@
         end subroutine mpas_timer_start!}}}
        
         subroutine mpas_timer_stop(timer_name, timer_ptr)!{{{
+#         ifdef _MPI
+          use mpi
+#         endif
+
           character (len=*), intent(in) :: timer_name !&lt; Input: name of timer to stop
           type (timer_node), pointer, optional :: timer_ptr !&lt; Input: pointer to timer, for stopping
 
@@ -250,9 +253,7 @@
             tname = ''
             do i=0,timer_ptr%levels+2
               tname = tname//' '
-!             write(*,'(a,$)') ' '
             end do
-!           tname = tname//timer_ptr%timer_name
 
             if(timer_ptr%total_time == 0.0d0) then
               timer_ptr%min_time = 0.0d0
@@ -315,6 +316,8 @@
         end subroutine mpas_timer_init!}}}
 
         subroutine mpas_timer_sync()!{{{
+          use mpas_dmpar
+
           type (timer_node), pointer :: current
           real (kind=RKIND) :: all_total_time, all_max_time, all_min_time, all_ave_time
 
@@ -334,20 +337,12 @@
             current % total_time = all_total_time
 
 #ifdef _MPI
-            if(all_total_time &gt; 0) then
-              current % efficiency = all_ave_time / all_total_time
-            else
-              current % efficiency = 1.0
-            end if
+            current % efficiency = all_ave_time / all_total_time
 #else
             current % efficiency = 1.0
 #endif
 
-            if(current % calls &gt; 0) then
-              current % avg_time = current % total_time / current % calls
-            else
-              current % avg_time = 0.0
-            end if
+            current % avg_time = current % total_time / current % calls
 
             call mpas_dmpar_max_real(domain_info, current % max_time, all_max_time)
             current % max_time = all_max_time

</font>
</pre>