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

Last change on this file since 8200 was 8191, checked in by steve, 14 years ago

Just adding an install readme for anuga_parallel

File size: 2.1 KB
Line 
1
2=========================
3INSTALLING anuga_parallel
4=========================
5
6MPI
7===
8
9First thing, you need to install MPI on your system. OPENMPI and MPICH2
10are supported by pypar (see below) so both should be ok.
11
12Make sure mpi works. You should be able to run a program in parallel.
13
14Try something as simple as
15
16mpirun -np 4 pwd
17
18should produce the output of pwd 4 times.
19
20PYPAR
21======
22
23We use pypar as the interface between mpi and python. The most recent
24version of PYPAR is available from
25
26http://code.google.com/p/pypar/
27
28(There is an old version on sourceforge
29http://sourceforge.net/projects/pypar/)
30
31Install pypar following the instructions in hte download. Should be able
32use standard python setup.py install
33
34Make sure the pypar examples work
35
36
37PYMETIS
38=======
39
40In the anuga_parallel directory there is a subdirectory pymetis.
41
42Follow the instructions in README to install. Essentially just run make.
43
44From the pymetis directory, test using test_all.py
45
46ANUGA_PARALLEL
47==============
48
49Should now be ready to run some parallel anuga code.
50
51Go back to the anuga_parallel directory and run test_all.py
52
53Hopefully that all works.
54
55Run run_parallel_sw_merimbula.py
56
57First just run it a sequential program.
58
59Then try a parallel run using a command like
60
61mpirun -np 4 python run_parallel_sw_merimbula.py
62
63That should run on 4 processors
64
65You should look at the code in  run_parallel_sw_merimbula.py
66
67Essentially a fairly standard example, with the extra command
68
69domain = distribute(domain)
70
71which sets up all the parallel stuff.
72
73Also for efficiency reasons we only setup the original full sequential mesh
74on processor 0, hence the statement
75
76if myid == 0:
77     domain = create_domain_from_file(mesh_filename)
78     domain.set_quantity('stage', Set_Stage(x0, x1, 2.0))
79else:
80     domain = None
81
82The output will be an sww file associated to each
83processor.
84
85There is a script anuga/utilities/sww_merge.py which provides
86a function to merge sww files into one sww file for viewing
87with the anuga viewer.
Note: See TracBrowser for help on using the repository browser.