Changeset 3185


Ignore:
Timestamp:
Jun 20, 2006, 1:54:04 PM (18 years ago)
Author:
linda
Message:

Updated shallow water equation to broadcast timestep after flux
calculation

Location:
inundation/parallel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • inundation/parallel/documentation/code/RunParallelSwMerimbulaMetis.py

    r3096 r3185  
    8585    # Read in the test files
    8686
    87     filename = 'merimbula_10785_1.tsh'
     87    filename = 'parallel/merimbula_10785_1.tsh'
    8888
    8989    # Build the whole mesh
  • inundation/parallel/documentation/results.tex

    r3184 r3185  
    1414\section{Advection, Rectangular Domain}
    1515
    16 The first example looked at the rectangular domain example given in Section \ref{sec:codeRPA}, excecpt that we changed the finaltime time to 1.0 (\code{domain.evolve(yieldstep = 0.1, finaltime = 1.0)}).
     16The first example looked at the rectangular domain example given in Section \ref{subsec:codeRPA}, excecpt that we changed the finaltime time to 1.0 (\code{domain.evolve(yieldstep = 0.1, finaltime = 1.0)}).
    1717
    1818For this particular example we can control the mesh size by changing the parameters \code{N} and \code{M} given in the following section of code taken from
    19  Section \ref{sec:codeRPA}.
     19 Section \ref{subsec:codeRPA}.
    2020
    2121\begin{verbatim}
     
    8989the Merimbula test problem. Inother words, we ran the code given in Section
    9090\ref{subsec:codeRPMM}, except the final time was reduced to 10000
    91 (\code{\label{subsec:codeRPMM}). The results are given in Table \ref{tbl:rpm}.
     91(\code{finaltime = 10000}). The results are given in Table \ref{tbl:rpm}.
    9292These are good efficiency results, especially considering the structure of the
    93 Merimbula mesh. Note that since we are solving an advection problem the amount
    94 of calculation done on each triangle is relatively low, when we more to other
    95 problems that involve more calculations we would expect the computation to
    96 communication ratio to increase and thus get an increase in efficiency.
     93Merimbula mesh.
     94%Note that since we are solving an advection problem the amount of calculation
     95%done on each triangle is relatively low, when we more to other problems that
     96%involve more calculations we would expect the computation to communication ratio to increase and thus get an increase in efficiency.
    9797
    9898\begin{table}
    9999\caption{Parallel Efficiency Results for the Advection Problem on the
    100   Merimbula Mesh {\tt N} = 160, {\tt M} = 160.\label{tbl:rpm}}
     100  Merimbula Mesh.\label{tbl:rpm}}
    101101\begin{center}
    102102\begin{tabular}{|c|c c|}\hline
     
    109109\end{center}
    110110\end{table}
     111
     112\section{Shallow Water, Merimbula Mesh}
     113
     114The final example we looked at is the shallow water equation on the
     115Merimbula mesh. We used the code listed in Section \ref{subsec:codeRPSMM}. The
     116results are listed in Table \ref{tbl:rpsm}. The efficiency results are not as
     117good as initally expected so we profiled the code and found that
     118the problem is with the \code{update_boundary} routine in the {\tt domain.py}
     119file. On one processor the \code{update_boundary} routine accounts for about
     12072\% of the total computation time and unfortunately it is difficult to
     121parallelise this routine. When metis subpartitions the mesh it is possible
     122that one processor will only get a few boundary edges (some may not get any)
     123while another processor may contain a relatively large number of boundary
     124edges. The profiler indicated that when running the problem on 8 processors,
     125Processor 0 spent about 3.8 times more doing the \code{update_boundary}
     126calculations than Processor 7. This load imbalance reduced the parallel
     127efficiency.
     128
     129Before doing the shallow equation calculations on a larger number of
     130processors we recommend that the \code{update_boundary} calculations be
     131optimised as much as possible to reduce the effect of the load imbalance.
     132
     133 
     134\begin{table}
     135\caption{Parallel Efficiency Results for the Shallow Water Equation on the
     136  Merimbula Mesh.\label{tbl:rpsm}}
     137\begin{center}
     138\begin{tabular}{|c|c c|}\hline
     139$n$ & $T_n$ (sec) & $E_n (\%)$ \\\hline
     1401 & 7.04 & \\
     1412 & 3.62 & 97 \\
     1424 & 1.94 & 91 \\
     1438 & 1.15 & 77 \\\hline
     144\end{tabular}
     145\end{center}
     146\end{table}
  • inundation/parallel/parallel_shallow_water.py

    r3117 r3185  
    2929from pyvolution.shallow_water import *
    3030from Numeric import zeros, Float, Int, ones, allclose, array
    31 from pypar_dist import pypar
    32 
     31#from pypar_dist import pypar
     32import pypar
    3333
    3434class Parallel_Domain(Domain):
     
    9898        """
    9999
    100 
    101         Domain.update_timestep(self, yieldstep, finaltime)
     100        #LINDA:
     101        # Moved below so timestep is found before doing update
     102       
     103        #Domain.update_timestep(self, yieldstep, finaltime)
    102104
    103105        import time
     
    118120        self.communication_broadcast_time += time.time()-t0
    119121
    120 
     122        # LINDA:
     123        # Moved timestep to here
     124       
     125        Domain.update_timestep(self, yieldstep, finaltime)
    121126
    122127
     
    124129        """Calculate local timestep
    125130        """
     131
     132        # LINDA: Moved below so timestep is updated before
     133        # calculating statistic
    126134       
    127135        #Compute minimal timestep on local process
    128         Domain.update_timestep(self, yieldstep, finaltime)
     136        #Domain.update_timestep(self, yieldstep, finaltime)
    129137
    130138        pypar.barrier()
     
    170178
    171179        self.timestep = self.global_timestep[0]
    172 
     180       
     181        # LINDA:
     182        # update local stats now
     183       
     184        #Compute minimal timestep on local process
     185        Domain.update_timestep(self, yieldstep, finaltime)
    173186
    174187    #update_timestep = update_timestep_1
Note: See TracChangeset for help on using the changeset viewer.