= Installing current version of ANUGA research code on Windows = == Introduction == {{{anuga}}} is developed on Linux (Ubuntu) and hence the installation on Linux (Ubuntu) is more streamlined. But it is possible to install on windows. First you need to install the required {{{python}}} environment, then download the {{{anuga}}} source and then compile and test. The most time consuming part of the process is getting the {{{python}}} environment setup (which involves either a 500 MB download and some fixes, or a sequence of smaller downloads (see manual install)). But it can be done. == Python == We use {{{python}}} as our programming environment together with a number of standard python packages such as {{{numpy, scipy, matplotlib, netcdf4}}}. One way to install all the required packages is to use a distribution like {{{python_xy}}}, {{{Anaconda}}} and the related {{{miniconda}}} environments. === Miniconda === Download and run the [http://conda.pydata.org/miniconda.html Miniconda] installer. Be sure to choose the win32 {{{python 2.7}}} version. This is the version for which we are developing. At the moment {{{anuga}}} has memory problems with {{{win64}}} so avoid that for the time being. You are most welcome to help track down the problems and provide a bug fix. == Anuga python package dependencies == Assuming {{{conda}}} is now installed, we need to install a number of other packages, via the {{{conda install}}} command. Fire up {{{cmd.exe}}} and install all the packages via {{{ conda install python=2.7 pip nose numpy scipy netcdf4 matplotlib gdal }}} == GCC compiler == We need a gcc compiler to install {{{anuga}}}. We suggest that you download and install the version of [http://www.mingw.org/ MinGW] provided by [http://tdm-gcc.tdragon.net/ TDM-GCC]. Don't forget to mark the ``openmp`` and ``gfortran`` options in the "Choose Components" part of the installation. == Manual install == It is possible to install the required environment manually. You would need to install {{{Mingw}}} to provide a compiler, the standard distribution of {{{python27}}} and then precompiled python libraries for {{{numpy, scipy, matplotlib, netcdf4}}} from a site like [http://www.lfd.uci.edu/~gohlke/pythonlibs/]. It would be interesting to hear feedback on this option, as there is an opportunity to use versions using the Intel Math Kernel Library, which should provide a useful increase in speed. == Download ANUGA == So now to actually installing anuga. First we need to get the actual anuga source code. === Zipped version === A zipped version of the latest development version of anuga is available from github at [https://github.com/stoiver/anuga_core/archive/master.zip] and the latest released version at sourceforge [http://sourceforge.net/projects/anuga/files/anuga_1.3/anuga_1.3.10.zip] === Checkout anuga via svn === You can also check out the anuga repository using subversion. I suggest installing [http://tortoisesvn.net/downloads.html tortoise svn downloads] and then checking out the following svn repository. When you installed {{{tortoise svn}}} it creates a few extra menu items to your right click menu in the file manager. Just choose "tortoise" checkout to download the code. {{{ https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core }}} This should produce an anuga_core directory == Installing ANUGA == Now go to the directory anuga_core and build and install anuga. Fire up a cmd terminal, change to the {{{anuga_core}}} directory and run {{{ python setup.py build --compiler=mingw32 install }}} == Run Unit tests == From the anuga_core directory run the unit tests via: {{{ python runtests.py }}} === Note === At present the Anaconda (conda) version of {{{gdal}}} is missing the {{{gdal}}} data directory (presumably to save space). This will cause some error messages of the form "ERROR 4: Unable to open EPSG support file gcs.csv". It should be fine to disregard these errors messages. It would be possible to download the gdal data directory and point the {{{GDAL_DATA}}} environment variable to the data directory. == Conclusion == 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. == Updating == From time to time you should update your version of anuga. This is fairly easy. Just choose the directory to "update" and then right click and choose "tortoise update" to update the code (if you checkout {{{anuga}}} using subversion). Then again from the {{{anuga_core}}} directory recompile the code and check the unit tests via {{{ python setup.py build --compiler=mingw32 install python runtests.py }}} == Note == You can add a text file {{{pydistutils.cfg}}} to your C:\Users\Username directory contaning the configuration info {{{ [build] compiler=mingw32 }}} so that the command {{{ python setup.py install }}} will now build using the mingw32 compiler.