1 | \documentclass{manual} |
---|
2 | |
---|
3 | \title{ANUGA Installation Guide} |
---|
4 | |
---|
5 | \usepackage{graphicx} |
---|
6 | \usepackage{hyperref} |
---|
7 | |
---|
8 | % Please at least include a long-lived email address; |
---|
9 | % the rest is at your discretion. |
---|
10 | \authoraddress{Geoscience Australia \\ |
---|
11 | Email: \email{anuga@ga.gov.au} |
---|
12 | } |
---|
13 | |
---|
14 | %Draft date |
---|
15 | \date{\today} % update before release! |
---|
16 | % Use an explicit date so that reformatting |
---|
17 | % doesn't cause a new date to be used. Setting |
---|
18 | % the date to \today can be used during draft |
---|
19 | % stages to make it easier to handle versions. |
---|
20 | |
---|
21 | |
---|
22 | \input{version} % Get version info - this file may be modified by |
---|
23 | % update_anuga_user_manual.py - if not a dummy |
---|
24 | % will be used. |
---|
25 | |
---|
26 | |
---|
27 | \makeindex % tell \index to actually write the .idx file |
---|
28 | %\makemodindex % If this contains a lot of module sections. |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | \begin{document} |
---|
33 | \maketitle |
---|
34 | |
---|
35 | |
---|
36 | |
---|
37 | % This makes the contents more accessible from the front page of the HTML. |
---|
38 | \ifhtml |
---|
39 | \chapter*{Front Matter\label{front}} |
---|
40 | \fi |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | \chapter{Introduction} |
---|
46 | |
---|
47 | This document outlines the procedure for installing the Anuga toolbox. |
---|
48 | All components are licensed as open source and readily available from the net. |
---|
49 | It is assumed that the reader is familiar with the Python programming language |
---|
50 | and the process of downloading, installing and unpacking files into directories. |
---|
51 | |
---|
52 | |
---|
53 | \section{System requirements} |
---|
54 | \label{sec:requirements} |
---|
55 | |
---|
56 | To run ANUGA you will need a Windows PC or a Linux PC with at |
---|
57 | least 1GB RAM. As ANUGA is a memory-intensive numerical system, more memory is better than less. |
---|
58 | |
---|
59 | The viewer (Windows only) requires a graphics adapter that |
---|
60 | is OpenGL compatible. It has been tested with ATI FireGL X1 cards |
---|
61 | and the NVIDIA family. It may not work with other cards such as those from the |
---|
62 | Intel(R) 82915G Express chipset family. |
---|
63 | |
---|
64 | We recommend that you check out the page \url{http://anuga.anu.edu.au} for the latest information on installing Anuga. |
---|
65 | |
---|
66 | %Where the text below refers to a specific package file such as \code{python-2.5.msi} you will find that |
---|
67 | %file in a download area linked through the \emph{numpy_support_software} link on the page |
---|
68 | %\url{https://datamining.anu.edu.au/anuga/wiki/NumpyInstall}. |
---|
69 | |
---|
70 | |
---|
71 | \section{Installation} |
---|
72 | |
---|
73 | Below are the install procedures for Windows 7 (32 bit) and Linux (32 and 64 bit). |
---|
74 | |
---|
75 | \subsection{Install - Windows (32 bit)} |
---|
76 | \label{sec:win} |
---|
77 | |
---|
78 | |
---|
79 | |
---|
80 | 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. |
---|
81 | |
---|
82 | \subsubsection{PYTHON xy} |
---|
83 | |
---|
84 | So first install python xy. This will be a large download, maybe 500 MB or more, but will provide a complete installation (well see NetCDF4 note below) of python for our needs . You should first remove any other version of python and mingw that may be on your system. The python xy package is currently only 32 bits, but this will still work on 64 bit Windows. |
---|
85 | |
---|
86 | Be sure to choose the win32 python 2.7 version. This is the version for which we are developing. |
---|
87 | Netcdf4 Note |
---|
88 | |
---|
89 | Check that netcdf is available. From a command line, try |
---|
90 | \begin{verbatim} |
---|
91 | python -c "import netCDF4" |
---|
92 | \end{verbatim} |
---|
93 | If no error occurs then netCDF4 is available and you can disregard the rest of this note. |
---|
94 | |
---|
95 | But unfortunately version 2.7.3.1 (April 2013) python xy seems to be missing netCDF4. Please let us know if later versions are ok. |
---|
96 | If it is missing then you need to install another package to cover this loss. For this we can use the precompiled scientific python binaries from \url{http://www.lfd.uci.edu/~gohlke/pythonlibs/#scientificpython}. I suggest you choose ScientificPython-2.9.2.win32-py2.7.âexe to install. To test this install try: |
---|
97 | \begin{verbatim} |
---|
98 | python -c "import Scientific.IO.NetCDF" |
---|
99 | \end{verbatim} |
---|
100 | |
---|
101 | \subsubsection{64 bit} |
---|
102 | |
---|
103 | At the moment python xy is only 32 bit, but there seems to be a promise that a 64 bit distribution is not too far away. There is a 64 bit python distribution package from Enthought, but is free only to academic users. So at present we recommend win32 python xy. |
---|
104 | Manual install |
---|
105 | |
---|
106 | 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 \url{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. |
---|
107 | Installing anuga |
---|
108 | |
---|
109 | \subsection{Obtaining ANUGA source} |
---|
110 | |
---|
111 | You can either use the source code avialble from sourceforge or download the latest version of the package using subversion. |
---|
112 | |
---|
113 | You can obtain version 1.3 of the package from sourceforge by downloading the file \url{http://sourceforge/p/anuga} |
---|
114 | |
---|
115 | |
---|
116 | \subsection{Source from development repository} |
---|
117 | An alternative is checking out the most recent version of the package using subversion. |
---|
118 | |
---|
119 | You need a subversion client. 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. |
---|
120 | \begin{verbatim} |
---|
121 | https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core |
---|
122 | \end{verbatim} |
---|
123 | This should produce an anuga_core directory |
---|
124 | |
---|
125 | |
---|
126 | |
---|
127 | \subsection{Setup PYTHONPATH} |
---|
128 | |
---|
129 | We need to tell python where the anuga source code is located. This is done via the PYTHONPATH environment variable. |
---|
130 | |
---|
131 | For instance, if your anuga_core directory was located at |
---|
132 | |
---|
133 | \begin{verbatim} |
---|
134 | C:\Users\Steve\anuga_core |
---|
135 | \end{verbatim} |
---|
136 | |
---|
137 | then you should add |
---|
138 | |
---|
139 | \begin{verbatim} |
---|
140 | C:\Users\Steve\anuga_core\source |
---|
141 | \end{verbatim} |
---|
142 | |
---|
143 | to your PYTHONPATH |
---|
144 | |
---|
145 | Environment variables are accessed via control panel -> advanced system settings -> Environment Variables and then add a new Environment variable PYTHONPATH with value \verb|C:\Users\Steve\anuga_core\source| (or what ever is appropriate for your installation) |
---|
146 | |
---|
147 | \subsection{Compiling ANUGA} |
---|
148 | |
---|
149 | 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 |
---|
150 | \begin{verbatim} |
---|
151 | python compile_all.py |
---|
152 | \end{verbatim} |
---|
153 | Check that all the files have been compiled correctly. There should be an "OK" at the end of each separate compile command. |
---|
154 | |
---|
155 | \subsection{Run Unit tests} |
---|
156 | |
---|
157 | From the anuga_core directory run the unit tests via: |
---|
158 | \begin{verbatim} |
---|
159 | python test_all.py |
---|
160 | \end{verbatim} |
---|
161 | |
---|
162 | \subsection{Conclusion} |
---|
163 | |
---|
164 | 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. |
---|
165 | Updating |
---|
166 | |
---|
167 | \subsection{Updating} |
---|
168 | If you downloaded the source using subversoin, you can update your version of ANUGA. |
---|
169 | This is fairly easy. Just choose the directory to "update" and then right click and choose "tortoise update" to update the code. |
---|
170 | |
---|
171 | Then again from the anuga_core directory recompile the code and check the unit tests via |
---|
172 | |
---|
173 | python compile_all.py |
---|
174 | python test_all.py |
---|
175 | |
---|
176 | |
---|
177 | |
---|
178 | |
---|
179 | %If you already have previous versions of Python, ANUGA support software or the ANUGA source code installed |
---|
180 | %on the target machine, start off by uninstalling them. Next, download the latest version of the ANUGA |
---|
181 | %Windows installer from \url{http://sourceforge.net/projects/anuga/files/}. The Windows installer will |
---|
182 | %install Python, MingW (select the "Minimal" install), NumPy, NetCDF, Scientific Python, Matplotlib, the |
---|
183 | %ANUGA source code and the viewer (animate). Note that you will need an internet connection to install MingW. |
---|
184 | % |
---|
185 | %After all the necessary packages have been installed, the installer will proceed to compile the ANUGA C code, |
---|
186 | %run the test suite (optional) and then run a series of validation examples (optional). This may take some time. |
---|
187 | %Try the demonstrations provided in the ANUGA directory \code{anuga\_demos} (discussed in the ANUGA user manual at |
---|
188 | %\url{https://datamining.anu.edu.au/anuga/attachment/wiki/WikiStart/anuga_user_manual-1.2.0.pdf}) |
---|
189 | %and view the resulting \code{.sww} files with the ANUGA viewer. |
---|
190 | |
---|
191 | |
---|
192 | |
---|
193 | %To run the ANUGA against the Okushiri Island wave tank validation dataset |
---|
194 | %(\url{http://www.cee.cornell.edu/longwave}) |
---|
195 | %go to \code{anuga_validation} |
---|
196 | % into |
---|
197 | %any directory and run the scripts \code{create_okushiri.py}, |
---|
198 | %\code{run_okushiri.py} and \code{compare_timeseries.py}. See also the |
---|
199 | %\code{README.txt} file that comes with the validation scripts for more |
---|
200 | %details. |
---|
201 | |
---|
202 | \subsection{Quick install - Windows Vista and 7} |
---|
203 | \label{sec:winvista} |
---|
204 | |
---|
205 | The installation of the support software and the ANUGA software should be the same as for Windows XP above. |
---|
206 | The installation and use of ANUGA under Windows Vista and 7 have not been heavily tested. Feedback on any aspect |
---|
207 | of using ANUGA under Vista or 7 is welcomed. |
---|
208 | |
---|
209 | \subsection{Quick install - Linux} |
---|
210 | \label{sec:linux} |
---|
211 | |
---|
212 | Please note that the following applies only to Ubuntu 10.04 (\"Lucid Lynx\"). We currently do not |
---|
213 | support any other Linux distributions. |
---|
214 | |
---|
215 | \subsubsection{Method 1} |
---|
216 | |
---|
217 | Choose the appropriate deb package for your architecture, download and use the package installer to install. |
---|
218 | |
---|
219 | i386: \url{https://sourceforge.net/projects/anuga/files/anuga_ubuntu_package/python-anuga_1.2.0-0ubuntu3_i386.deb/download}\\ |
---|
220 | AMD64: \url{https://sourceforge.net/projects/anuga/files/anuga_ubuntu_package/python-anuga_1.2.0-0ubuntu3_amd64.deb/download} |
---|
221 | |
---|
222 | \subsubsection{Method 2} |
---|
223 | |
---|
224 | Open a terminal and enter: |
---|
225 | \begin{verbatim} |
---|
226 | sudo add-apt-repository ppa:anuga/ppa |
---|
227 | sudo apt-get update |
---|
228 | sudo apt-get install python-anuga |
---|
229 | \end{verbatim} |
---|
230 | |
---|
231 | \subsubsection{Method 3} |
---|
232 | |
---|
233 | Add the following lines to your \code{/etc/apt/sources.list}: |
---|
234 | \begin{verbatim} |
---|
235 | deb http://ppa.launchpad.net/anuga/ppa/ubuntu lucid main |
---|
236 | deb-src http://ppa.launchpad.net/anuga/ppa/ubuntu lucid main |
---|
237 | \end{verbatim} |
---|
238 | Download the ANUGA key from \url{https://datamining.anu.edu.au/anuga/raw-attachment/wiki/WikiStart/anuga.key}. You can add this key with: |
---|
239 | \begin{verbatim} |
---|
240 | sudo apt-key add anuga.key |
---|
241 | \end{verbatim} |
---|
242 | or go to System -$>$ Administration -$>$ Software Sources -$>$ Authentication -$>$ Import Key File |
---|
243 | |
---|
244 | Open a terminal and enter: |
---|
245 | \begin{verbatim} |
---|
246 | sudo apt-get update |
---|
247 | sudo apt-get install python-anuga |
---|
248 | \end{verbatim} |
---|
249 | |
---|
250 | |
---|
251 | |
---|
252 | |
---|
253 | \section{Optional but recommended software} |
---|
254 | This software is not required to run the ANUGA toolbox, but it is recommended. |
---|
255 | \begin{itemize} |
---|
256 | \item psyco. Speeds up ANUGA by about 30\%, so is strongly recommended. |
---|
257 | Under Ubuntu install either through Synaptic or by: |
---|
258 | \begin{verbatim}sudo apt-get install python-psyco\end{verbatim} |
---|
259 | Under Windows install the file \code{psyco-1.6.win32-py25.exe} |
---|
260 | which you can find on the \url{http://psyco.sourceforge.net/download.html} page. |
---|
261 | |
---|
262 | \item VTK. The Visualization Toolkit. Under Ubuntu install either through Synaptic or by: |
---|
263 | \begin{verbatim}sudo apt-get install python-vtk\end{verbatim} |
---|
264 | Under Windows install the file \code{vtk-5.4.2-win32.exe} |
---|
265 | from the \url{http://www.vtk.org/VTK/resources/software.html} page. |
---|
266 | \end{itemize} |
---|
267 | |
---|
268 | |
---|
269 | |
---|
270 | \section{Testing} |
---|
271 | |
---|
272 | In the ANUGA root directory, run the test suite: |
---|
273 | \begin{verbatim} |
---|
274 | python test_all.py |
---|
275 | \end{verbatim} |
---|
276 | ANUGA has been succesfully installed if the tests pass as follows: |
---|
277 | \begin{verbatim} |
---|
278 | ... |
---|
279 | test_data_manager.py |
---|
280 | test_interpolate_sww.py |
---|
281 | test_mesh.py |
---|
282 | test_mesh_interface.py |
---|
283 | test_triangmodule.py |
---|
284 | test_triangmoduleII.py |
---|
285 | test_advection.py |
---|
286 | ................................................................................. |
---|
287 | ................................................................................. |
---|
288 | ................................................................................. |
---|
289 | ................................................................................. |
---|
290 | ................................................................................. |
---|
291 | ................................................................................. |
---|
292 | ................................................................................. |
---|
293 | .......................... |
---|
294 | ---------------------------------------------------------------------- |
---|
295 | Ran 593 tests in 42.712s |
---|
296 | |
---|
297 | OK |
---|
298 | \end{verbatim} |
---|
299 | |
---|
300 | Note that if psycho is not installed, a number of psycho related warnings will appear. These warnings |
---|
301 | can be ignored. |
---|
302 | |
---|
303 | %\section{Other stuff to be included} |
---|
304 | % |
---|
305 | %\begin{verbatim} |
---|
306 | %Install tortoise from downloads (ITs didn't integrate wih explorer). |
---|
307 | %In settings set proxy to proxy.agso.gov.au 8080 |
---|
308 | %% |
---|
309 | % |
---|
310 | %Install swollen from latest distro (in subversion) |
---|
311 | % |
---|
312 | % |
---|
313 | %\end{verbatim} |
---|
314 | |
---|
315 | |
---|
316 | \appendix |
---|
317 | \chapter{Miscellaneous procedures} |
---|
318 | \section{Setting the PATH on Windows} |
---|
319 | \label{sec:setwindowspath} |
---|
320 | |
---|
321 | The Windows one-click installer should automatically set the necessary PATH |
---|
322 | environment "System variables". However, in case you do not have |
---|
323 | permission to modify the system variable, then the method of setting the PATH environment "User variable" |
---|
324 | for Windows XP is shown here. Setting the variable for Windows Vista should be similar. |
---|
325 | |
---|
326 | \setlength\fboxsep{0pt} |
---|
327 | \setlength\fboxrule{1.0pt} |
---|
328 | |
---|
329 | First, open the Control Panel: |
---|
330 | \begin{figure}[ht] |
---|
331 | \centerline{\fbox{\includegraphics[scale=0.75]{installgraphics/winsetpath1.png}}} |
---|
332 | % \caption{Run Control Panel from the Start menu} |
---|
333 | \label{fig:winsetpath1} |
---|
334 | \end{figure} |
---|
335 | |
---|
336 | Next, start the System applet: |
---|
337 | \begin{figure}[ht] |
---|
338 | \centerline{\fbox{\includegraphics[scale=0.75]{installgraphics/winsetpath2.png}}} |
---|
339 | % \caption{Start the System applet} |
---|
340 | \label{fig:winsetpath2} |
---|
341 | \end{figure} |
---|
342 | |
---|
343 | \pagebreak |
---|
344 | |
---|
345 | Select the \code{Advanced} tab in the System Properties window: |
---|
346 | \begin{figure}[ht] |
---|
347 | \centerline{\includegraphics[scale=0.5]{installgraphics/winsetpath3.png}} |
---|
348 | % \caption{Select the Advanced tab} |
---|
349 | \label{fig:winsetpath3} |
---|
350 | \end{figure} |
---|
351 | |
---|
352 | %\pagebreak |
---|
353 | |
---|
354 | Press the \code{Environment Variables} button in the \code{Advanced} tab: |
---|
355 | \begin{figure}[ht] |
---|
356 | \centerline{\includegraphics[scale=0.5]{installgraphics/winsetpath4.png}} |
---|
357 | % \caption{Press the Environment Variables button} |
---|
358 | \label{fig:winsetpath4} |
---|
359 | \end{figure} |
---|
360 | |
---|
361 | \pagebreak |
---|
362 | |
---|
363 | If the \code{PATH} variable is not defined in the 'User variables' or 'System variables' windows, |
---|
364 | press the \code{New} button in either of the two windows (for a personal machine, choose the 'System variables' window). |
---|
365 | |
---|
366 | If \code{PATH} already exists in the 'User variable' or 'System variables' window, |
---|
367 | select the row with the \code{PATH} variable name in the appropriate window |
---|
368 | and press the \code{Edit} button next to the \code{New} button in that window: |
---|
369 | \begin{figure}[ht] |
---|
370 | \centerline{\includegraphics[scale=0.5]{installgraphics/winsetpath5.png}} |
---|
371 | % \caption{Press the New button} |
---|
372 | \label{fig:winsetpath5} |
---|
373 | \end{figure} |
---|
374 | |
---|
375 | %\pagebreak |
---|
376 | |
---|
377 | You will be shown the editor window whichever button you pressed in the above step. If the \code{Variable name} box is empty |
---|
378 | type in the name \code{PATH}. In the \code{Variable value} box type the value you want the \code{PATH} variable to have. If there |
---|
379 | is already some text in the box, place your additional value at the front of the existing value, not forgetting to terminate your additional |
---|
380 | string with the ';' character. The final value string must be a series of directory names seperated by ';' characters: |
---|
381 | \begin{figure}[ht] |
---|
382 | \centerline{\includegraphics[scale=0.75]{installgraphics/winsetpath6.png}} |
---|
383 | % \caption{Modifying the PATH value} |
---|
384 | \label{fig:winsetpath6} |
---|
385 | \end{figure} |
---|
386 | |
---|
387 | When you are finished, press the \code{OK} button and exit from the applet. |
---|
388 | |
---|
389 | \pagebreak |
---|
390 | |
---|
391 | \section{Associating animate.exe with a .sww file} |
---|
392 | \label{sec:assocanimatesww} |
---|
393 | |
---|
394 | The one-click installer should associate animate.exe with .sww files automatically. However, the method of associating |
---|
395 | \code{animate.exe} with a \code{.sww} file manually is shown here for Windows XP. |
---|
396 | A similar process should work for Windows Vista. |
---|
397 | |
---|
398 | Double left-click on any \code{.sww} file. This brings up a dialog because Windows doesn't know how to open the file: |
---|
399 | \begin{figure}[ht] |
---|
400 | \centerline{\fbox{\includegraphics[scale=0.5]{installgraphics/winassoc1.png}}} |
---|
401 | % \caption{Try to open the .sww file} |
---|
402 | \label{fig:winassoc1} |
---|
403 | \end{figure} |
---|
404 | |
---|
405 | Select the "\code{Select the program from a list}" radiobutton and press the \code{OK} button: |
---|
406 | \begin{figure}[ht] |
---|
407 | \centerline{\includegraphics[scale=0.5]{installgraphics/winassoc2.png}} |
---|
408 | % \caption{Select the program from a list} |
---|
409 | \label{fig:winassoc2} |
---|
410 | \end{figure} |
---|
411 | |
---|
412 | \pagebreak |
---|
413 | |
---|
414 | Press the \code{Browse...} button to find the \code{animate.exe} program: |
---|
415 | \begin{figure}[ht] |
---|
416 | \centerline{\includegraphics[scale=0.5]{installgraphics/winassoc3.png}} |
---|
417 | % \caption{Find animate.exe program} |
---|
418 | \label{fig:winassoc3} |
---|
419 | \end{figure} |
---|
420 | |
---|
421 | Navigate to the \code{C:$\backslash$Program Files$\backslash$anuga_viewer} directory: |
---|
422 | \begin{figure}[ht] |
---|
423 | \centerline{\includegraphics[scale=0.5]{installgraphics/winassoc4.png}} |
---|
424 | % \caption{Navigate into Program Files|anuga_viewer directory} |
---|
425 | \label{fig:winassoc4} |
---|
426 | \end{figure} |
---|
427 | |
---|
428 | \pagebreak |
---|
429 | |
---|
430 | Select \code{animate.exe} and press the \code{Open} button: |
---|
431 | \begin{figure}[ht] |
---|
432 | \centerline{\includegraphics[scale=0.5]{installgraphics/winassoc5.png}} |
---|
433 | % \caption{Select the animate.exe program press Open} |
---|
434 | \label{fig:winassoc5} |
---|
435 | \end{figure} |
---|
436 | |
---|
437 | Finally, press the \code{OK} button: |
---|
438 | \begin{figure}[ht] |
---|
439 | \centerline{\includegraphics[scale=0.5]{installgraphics/winassoc6.png}} |
---|
440 | % \caption{Press the OK button} |
---|
441 | \label{fig:winassoc6} |
---|
442 | \end{figure} |
---|
443 | |
---|
444 | |
---|
445 | \end{document} |
---|