<p><b>dwj07@fsu.edu</b> 2011-10-04 13:03:35 -0600 (Tue, 04 Oct 2011)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Updating timers to begin performance tuning code.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_mpas_core.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_mpas_core.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_mpas_core.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -195,7 +195,9 @@
integer :: i, iEdge, iCell, k
+ call timer_start("init diagnostics")
call ocn_diagnostic_solve(dt, block % state % time_levs(1) % state, mesh)
+ call timer_stop("init diagnostics")
call compute_mesh_scaling(mesh)
Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tendency.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tendency.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -190,13 +190,17 @@
!
! for z-level, only compute height tendency for top layer.
+ call timer_start("h tend horiz adv")
call ocn_thick_hadv_tend(grid, u, h_edge, tend_h, err)
+ call timer_stop("h tend horiz adv")
!
! height tendency: vertical advection term -d/dz(hw)
!
! Vertical advection computed for top layer of a z grid only.
+ call timer_start("h tend vert adv")
call ocn_thick_vadv_tend(grid, wtop, tend_h, err)
+ call timer_stop("h tend vert adv")
end subroutine ocn_tend_h!}}}
@@ -325,28 +329,36 @@
! velocity tendency: nonlinear Coriolis term and grad of kinetic energy
!
+ call timer_start("u tend coriolis")
call ocn_vel_coriolis_tend(grid, pv_edge, h_edge, u, ke, tend_u, err)
+ call timer_stop("u tend coriolis")
!
! velocity tendency: vertical advection term -w du/dz
!
+ call timer_start("u tend vert adv")
call ocn_vel_vadv_tend(grid, u, wtop, tend_u, err)
+ call timer_stop("u tend vert adv")
!
! velocity tendency: pressure gradient
!
+ call timer_start("u tend pressure grad")
if (config_vert_grid_type.eq.'isopycnal') then
call ocn_vel_pressure_grad_tend(grid, MontPot, tend_u, err)
elseif (config_vert_grid_type.eq.'zlevel') then
call ocn_vel_pressure_grad_tend(grid, pressure, tend_u, err)
end if
+ call timer_stop("u tend pressure grad")
!
! velocity tendency: del2 dissipation, </font>
<font color="black">u_2 </font>
<font color="black">abla^2 u
! computed as </font>
<font color="black">u( </font>
<font color="black">abla divergence + k \times </font>
<font color="gray">abla vorticity )
! strictly only valid for config_h_mom_eddy_visc2 == constant
!
+ call timer_start("u tend horiz mix")
call ocn_vel_hmix_tend(grid, divergence, vorticity, tend_u, err)
+ call timer_stop("u tend horiz mix")
!
! velocity tendency: forcing and bottom drag
@@ -354,13 +366,17 @@
! mrp 101115 note: in order to include flux boundary conditions, we will need to
! know the bottom edge with nonzero velocity and place the drag there.
+ call timer_start("u tend forcing")
call ocn_vel_forcing_tend(grid, u, u_src, ke_edge, h_edge, tend_u, err)
+ call timer_start("u tend forcing")
!
! velocity tendency: vertical mixing d/dz( nu_v du/dz))
!
if (.not.config_implicit_vertical_mix) then
+ call timer_start("u tend vmix explicit")
call ocn_vel_vmix_tend_explicit(grid, u, h_edge, vertvisctopofedge, tend_u, err)
+ call timer_stop("u tend vmix explicit")
endif
end subroutine ocn_tend_u!}}}
@@ -475,18 +491,24 @@
! and then change maxLevelEdgeTop to maxLevelEdgeBot in the following section.
! tracer_edge at the boundary will also need to be defined for flux boundaries.
+ call timer_start("tracer tend horiz adv")
call ocn_tracer_hadv_tend(grid, u, h_edge, tracers, tend_tr, err)
+ call timer_stop("tracer tend horiz adv")
!
! tracer tendency: vertical advection term -d/dz( h \phi w)
!
+ call timer_start("tracer tend vert adv")
call ocn_tracer_vadv_tend(grid, wtop, tracers, tend_tr, err)
+ call timer_stop("tracer tend vert adv")
!
! tracer tendency: del2 horizontal tracer diffusion, div(h \kappa_2 </font>
<font color="gray">abla \phi)
!
+ call timer_start("tracer tend horiz mix")
call ocn_tracer_hmix_tend(grid, h_edge, tracers, tend_tr, err)
+ call timer_stop("tracer tend horiz mix")
! mrp 110516 printing
!print *, 'tend_tr 1',minval(tend_tr(3,1,1:nCells)),&
@@ -499,7 +521,9 @@
! tracer tendency: vertical diffusion h d/dz( \kappa_v d\phi/dz)
!
if (.not.config_implicit_vertical_mix) then
+ call timer_start("tracer tend vmix explicit")
call ocn_tracer_vmix_tend_explicit(grid, h, vertdifftopofcell, tracers, tend_tr, err)
+ call timer_stop("tracer tend vmix explicit")
endif
! mrp 110516 printing
@@ -510,7 +534,9 @@
!
! add restoring to T and S in top model layer
!
+ call timer_start("tracer tend restoring")
call ocn_restoring_tend(grid, h, s%index_temperature, s%index_salinity, tracers, tend_tr, err)
+ call timer_stop("tracer tend restoring")
10 format(2i8,10e20.10)
Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_time_integration_rk4.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_time_integration_rk4.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -286,7 +286,7 @@
!
! A little clean up at the end: decouple new scalar fields and compute diagnostics for new state
!
- call timer_start("rk4 finalize")
+ call timer_start("rk4 cleanup")
block => domain % blocklist
do while (associated(block))
@@ -378,7 +378,7 @@
end do
call deallocate_state(provis)
- call timer_stop("rk4 finalize")
+ call timer_stop("rk4 cleanup")
call timer_stop("rk4 timestep")
Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hadv.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hadv.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hadv.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -21,6 +21,9 @@
use ocn_tracer_hadv3
use ocn_tracer_hadv4
+ !dwj: for performance analysis
+ use timer
+
implicit none
private
save
@@ -122,9 +125,15 @@
!
!-----------------------------------------------------------------
+ call timer_start("tracer tend hadv 2")
call ocn_tracer_hadv2_tend(grid, u, h_edge, tracers, tend, err1)
+ call timer_stop("tracer tend hadv 2")
+ call timer_start("tracer tend hadv 3")
call ocn_tracer_hadv3_tend(grid, u, h_edge, tracers, tend, err2)
+ call timer_stop("tracer tend hadv 3")
+ call timer_start("tracer tend hadv 4")
call ocn_tracer_hadv4_tend(grid, u, h_edge, tracers, tend, err3)
+ call timer_stop("tracer tend hadv 4")
err = err1 .or. err2 .or. err3
@@ -177,4 +186,4 @@
end module ocn_tracer_hadv
!|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-! vim: foldmetho=marker
+! vim: foldmethod=marker
Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hmix.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hmix.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_tracer_hmix.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -21,6 +21,9 @@
use ocn_tracer_hmix_del2
use ocn_tracer_hmix_del4
+ !dwj: for performance analysis
+ use timer
+
implicit none
private
save
@@ -119,8 +122,12 @@
!
!-----------------------------------------------------------------
+ call timer_start("tracer tend horiz mix del2")
call ocn_tracer_hmix_del2_tend(grid, h_edge, tracers, tend, err1)
+ call timer_stop("tracer tend horiz mix del2")
+ call timer_start("tracer tend horiz mix del4")
call ocn_tracer_hmix_del4_tend(grid, h_edge, tracers, tend, err2)
+ call timer_stop("tracer tend horiz mix del4")
err = err1 .or. err2
Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_hmix.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_hmix.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vel_hmix.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -21,6 +21,9 @@
use ocn_vel_hmix_del2
use ocn_vel_hmix_del4
+ !dwj: for performance analysis
+ use timer
+
implicit none
private
save
@@ -119,8 +122,12 @@
!
!-----------------------------------------------------------------
+ call timer_start("u tend horiz mix del2")
call ocn_vel_hmix_del2_tend(grid, divergence, vorticity, tend, err1)
+ call timer_stop("u tend horiz mix del2")
+ call timer_start("u tend horiz mix del4")
call ocn_vel_hmix_del4_tend(grid, divergence, vorticity, tend, err2)
+ call timer_stop("u tend horiz mix del4")
err = err1 .or. err2
Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -335,7 +335,9 @@
C(k) = 1 - A(k) - A(k-1)
enddo
+ call timer_start("tridiagonal solve")
call tridiagonal_solve(A,C,A,u(:,iEdge),uTemp,maxLevelEdgeTop(iEdge))
+ call timer_stop("tridiagonal solve")
u(1:maxLevelEdgeTop(iEdge),iEdge) = uTemp(1:maxLevelEdgeTop(iEdge))
u(maxLevelEdgeTop(iEdge)+1:nVertLevels,iEdge) = 0.0
@@ -544,8 +546,10 @@
C(k) = 1 - A(k) - A(k-1)
enddo
+ call timer_start("tridiagonal solve mult")
call tridiagonal_solve_mult(A,C,A,tracers(:,:,iCell), &
tracersTemp, maxLevelCell(iCell), nVertLevels,num_tracers)
+ call timer_stop("tridiagonal solve mult")
tracers(:,1:maxLevelCell(iCell),iCell) = tracersTemp(:,1:maxLevelCell(iCell))
tracers(:,maxLevelCell(iCell)+1:nVertLevels,iCell) = -1e34
Modified: branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix_coefs_rich.F
===================================================================
--- branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix_coefs_rich.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/core_ocean/mpas_ocn_vmix_coefs_rich.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -139,8 +139,10 @@
rhoDisplaced => s % rhoDisplaced % array
tracers => s % tracers % array
+ call timer_start("vmix coef eos update")
call ocn_equation_of_state_rho(s, grid, 0, 'relative', err)
call ocn_equation_of_state_rho(s, grid, 1, 'relative', err)
+ call timer_stop("vmix coef eos update")
call ocn_vmix_get_rich_numbers(grid, indexT, indexS, u, h, h_edge, &
rho, rhoDisplaced, tracers, RiTopOfEdge, RiTopOfCell, err1)
Modified: branches/ocean_projects/performance/src/framework/module_timer.F
===================================================================
--- branches/ocean_projects/performance/src/framework/module_timer.F        2011-10-03 17:04:59 UTC (rev 1052)
+++ branches/ocean_projects/performance/src/framework/module_timer.F        2011-10-04 19:03:35 UTC (rev 1053)
@@ -225,7 +225,7 @@
percent = timer_ptr%total_time/total_ptr%total_time
endif
- write(*,'(i1, 1x, a45, f15.5, i7, 3f15.5, f8.2)') timer_ptr%levels, tname(1:timer_ptr%levels)//timer_ptr%timer_name, timer_ptr%total_time, timer_ptr%calls, timer_ptr%min_time, timer_ptr%max_time, timer_ptr%avg_time, percent
+ write(*,'(i2, 1x, a35, f15.5, i7, 3f15.5, f8.2)') timer_ptr%levels, tname(1:timer_ptr%levels)//timer_ptr%timer_name, timer_ptr%total_time, timer_ptr%calls, timer_ptr%min_time, timer_ptr%max_time, timer_ptr%avg_time, percent
return
endif
@@ -245,8 +245,8 @@
stop
end if
- write(*,'(3x, a10, 34x, a15, a10, a10, a15, a15, a15)') 'timer_name', 'total', 'calls', 'min', 'max', 'avg', 'percent'
- write(*,'(i1, 1x, a45, f15.5, i7, 3f15.5)') total%levels, total%timer_name, total%total_time, total%calls, total%min_time, total%max_time, total%avg_time, percent
+ write(*,'(3x, a10, 24x, a15, a10, a10, a15, a15, a15)') 'timer_name', 'total', 'calls', 'min', 'max', 'avg', 'percent'
+ write(*,'(i2, 1x, a35, f15.5, i7, 3f15.5)') total%levels, total%timer_name, total%total_time, total%calls, total%min_time, total%max_time, total%avg_time, percent
current => all_timers
</font>
</pre>