Ignore:
Timestamp:
Dec 7, 2011, 5:01:16 PM (13 years ago)
Author:
steve
Message:

added sww_merge to parallel_domain functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga_parallel/INSTALL-README

    r8225 r8272  
    11
    2 =========================
    3 INSTALLING anuga_parallel
    4 =========================
    5 
    6 anuga_parallel
    7 ==============
    8 
    9 Well first you need to get the anuga_parallel code. You can get this from
    10 our svn repository with userid anonymous (blank password)
    11 
    12 The location is
    13 
    14 https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core/source/anuga_parallel
    15 
    16 (By the way, the most recent version of the development code of anuga
    17 is available at
    18 
    19 https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core/source/anuga
    20 )
    21 
    22 Setup your PYTHONPATH to point to location of the source directory
    23 
    24 For instance I havethe following line in my .bashrc file
    25 
    26 export PYTHONPATH=/home/steve/anuga/anuga_core/source
    27 
    28 
    29 
    30 MPI
    31 ===
    32 
    33 Now you need to install MPI on your system. OPENMPI and MPICH2
    34 are supported by pypar (see below) so both should be ok.
    35 
    36 Make sure mpi works. You should be able to run a program in parallel.
    37 
    38 Try something as simple as
    39 
    40 mpirun -np 4 pwd
    41 
    42 should produce the output of pwd 4 times.
    43 
    44 PYPAR
    45 ======
    46 
    47 We use pypar as the interface between mpi and python. The most recent
    48 version of PYPAR is available from
    49 
    50 http://code.google.com/p/pypar/
    51 
    52 (There is an old version on sourceforge
    53 http://sourceforge.net/projects/pypar/ don't use that)
    54 
    55 Install pypar following the instructions in the download. Should be able
    56 use standard command
    57 
    58 python setup.py install
    59 
    60 or maybe
    61 
    62 sudo python setup.py install
    63 
    64 
    65 Make sure the pypar examples work
    66 
    67 
    68 PYMETIS
    69 =======
    70 
    71 In the anuga_parallel directory there is a subdirectory pymetis.
    72 
    73 Follow the instructions in README to install. Essentially just run make.
    74 
    75 If you have a 64 bit machine run
    76 
    77 make COPTIONS="-fPIC"
    78 
    79 From the pymetis directory, test using test_all.py, ie
    80 
    81 python test_all.py
    82 
    83 ANUGA_PARALLEL
    84 ==============
    85 
    86 Should now be ready to run some parallel anuga code.
    87 
    88 Go back to the anuga_parallel directory and run test_all.py
    89 
    90 Hopefully that all works.
    91 
    92 Run run_parallel_sw_merimbula.py
    93 
    94 First just run it as a sequential program, via
    95 
    96 python run_parallel_sw_merimbula.py
    97 
    98 Then try a parallel run using a command like
    99 
    100 mpirun -np 4 python run_parallel_sw_merimbula.py
    101 
    102 That should run on 4 processors
    103 
    104 You should look at the code in  run_parallel_sw_merimbula.py
    105 
    106 Essentially a fairly standard example, with the extra command
    107 
    108 domain = distribute(domain)
    109 
    110 which sets up all the parallel stuff.
    111 
    112 Also for efficiency reasons we only setup the original full sequential mesh
    113 on processor 0, hence the statement
    114 
    115 if myid == 0:
    116      domain = create_domain_from_file(mesh_filename)
    117      domain.set_quantity('stage', Set_Stage(x0, x1, 2.0))
    118 else:
    119      domain = None
    120 
    121 The output will be an sww file associated to each
    122 processor.
    123 
    124 There is a script anuga/utilities/sww_merge.py which provides
    125 a function to merge sww files into one sww file for viewing
    126 with the anuga viewer.
     2Read http://anuga.anu.edu.au/wiki/AnugaParallel
     3 
Note: See TracChangeset for help on using the changeset viewer.