<p><b>ringler@lanl.gov</b> 2010-12-09 15:24:01 -0700 (Thu, 09 Dec 2010)</p><p>add more granularity to profiling<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/profiling/src/core_ocean/module_time_integration.F
===================================================================
--- branches/ocean_projects/profiling/src/core_ocean/module_time_integration.F        2010-12-09 21:51:42 UTC (rev 640)
+++ branches/ocean_projects/profiling/src/core_ocean/module_time_integration.F        2010-12-09 22:24:01 UTC (rev 641)
@@ -27,7 +27,7 @@
       type (dm_info) :: dminfo
       type (block_type), pointer :: block
 
-      call timer_start(&quot;timestep_rk4&quot;)
+      call timer_start(&quot;ts_rk4&quot;)
       if (trim(config_time_integration) == 'RK4') then
          call rk4(domain, dt)
       else
@@ -36,10 +36,10 @@
          write(0,*) 'Currently, only ''RK4'' is supported.'
          call dmpar_abort(dminfo)
       end if
-      call timer_stop(&quot;timestep_rk4&quot;)
+      call timer_stop(&quot;ts_rk4&quot;)
 
       
-      call timer_start(&quot;timestep_NaNCheck&quot;)
+      call timer_start(&quot;ts_NaNCheck&quot;)
       block =&gt; domain % blocklist
       do while (associated(block))
          block % state % time_levs(2) % state % xtime % scalar &amp;
@@ -52,7 +52,7 @@
 
          block =&gt; block % next
       end do
-      call timer_stop(&quot;timestep_NaNCheck&quot;)
+      call timer_stop(&quot;ts_NaNCheck&quot;)
 
    end subroutine timestep
 
@@ -81,12 +81,12 @@
 
       real (kind=RKIND), dimension(4) :: rk_weights, rk_substep_weights
 
-      call timer_start(&quot;timestep_rk4_allocateState&quot;)
+      call timer_start(&quot;ts_rk4_allocateState&quot;)
       block =&gt; domain % blocklist
       call allocate_state(provis, &amp;
                           block % mesh % nCells, block % mesh % nEdges, block % mesh % maxEdges, block % mesh % maxEdges2, &amp;
                           block % mesh % nVertices, block % mesh % vertexDegree, block % mesh % nVertLevels )
-      call timer_stop(&quot;timestep_rk4_allocateState&quot;)
+      call timer_stop(&quot;ts_rk4_allocateState&quot;)
 
       !
       ! Initialize time_levs(2) with state at current time
@@ -94,7 +94,7 @@
       ! Couple tracers time_levs(2) with h in time-levels
       ! Initialize RK weights
       !
-      call timer_start(&quot;timestep_rk4_copyState&quot;)
+      call timer_start(&quot;ts_rk4_copyState&quot;)
       block =&gt; domain % blocklist
       do while (associated(block))
 
@@ -122,17 +122,17 @@
       rk_substep_weights(3) = dt
       rk_substep_weights(4) = 0.
 
-      call timer_stop(&quot;timestep_rk4_copyState&quot;)
+      call timer_stop(&quot;ts_rk4_copyState&quot;)
 
 
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       ! BEGIN RK loop 
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-      call timer_start(&quot;timestep_rk4_stage&quot;)
+      call timer_start(&quot;ts_rk4_stage&quot;)
       do rk_step = 1, 4
 
 ! ---  update halos for diagnostic variables
