Skip to content
moranski7Public

About

Uses parallel programming to simulate Conway's Game of Life game.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Parallel Programming: Conway's Game of Life

Intro

This assignment is broken into two separate programs:

  • data: data.c, dataFunc.c, dataFunc.h
  • task: task.c, taskFunc.c, taskFunc.h, queue.c, queue.h
Both programs plays Conway's Game of Life (https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) and uses parallelism for optimization. Uses pthread library. Difference between the two programs is how they use the pthreads.

data

Use data parallelism to split the work of running game of life. All pthreads perform the same operation but divides the work.

task

Uses task parallism to run the game of life using threads. All pthreads perform different operations, dividing the work between them.

Requirements

  • OS: Unix (Ubuntu prefered)
  • c compiler (gcc preferred)
  • pthread library

Note: pthread library is already installed on Ubuntu 15.10 or newer. For older version use the following commands:

sudo apt-get install libpthread-stubs0-dev

To Run

To compile both program, move into the main directory where the source code is located and type make. The makefile should compile both programs with no warnings.

To run the data parallel program, type in: ./data Numthreads(int) SizeGrid(int) NumbIterate(int) where:

  • Numthreads is the number of threads the program will generate. Must be greater than 0.
  • SizeGrid is the size of the grid. Must be greater than 0.
  • NumIteration is the number of steps the game of life goes through. Must be greater than 0.

To run the task parallel program, type in: ./task SizeGrid(int) NumbIterate(int) where:

  • SizeGrid is the size of the grid. Must be greater than 0.
  • NumIteration is the number of steps the game of life goes through. Must be greater than 0.

To run either programs with preset command line arguments type in

  • make test to run the data parallel program
  • make test3 to run the task parallel program

To Clean

To clean up the project, move into the main directory and type make clean to clean up the entire project.

About

Uses parallel programming to simulate Conway's Game of Life game.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages