wiki:InstallWindowsSvn

Version 11 (modified by steve, 11 years ago) (diff)

--

Installing current version of ANUGA research code on Windows

Packages to install

Python

We use python as our programming environment together with a number of standard python packages such as numpy, scipy, matplotlib. One of the easiest ways to install all the required packages (except for netcdf) is to use a distribution like python_xy.

So first install python xy. This will be a large download, maybe 300 MB, but will provide an almost complete installation of python for our needs. Choose the python 2.7 version.

Scientific python and netcdf

We use scientific python to provide netcdf support in python.

Unfortunately python xy doesn't provide scientific python. A pre-compiled version is available from scientific python. Be sure to choose the version matching your version of python.

We also need to make the netcdf files avaialble to some of our C code. See "More NETCDF Setup" for some more setting up of netcdf for anuga.

Installing anuga

Now we should have installed all the packages necessary to run 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 and then checking out the following svn repository. When you installed tortoise svn 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)

More NETCDF Setup

In one of our C files (fitsmooth.c}}}) we need to link to the netcdf file. As a kludge, I suggest copying the netcdf files installed from scientific python to the appropriate anuga directories.

The library NETCDF.dll should be in the directory C:\Python27\Lib\site-packages\Scientific\Win32 (or some very simialrly named named directory) and netcdf.h in directory C:\Python27\include\Scientific\.

  • Copy the library file NETCDF.dll from directory C:\Python27\Lib\site-packages\Scientific\Win32 to the directory anuga_core\source\anuga\fit_interpolate directory. Note the destination directory is FIT_INTERPOLATE
  • Copy the netcdf.h file from C:\Python27\include\Scientific\ to anuga_core\source\anuga\utilities. Note the destination directory is UTILITIES

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