-        call timer_start(&quot;timestep_rk4_stage_dmpar1&quot;)
+        call timer_start(&quot;ts_rk4_stage_dmpar1&quot;)
         block =&gt; domain % blocklist
         do while (associated(block))
            call dmpar_exch_halo_field2dReal(domain % dminfo, provis % pv_edge % array(:,:), &amp;
@@ -150,22 +150,28 @@
 
            block =&gt; block % next
         end do
-        call timer_stop(&quot;timestep_rk4_stage_dmpar1&quot;)
+        call timer_stop(&quot;ts_rk4_stage_dmpar1&quot;)
 
 ! ---  compute tendencies
 
-        call timer_start(&quot;timestep_rk4_stage_tendencies&quot;)
+        call timer_start(&quot;ts_rk4_stage_tend&quot;)
         block =&gt; domain % blocklist
         do while (associated(block))
+           call timer_start(&quot;ts_rk4_stage_tend_hu&quot;)
            call compute_tend(block % tend, provis, block % mesh)
+           call timer_stop(&quot;ts_rk4_stage_tend_hu&quot;)
+           call timer_start(&quot;ts_rk4_stage_tend_scalar&quot;)
            call compute_scalar_tend(block % tend, provis, block % mesh)
+           call timer_stop(&quot;ts_rk4_stage_tend_scalar&quot;)
+           call timer_start(&quot;ts_rk4_stage_tend_enforce&quot;)
            call enforce_boundaryEdge(block % tend, block % mesh)
+           call timer_stop(&quot;ts_rk4_stage_tend_enforce&quot;)
            block =&gt; block % next
         end do
-        call timer_stop(&quot;timestep_rk4_stage_tendencies&quot;)
+        call timer_stop(&quot;ts_rk4_stage_tend&quot;)
 
 ! ---  update halos for prognostic variables
-        call timer_start(&quot;timestep_rk4_stage_dmpar2&quot;)
+        call timer_start(&quot;ts_rk4_stage_dmpar2&quot;)
         block =&gt; domain % blocklist
         do while (associated(block))
            call dmpar_exch_halo_field2dReal(domain % dminfo, block % tend % u % array(:,:), &amp;
@@ -179,11 +185,11 @@
                                             block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
            block =&gt; block % next
         end do
-        call timer_stop(&quot;timestep_rk4_stage_dmpar2&quot;)
+        call timer_stop(&quot;ts_rk4_stage_dmpar2&quot;)
 
 ! ---  compute next substep state
 
-        call timer_start(&quot;timestep_rk4_stage_provis&quot;)
+        call timer_start(&quot;ts_rk4_stage_provis&quot;)
         if (rk_step &lt; 4) then
            block =&gt; domain % blocklist
            do while (associated(block))
@@ -205,17 +211,17 @@
               if (config_test_case == 1) then    ! For case 1, wind field should be fixed
                  provis % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
               end if
-              call timer_start(&quot;timestep_rk4_stage_provis_diagnostics&quot;)
+              call timer_start(&quot;ts_rk4_stage_provis_diagnostics&quot;)
               call compute_solve_diagnostics(dt, provis, block % mesh)
-              call timer_stop(&quot;timestep_rk4_stage_provis_diagnostics&quot;)
+              call timer_stop(&quot;ts_rk4_stage_provis_diagnostics&quot;)
               block =&gt; block % next
            end do
         end if
-        call timer_stop(&quot;timestep_rk4_stage_provis&quot;)
+        call timer_stop(&quot;ts_rk4_stage_provis&quot;)
 
 
 !--- accumulate update (for RK4)
-        call timer_start(&quot;timestep_rk4_stage_accumulate&quot;)
+        call timer_start(&quot;ts_rk4_stage_accumulate&quot;)
         block =&gt; domain % blocklist
         do while (associated(block))
            block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(2) % state % u % array(:,:) &amp;
@@ -233,10 +239,10 @@
 
            block =&gt; block % next
         end do
-        call timer_stop(&quot;timestep_rk4_stage_accumulate&quot;)
+        call timer_stop(&quot;ts_rk4_stage_accumulate&quot;)
 
       end do
-      call timer_stop(&quot;timestep_rk4_stage&quot;)
+      call timer_stop(&quot;ts_rk4_stage&quot;)
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       ! END RK loop 
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -317,6 +323,7 @@
       real (kind=RKIND), dimension(:,:), pointer :: u_src
       real (kind=RKIND), parameter :: rho_ref = 1000.0
 
+      call timer_start(&quot;ts_rk4_stage_tend_hu_pointer&quot;)
       h           =&gt; s % h % array
       u           =&gt; s % u % array
       v           =&gt; s % v % array
@@ -365,6 +372,9 @@
 
       u_src =&gt; grid % u_src % array
 
+      call timer_stop(&quot;ts_rk4_stage_tend_hu_pointer&quot;)
+
+      call timer_start(&quot;ts_rk4_stage_tend_hu_h&quot;)
       !
       ! height tendency: start accumulating tendency terms
       !
@@ -410,6 +420,10 @@
         end do
       endif ! coordinate type
 
+      call timer_stop(&quot;ts_rk4_stage_tend_hu_h&quot;)
+
+
+      call timer_start(&quot;ts_rk4_stage_tend_hu_u&quot;)
       !
       ! velocity tendency: start accumulating tendency terms
       !
@@ -694,6 +708,7 @@
 
       end do
       deallocate(fluxVertTop, vertViscTop)
+      call timer_stop(&quot;ts_rk4_stage_tend_hu_u&quot;)
 
    end subroutine compute_tend
 

</font>
</pre>