3 | | === Note === |
4 | | |
5 | | We use {{{******}}} to represent the name of your home directory. So when running the commands below always replace {{{******}}} with the name of your home directory. |
6 | | |
7 | | === Install anuga === |
8 | | |
9 | | First you should install the most uptodate version of the code. Follow the [InstallUbuntuSvn instructions] to install anuga on Ubuntu. By following those instructions you should end up with a download of the anuga_core code (which contains the sequential code (in the source/anuga directory) and the anuga_parallel code (in source/anuga_parallel)). |
10 | | |
11 | | You should end up with a directory |
12 | | {{{ |
13 | | /home/******/anuga_core |
14 | | }}} |
15 | | |
16 | | |
17 | | Make sure you have setup your PYTHONPATH to point to the anuga source directory |
18 | | |
19 | | For instance I have the following line in my .bashrc file |
20 | | |
21 | | {{{ |
22 | | export PYTHONPATH=/home/******/anuga_core/source |
23 | | }}} |
24 | | |
25 | | At this stage you should have a working version of the sequential anuga program. I.e. you should be able to run command |
26 | | {{{ |
27 | | python test_all.py |
28 | | }}} |
29 | | from the anuga_core directory and have your installation pass all the unit tests (well nearly all, as this is the development version and there are sometimes a few minor unit tests that fail). |
| 3 | |
| 4 | If you installed {{{anuga}}} and with the {{{ANUGA_PARALLEL}}} environment set via |
| 5 | |
| 6 | {{{ |
| 7 | export ANUGA_PARALLEL="mpich2" |
| 8 | }}} |
| 9 | |
| 10 | or |
| 11 | {{{ |
| 12 | export ANUGA_PARALLEL="openmpi" |
| 13 | }}} |
| 14 | |
| 15 | then you should already have parallel support. |
| 16 | |
| 17 | |
| 18 | == Setting up parallel support == |
| 19 | |
| 20 | Let's suppose that you initially only set up {{{anuga}}} to run in sequential mode. Then to setup parallel mode you will need to install an {{{MPI}}} environment (mpich2 or openmpi) and the python wrapper {{{pypar}}}. |
| 21 | |
| 22 | We will assume you have install {{{anuga}}} from source and the source is in the directory {{{anuga_core}}} |
119 | | In the anuga_parallel directory there are two subdirectories {{{pymetis}}} and {{{pypar_extras}}} |
120 | | which contain files that need compiling. The easiest way to do this is to return to the {{{anuga_core}}} directory |
121 | | and run the {{{compile_parallel_all.py}}} script. |
122 | | |
123 | | I.e. run the following two commands |
124 | | |
125 | | {{{ |
126 | | cd /home/******/anuga_core/ |
127 | | python compile_parallel_all.py |
128 | | }}} |
| 107 | Actually the parallel code is already in the {{{anuga_core}}} directory. We just need to reinstall {{{anuga}}}. |
| 108 | |
| 109 | From the {{{anuga_core}}} directory force a rebuild and reinstall of {{{anuga}}} via |
| 110 | |
| 111 | {{{ |
| 112 | sudo python setup.py build -f |
| 113 | sudo python setup.py install |
| 114 | }}} |