Index: /trunk/anuga_core/source/anuga_parallel/INSTALL-README
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/INSTALL-README	(revision 8271)
+++ /trunk/anuga_core/source/anuga_parallel/INSTALL-README	(revision 8272)
@@ -1,126 +1,3 @@
 
-=========================
-INSTALLING anuga_parallel
-=========================
-
-anuga_parallel
-==============
-
-Well first you need to get the anuga_parallel code. You can get this from
-our svn repository with userid anonymous (blank password)
-
-The location is
-
-https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core/source/anuga_parallel
-
-(By the way, the most recent version of the development code of anuga
-is available at
-
-https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core/source/anuga
-)
-
-Setup your PYTHONPATH to point to location of the source directory
-
-For instance I havethe following line in my .bashrc file
-
-export PYTHONPATH=/home/steve/anuga/anuga_core/source
-
-
-
-MPI
-===
-
-Now you need to install MPI on your system. OPENMPI and MPICH2
-are supported by pypar (see below) so both should be ok. 
-
-Make sure mpi works. You should be able to run a program in parallel. 
-
-Try something as simple as 
-
-mpirun -np 4 pwd
-
-should produce the output of pwd 4 times. 
-
-PYPAR
-======
-
-We use pypar as the interface between mpi and python. The most recent 
-version of PYPAR is available from 
-
-http://code.google.com/p/pypar/ 
-
-(There is an old version on sourceforge
-http://sourceforge.net/projects/pypar/ don't use that)
-
-Install pypar following the instructions in the download. Should be able
-use standard command
-
-python setup.py install
-
-or maybe
-
-sudo python setup.py install
-
-
-Make sure the pypar examples work
-
-
-PYMETIS
-=======
-
-In the anuga_parallel directory there is a subdirectory pymetis. 
-
-Follow the instructions in README to install. Essentially just run make.
-
-If you have a 64 bit machine run
-
-make COPTIONS="-fPIC"
-
-From the pymetis directory, test using test_all.py, ie
-
-python test_all.py
-
-ANUGA_PARALLEL
-==============
-
-Should now be ready to run some parallel anuga code.
-
-Go back to the anuga_parallel directory and run test_all.py
-
-Hopefully that all works.
-
-Run run_parallel_sw_merimbula.py
-
-First just run it as a sequential program, via
-
-python run_parallel_sw_merimbula.py
-
-Then try a parallel run using a command like
-
-mpirun -np 4 python run_parallel_sw_merimbula.py
-
-That should run on 4 processors
-
-You should look at the code in  run_parallel_sw_merimbula.py
-
-Essentially a fairly standard example, with the extra command 
-
-domain = distribute(domain)
-
-which sets up all the parallel stuff.
-
-Also for efficiency reasons we only setup the original full sequential mesh 
-on processor 0, hence the statement
-
-if myid == 0:
-     domain = create_domain_from_file(mesh_filename)
-     domain.set_quantity('stage', Set_Stage(x0, x1, 2.0))
-else:
-     domain = None
-
-The output will be an sww file associated to each 
-processor. 
-
-There is a script anuga/utilities/sww_merge.py which provides
-a function to merge sww files into one sww file for viewing 
-with the anuga viewer. 
+Read http://anuga.anu.edu.au/wiki/AnugaParallel
+ 
Index: /trunk/anuga_core/source/anuga_parallel/README
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/README	(revision 8272)
+++ /trunk/anuga_core/source/anuga_parallel/README	(revision 8272)
@@ -0,0 +1,3 @@
+
+Read http://anuga.anu.edu.au/wiki/AnugaParallel
+
Index: /trunk/anuga_core/source/anuga_parallel/parallel_api.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/parallel_api.py	(revision 8271)
+++ /trunk/anuga_core/source/anuga_parallel/parallel_api.py	(revision 8272)
@@ -40,4 +40,5 @@
     """
 
+    barrier()
 
     # FIXME: Dummy assignment (until boundaries are refactored to
Index: /trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py	(revision 8271)
+++ /trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py	(revision 8272)
@@ -63,4 +63,5 @@
         setup_buffers(self)
 
+        self.global_name = 'domain'
         self.tri_map = tri_map
         self.inv_tri_map = inv_tri_map
@@ -74,6 +75,13 @@
             name = name[:-4]
 
+        self.global_name = name
+
         # Call parents method with processor number attached.
         Domain.set_name(self, name + '_P%d_%d' %(self.processor, self.numproc))
+
+
+    def get_global_name(self):
+
+        return self.global_name
 
 
@@ -104,4 +112,14 @@
 
         self.update_ghosts()
+
+
+
+    def sww_merge(self, verbose=False):
+
+        if self.processor == 0 and self.numproc > 1:
+            import anuga.utilities.sww_merge as merge
+            
+            merge.sww_merge(self.get_global_name(),self.numproc,verbose)
+
 
 # =======================================================================
@@ -202,3 +220,4 @@
             pypar.send(vertices[ghost_mask,0], 0)
             pypar.send(vertices[ghost_mask,1], 0)
-
+            
+
Index: /trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py
===================================================================
--- /trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py	(revision 8271)
+++ /trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py	(revision 8272)
@@ -45,6 +45,6 @@
 #mesh_filename = "merimbula_43200.tsh"   ; x0 = 756000.0 ; x1 = 756500.0
 #mesh_filename = "test-100.tsh" ; x0 = 0.25 ; x1 = 0.5
-yieldstep = 5
-finaltime = 200
+yieldstep = 20
+finaltime = 500
 verbose = True
 
@@ -78,5 +78,5 @@
 
 if myid == 0 and verbose: print 'DISTRIBUTING DOMAIN'
-domain = distribute(domain)
+domain = distribute(domain,verbose=True)
 
 #domain.smooth = False
@@ -116,4 +116,9 @@
 
 
+#--------------------------------------------------
+# Merge the individual sww files into one file
+#--------------------------------------------------
+domain.sww_merge(verbose=True)
+
 finalize()
 
