- Project Name: Project Monte Carlo Fire Spread
- Members:
- Sanyam Jain (sanyamj@bu.edu)
- Waqar Ahemad (waqar@bu.edu)
- Arnav Pratap Chaudhary (arnavpc@bu.edu)
- Topic/Goals: Running montecarlo simlations for wildfire spread in parallel on GPUs and speed up the simulation process.
Each version of most of the optimizations we tried and measured are in the following branches of the code base:
- main: Had the most up to date code. Includes the implementation with dynamic parallelism as well as pinned memory and asynchronous mem copy. Best performing version.
- cudastreams-ersion: Implementation of simulation with cuda streams, where each simulation was run on one stream, and all streams executing in parallel. Performed poorly due to what we think is overheads related to executing soo many streams at once.
- frontier-per-timestep-all-sims: Implements a frontier array that stores the indices of active burning cells, such that only no. threads equal to the burning cells are launched and executed. Requires all simulations to run in sync per time step. Yeilded slightly less performance thatn dynamic parallelism.
- all-sim-1-timestep: Same as above version but no frontier array (thread launched for each cell of the grid). Performance almost as bad as cuda streams
- synchronous-memcpy: A version of code without async mem copy and pinned memory. Should be compared with the dynamic parallelism version. Total time is the same due to sync, but copy to and from device is reduced by a great deal.
- Run
maketo compile - Following args need to be passed to the
./buildfile created- Grid width: (int) no. of cells in width
- Grid height: (int) no. of cells in height
- Number of simulations: (int) no. of simulations to run in parallel
- Timestep size: (int) size of each timestep in seconds
- Max time: (int) max time till which a simulation can run
- Max Height: (float) max height according to which the terrain heights will be scaled
- Cell resolution: (float) Area that a cell will represent in sq meter.
Template:
./build <GRID_WIDTH> <GRID_HEIGHT> <NUM_SIMULATIONS> <TIMESTEP_SIZE> <MAX_TIME> <MAX_HEIGHT> <CELL_RESOLUTION>
Example call:
./build 1024 1024 128 3600 36000 200.0f 10.0f
To easily sync to oc pod, run the script using:
chmod +x scripts/rsync.sh
scripts/rsync.sh