wiki:InstallWindowsSvn

Version 34 (modified by steve, 10 years ago) (diff)

--

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.

Packages to install

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 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.

Build environment and Load dependencies

First we need to create a specific python environment (called anuga_env and then activate the environment via

conda create -n anuga_env python=2.7
activate anuga_env

Now in install all the packages

conda install pip nose numpy scipy netcdf4 matplotlib gdal geos

GCC compiler

We need a gcc compiler to install anuga.

We suggest that you download and install the version of MinGW provided by TDM-GCC. Don't forget to mark the openmp and gfortran options in the "Choose Components" part of the installation. See this excellent documentation for Windows users_ (they even have screenshots!).

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.

Installing anuga

So now to actually installing anuga.

Checkout anuga via svn

First we need to get the actual anuga source code. We do this by checking out the anuga repository using subversion. I suggest installing 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

Setup PYTHONPATH

We need to tell python where the anuga source code is located. This is done via the PYTHONPATH environment variable.

For instance, if your anuga_core directory was located at

C:\Users\Steve\anuga_core

then you should add

C:\Users\Steve\anuga_core\source

to your PYTHONPATH

Environment variables are accessed via control panel -> advanced system settings -> Environment Variables and then add a new Environment variable PYTHONPATH with value C:\Users\Steve\anuga_core\source (or what ever is appropriate for your installation)

Compiling ANUGA

Now go to the directory anuga_core and compile the anuga files. Fire up a cmd terminal, change to the anuga_core directory and run

python compile_all.py

Check that all the files have been compiled correctly. There should be an "OK" at the end of each separate compile command.

Run Unit tests

From the anuga_core directory run the unit tests via:

python test_all.py

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.

Then again from the anuga_core directory recompile the code and check the unit tests via

python compile_all.py
python test_all.py