source: trunk/anuga_core/source/anuga_parallel/INSTALL-README @ 8225

Last change on this file since 8225 was 8225, checked in by steve, 13 years ago

Committing changes

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