<p><b>dwj07@fsu.edu</b> 2012-08-23 11:29:19 -0600 (Thu, 23 Aug 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Cleaning up timers<br>
        Fixing allocatable arrays again (different fix this time)<br>
</p><hr noshade><pre><font color="gray">Modified: branches/omp_blocks/openmp_test/src/core_sw_elements/mpas_sw_time_integration.F
===================================================================
--- branches/omp_blocks/openmp_test/src/core_sw_elements/mpas_sw_time_integration.F        2012-08-23 17:14:26 UTC (rev 2116)
+++ branches/omp_blocks/openmp_test/src/core_sw_elements/mpas_sw_time_integration.F        2012-08-23 17:29:19 UTC (rev 2117)
@@ -151,15 +151,23 @@
 
        block =&gt; domain % blocklist
        do while (associated(block))
+          !$omp single
           call mpas_timer_start('sw_compute_tend')
+          !$omp end single
           call sw_compute_tend(block % tend, block % provis, block % mesh)
+          !$omp single
           call mpas_timer_stop('sw_compute_tend')
           call mpas_timer_start('sw_compute_scalar_tend')
+          !$omp end single
           call sw_compute_scalar_tend(block % tend, block % provis, block % mesh)
+          !$omp single
           call mpas_timer_stop('sw_compute_scalar_tend')
           call mpas_timer_start('sw_enforce_boundary')
+          !$omp end single
           call sw_enforce_boundary_edge(block % tend, block % mesh)
+          !$omp single
           call mpas_timer_stop('sw_enforce_boundary')
+          !$omp end single
           block =&gt; block % next
        end do
 
@@ -202,9 +210,13 @@
                 block % provis % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
                 !$omp end workshare
              end if
+             !$omp single
              call mpas_timer_start('sw_compute_solve_diagnostics')
+             !$omp end single
              call sw_compute_solve_diagnostics(dt, block % provis, block % mesh)
+             !$omp single
              call mpas_timer_stop('sw_compute_solve_diagnostics')
+             !$omp end single
              block =&gt; block % next
           end do
        end if
@@ -316,9 +328,9 @@
       integer, dimension(:), pointer :: nEdgesOnCell, nEdgesOnEdge
       real (kind=RKIND) :: r, u_diffusion
 
-      real (kind=RKIND), allocatable, dimension(:,:) :: delsq_divergence
-      real (kind=RKIND), allocatable, dimension(:,:) :: delsq_u
-      real (kind=RKIND), allocatable, dimension(:,:) :: delsq_circulation, delsq_vorticity
+      real (kind=RKIND), save, allocatable, dimension(:,:) :: delsq_divergence
+      real (kind=RKIND), save, allocatable, dimension(:,:) :: delsq_u
+      real (kind=RKIND), save, allocatable, dimension(:,:) :: delsq_circulation, delsq_vorticity
 
       real (kind=RKIND), dimension(:,:), pointer :: u_src
       real (kind=RKIND), parameter :: rho_ref = 1000.0
@@ -512,10 +524,16 @@
      !   strictly only valid for h_mom_eddy_visc4 == constant
      !
      if (config_h_mom_eddy_visc4 &gt; 0.0) then
+        !$omp sections
+        !$omp section
         allocate(delsq_divergence(nVertLevels, nCells+1))
+        !$omp section
         allocate(delsq_u(nVertLevels, nEdges+1))
+        !$omp section
         allocate(delsq_circulation(nVertLevels, nVertices+1))
+        !$omp section
         allocate(delsq_vorticity(nVertLevels, nVertices+1))
+        !$omp end sections
 
         !$omp workshare
         delsq_u(:,:) = 0.0
@@ -658,10 +676,17 @@
         end do
         !$omp end do
 
+        !$omp sections
+        !$omp section
         deallocate(delsq_divergence)
+        !$omp section
         deallocate(delsq_u)
+        !$omp section
         deallocate(delsq_circulation)
+        !$omp section
         deallocate(delsq_vorticity)
+        !$omp end sections
+
      end if
 
      ! Compute u (velocity) tendency from wind stress (u_src)
@@ -712,8 +737,8 @@
       real (kind=RKIND) :: flux, tracer_edge, r
       real (kind=RKIND) :: invAreaCell1, invAreaCell2, tracer_turb_flux
       integer, dimension(:,:), pointer :: boundaryEdge
-      real (kind=RKIND), dimension(:,:), allocatable :: boundaryMask
-      real (kind=RKIND), dimension(:,:,:), allocatable:: delsq_tracer
+      real (kind=RKIND), dimension(:,:), save, allocatable :: boundaryMask
+      real (kind=RKIND), dimension(:,:,:), save, allocatable:: delsq_tracer
       
       real (kind=RKIND) :: d2fdx2_cell1, d2fdx2_cell2
       real (kind=RKIND), dimension(:), pointer :: dvEdge, dcEdge, areaCell
@@ -1033,7 +1058,9 @@
          !
          ! compute a boundary mask to enforce insulating boundary conditions in the horizontal
          !
+         !$omp single
          allocate(boundaryMask(grid % nVertLevels, grid % nEdges+1))
+         !$omp end single
 
          !$omp workshare
          boundaryMask = 1.0
@@ -1095,7 +1122,10 @@
            !$omp end do
          end if
 
+         !$omp single
          deallocate(boundaryMask)
+         !$omp end single
+
       end if
 
       !
@@ -1107,8 +1137,12 @@
          !
          ! compute a boundary mask to enforce insulating boundary conditions in the horizontal
          !
+         !$omp sections
+         !$omp section
          allocate(boundaryMask(grid % nVertLevels, grid % nEdges+1))
+         !$omp section
          allocate(delsq_tracer(grid % nTracers, grid % nVertLevels, grid % nCells+1))
+         !$omp end sections
 
          !$omp workshare
          boundaryMask = 1.0
@@ -1220,8 +1254,13 @@
            !$omp end do
          end if
 
+         !$omp sections
+         !$omp section
          deallocate(delsq_tracer)
+         !$omp section
          deallocate(boundaryMask)
+         !$omp end sections
+
       end if
 
    end subroutine sw_compute_scalar_tend

</font>
</pre>