Skip to content

Commit b269234

Browse files
authored
Update README.md
1 parent b6e6416 commit b269234

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Wildfire simulation using paralleled cellular automaton
2+
Simulation of wildfire using cellular automaton and used mpi4py to parallel the program.
3+
Final Project for High Performance Computing and Parallel Computing
4+
May.2018
25

36
## Environment Specification
47
In order to achieve best compatibility, this program only needs very basic prerequisite.
@@ -11,6 +14,12 @@ However, to generate a better visualization, this program needs additional packa
1114
If the program failed to import these two packages, then it will automatically run in pure text mode.
1215

1316
## Usage
17+
18+
### Run the code:
19+
Clone the code from github using:`git clone https://github.com/XC-Li/Parallel_CellularAutomaton_Wildfire.git`
20+
After loading the module(openmpi and python), you can use `mpirun -n [n] python Parallel_Wild_Fire.py` to run this code.
21+
You can specify the number of workers in `n` if you have multiple CPU.
22+
1423
### Easiest place to change
1524
This program is carefully designed, so the places you can change is very few.
1625
The easiest part to change is surrounded by `-----Quick Change-----`.
@@ -39,9 +48,14 @@ Or you can do some custom changes on the environment initial functions:
3948

4049
**Please don't change anything below the line `Do not change anything below this line`**
4150

42-
### Run the code:
43-
After loading the module, you can use `mpirun -n [n] python Parallel_Wild_Fire.py` to run this code.
44-
You can specify the number of workers in `n` if you have multiple CPU.
51+
52+
## Parallel Programming is the key to save time
53+
![](images/effect_of_parallel.JPG)
54+
<img src="images/c1.JPG" width="400" height="300">
55+
Based on the experiment on GW's high-performance computing cluster colonial one, I found the execution time of this program is inversely proportional with the number of parallel workers.
56+
And the execution time has a linear relation with the number of rows that each worker has to compute.
57+
Which shows parallel computing can greatly reduce execution time when the problem is parallelable.
58+
4559

4660
## Interesting Findings
4761
No special environment: boundary of fire is round(Visualize in matplotlab and pure text)
@@ -68,10 +82,10 @@ All of the environment factor is on: `altitude` and `wind` are the most powerful
6882

6983

7084

71-
# Technical Detail
72-
## Cellular Automaton Model
73-
The model I use here is based on the research paper: "A cellular automata model for forest fire spread prediction: The case
74-
of the wildfire that swept through Spetses Island in 1990"
85+
## Technical Detail
86+
### Cellular Automaton Model
87+
The model I use here is based on the research paper: ["A cellular automata model for forest fire spread prediction: The case
88+
of the wildfire that swept through Spetses Island in 1990" ](https://github.com/XC-Li/Parallel_CellularAutomaton_Wildfire/blob/master/A%20cellular%20automata%20model%20for%20forest%20fire%20spread%20prediction%20The%20case%20of%20the%20wildfire%20that%20swept%20through%20Spetses%20Island%20in%201990.pdf)
7589

7690
Each cell has 4 states:
7791
State = 1: The cell contains no forest fuel. This state may describe the cells corresponding to parts of the city with no vegetation,
@@ -128,11 +142,11 @@ P<sub>s</sub> = exp(a&theta;<sub>s</sub>)
128142
|c<sub>1</sub>|0.045|
129143
|c<sub>2</sub>|0.131|
130144

131-
## Implementation
145+
### Implementation
132146
I implemented the model in the research paper to the code, and this is the structure of the program.
133147
![png](/images/Program_Structure.png)
134148

135-
## Parallel Design
149+
### Parallel Design
136150
The idea of parallel with MPI(Message Passing Interface) is also simple:
137151
1. Assign a part of the full grid to each worker.
138152
![png](images/parallel_design.png)

0 commit comments

Comments
 (0)