source: trunk/anuga_work/anuga_cuda/README.md

Last change on this file was 9017, checked in by steve, 11 years ago

Adding in Zhe (John) Weng's anuga_cuda code as obtained from googlecode https://code.google.com/p/anuga-cuda

File size: 3.8 KB
Line 
1This is the GPU based ANUGA
2===========================
3
4
5
6Documentation
7-------------
8
9Documentation is under doc directory, and the html version generated by **Sphinx** under the directory *doc/sphinx/build/html/*
10
11
12
13
14
15Install Guide
16-------------
17
181. Original [ANUGA](anuga.anu.edu.au) is required
19- For CUDA version, [PyCUDA](documen.tician.de/pycuda) is required
20- For OpenHMPP version, current implementation is based on the [CAPS OpenHMPP Compiler](www.caps-entreprise.com)
21        * When compiling the code with **Makefile**, the NVIDIA device architecture and compute capability need to be specified
22                * For example, GTX480 with 2.0 compute capability </br>
23                ```HMPP_FLAGS13 = -e --nvcc-options -Xptxas=-v,-arch=sm_20 -c --force```
24                * For GTX680 with 3.0 compute capability </br>
25                ```HMPP_FLAGS13 = -e --nvcc-options -Xptxas=-v,-arch=sm_30 -c --force```
26        * Also the path for **python**, **numpy**, and **ANUGA/utilities** packages need to be specified
27        * Defining the macro **USING_MIRROR_DATA** in **hmpp_fun.h** </br>
28        ```#define USING_MIRROR_DATA```
29        </br>will enable the advanced version, which uses OpenHMPP Mirrored Data technology so that data transmission costs can be effectively cut down, otherwise basic version is enabled.
30
31
32
33
34
35Environment Vars
36----------------
37
38Please add following vars to you **.bashrc** or **.bash_profile** file
39
40```
41export ANUGA_CUDA=/where_the_anuga-cuda/src
42
43export $PYTHONPATH=$PYTHONPATH:$ANUGA_CUDA
44```
45
46
47
48Basic Code Structure
49--------------------
50
51![Code Structure](docs/codeStructure.pdf "anuga-cuda code structure")
52
53* **README** (What you are reading)
54* **docs/** Documentation directory
55        * **codeStructure.pdf** The diagram above
56        * **Evolve workflow.pdf** The overall workflow of the evolve procedure. This includes all the function dependency and function interfaces, which is helpful to understand the evolve procedure of ANUGA
57        * **device_spe/** Some device specifications of our working station
58        * **profiling/** Profiling results
59                * **CUDA/** All the profiling results on CUDA implementation
60        * **sphinx/** The [Sphinx](http://sphinx-doc.org/) generated documentation
61                * **source/** The source files for Sphinx based documents
62                * **build/** The generated documents
63                        * **html/** HTML version documentation
64* **src/** Source code directory
65        * **anuga_cuda/** The CUDA implementation
66                * **config.py** Detail configuration for the CUDA implementation, including the path for all the kernel functions, optimal CUDA thread block configuration, etc.
67                * **gpu_domain_advanced.py** Python Class for CUDA implementation in advanced version
68                * **gpu_domain_basic.py** Python Class for CUDA implementation in basic version
69        * **anuga_HMPP/** The OpenHMPP implementation
70                * **Makefile** The Makefile
71                * **hmpp_dimain.py** Python Class for OpenHMPP implementation
72                * **hmpp_python_glue.c** The Python/C API to set up communication between Python ANUGA and OpenHMPP.
73                * **sw_domain.h** The C Struct type **domain** used in C implementation to access mesh information generated in Python ANUGA
74                * **sw_domain_fun.h** Connect C Struct type **domain** to all mesh information
75                * **hmpp_fun.h** All function declarations.
76                * **evolve.c** The evolve procedure
77        * **scripts/** Some useful bash script
78        * **utilities/** Utilities for sorting mesh information, checking results, etc.
79* **test/** Testing cases
80        * **CUDA/** Testing cases for CUDA implementation
81                * **merimbula/** Merimbula testing case directory
82                        * **merimbula.py** Merimbula testing case
83        * **OpenHMPP/** Testing cases for OpenHMPP implementation
84                * **merimbula.py** Merimbula testing case       
85
86
87Examples
88--------
89
90Running Merimbula model with CUDA implementation.
91
92```$ python merimbula.py -gpu```
93
94With pair-testing.
95
96```$ python merimbula.py -gpu -test```
97
98With rearranged mesh information.
99
100```$ python merimbula.py -gpu -rg```
101
102
103
104Author
105------
106
107Mail to [Zhe Weng (John)](wengcsyz@gmail.com)
Note: See TracBrowser for help on using the repository browser.