| 1 | = Installing current version of ANUGA research code on Windows = |
| 2 | |
| 3 | == Packages to install == |
| 4 | |
| 5 | Install python (and associated packages). We use {{{python}}} as our programming environment and a number of standard python packages such as {{{numpy, scipy, matplotlib}}}. One of the easiest ways to install all the required (except for {{{netcdf}}} is to use the {{{python_xy}}} distribution. |
| 6 | |
| 7 | So first install [http://code.google.com/p/pythonxy/ python xy] from |
| 8 | |
| 9 | |
| 10 | === Pre Ubuntu 12.04 === |
| 11 | Also need to install the following packages |
| 12 | |
| 13 | {{{ |
| 14 | sudo apt-get install python-argparse |
| 15 | sudo apt-get install python-profiler |
| 16 | }}} |
| 17 | |
| 18 | === Scientific python === |
| 19 | |
| 20 | We use scientific python to provide netcdf |
| 21 | support in python. |
| 22 | |
| 23 | The default python-scientific provided by Ubuntu is |
| 24 | version 2.8, and this leads to segmentation |
| 25 | faults (at least on 32 bit machines) in Ubuntu 12.04. |
| 26 | |
| 27 | So we need to install scientific python version 2.9.1 from source. |
| 28 | Get Scientific python 2.9.1 source. |
| 29 | |
| 30 | {{{ |
| 31 | wget https://sourcesup.renater.fr/frs/download.php/3420/ScientificPython-2.9.1.tar.gz . |
| 32 | }}} |
| 33 | |
| 34 | |
| 35 | You will need to manually extract via the tar command, i.e. |
| 36 | |
| 37 | {{{ |
| 38 | tar xvf ScientificPython-2.9.1.tar.gz |
| 39 | }}} |
| 40 | |
| 41 | You should end up with a directory {{{ScientificPython-2.9.1}}} |
| 42 | |
| 43 | Change into the directory and install scientific python via |
| 44 | |
| 45 | {{{ |
| 46 | python setup.py build |
| 47 | sudo python setup.py install |
| 48 | }}} |
| 49 | |
| 50 | == Installing anuga == |
| 51 | |
| 52 | Now we should have installed all the packages necessary to run anuga. |
| 53 | So now to actually installing anuga. |
| 54 | |
| 55 | === Checkout anuga via svn === |
| 56 | |
| 57 | First we need to get the actual anuga source code. We do this by checking out the anuga |
| 58 | repository using subversion. |
| 59 | |
| 60 | From your home directory run: |
| 61 | |
| 62 | {{{ |
| 63 | svn checkout https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core anuga_core |
| 64 | }}} |
| 65 | |
| 66 | This should produce an anuga_core directory in your home directory |
| 67 | |
| 68 | === Setup PYTHONPATH === |
| 69 | |
| 70 | We need to tell python where the anuga source code is located. |
| 71 | This is done via the {{{PYTHONPATH}}} environment variable. |
| 72 | |
| 73 | Put the following in your .bashrc file (if you use the bash shell). |
| 74 | |
| 75 | {{{ |
| 76 | export PYTHONPATH=/home/******/anuga_core/source |
| 77 | }}} |
| 78 | |
| 79 | where the {{{******}}} should be replaced by the name of your home directory. '''Note the inclusion of {{{/source}}} in the name of the file.''' With some versions of Linux you need to put this command in the file {{{.profile}}} |
| 80 | |
| 81 | You should rerun your .bashrc file with |
| 82 | |
| 83 | {{{ |
| 84 | source .bashrc |
| 85 | }}} |
| 86 | |
| 87 | Actually it is usually safer to fire up a new terminal to see if you have been successful in setting |
| 88 | up the PYTHONPATH |
| 89 | |
| 90 | You can check your PYTHONPATH with the command |
| 91 | |
| 92 | {{{ |
| 93 | printenv PYTHONPATH |
| 94 | }}} |
| 95 | |
| 96 | |
| 97 | === Compile ANUGA Code === |
| 98 | |
| 99 | Now go to the directory anuga_core and compile the anuga files via: |
| 100 | |
| 101 | {{{ |
| 102 | python compile_all.py |
| 103 | }}} |
| 104 | |
| 105 | === Run Unit tests === |
| 106 | |
| 107 | From the anuga_core directory run the unit tests via: |
| 108 | |
| 109 | {{{ |
| 110 | python test_all.py |
| 111 | }}} |
| 112 | |
| 113 | == Conclusion == |
| 114 | |
| 115 | Hopefully all the unit tests pass. As this is bleeding edge there are sometimes a small number of failures as this is a work in progress. Have a look at the demos in the directory anuga_core/documentation/user_manual/demos (along with the user manual) to see how to use anuga. |
| 116 | |
| 117 | == Updating == |
| 118 | |
| 119 | From time to time you should update your version of anuga. This is fairly easy. From your {{{anuga_core}}} directory update the anuga code via the subversion command |
| 120 | |
| 121 | {{{ |
| 122 | svn update |
| 123 | }}} |
| 124 | |
| 125 | Then again from the {{{anuga_core}}} directory recompile the code and check the unit tests via |
| 126 | |
| 127 | {{{ |
| 128 | python compile_all.py |
| 129 | python test_all.py |
| 130 | }}} |