Giter Club home page Giter Club logo

game_of_life's Introduction

Game of Life

Simple C++ implementation of John Conway's Game of Life, including a parallelised OpenMP branch.

Build

Dependencies: Boost, STL, C++11, OpenMP (for OpenMP branch).

On some platforms, it is necessary to set CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to include the correct version of Boost. This might happen when Boost is in a non-standard location (FindBoost.cmake cannot find it) or when compiling with gcc on OSX (needs gcc-compiled Boost, not clang-compiled).

In-source or out-of-source:

mkdir build
cd build
cmake path/to/source
make

Tests

Implemented using Catch. Tests are fairly self-explanatory.

cd /path/to/build/test
./test

Local Execution

cd /path/to/build/bin
./game_of_life --frames [number of iterations to simulate] --out [output path and prefix, e.g. preexisting_output_dir/outprefix-] --init [initialisation data]

For example:

./game_of_life --frames 2 --out output/big_output_ --init ../test/test_grid_1024.txt

Remote Deployment/Execution

Remote deployment/execution is done using ssh, for systems set up with the Sun Grid Engine (qsub job submission). First, edit /path/to/build/bin/connect_ssh.sh to be have the form:

ssh username@server

deploy.sh deploys to that server and builds the project. Note that it may be necessary to change the git remote URI used in deploy.sh -- this project is not currently public.

run_remote.sh submits an example job using the deployed version of submit_qsub.sh.

Once the cluster job has finished, call fetch_results.sh to retrieve the output data.

Visualisation of Results

Call the MATLAB script 'visualise_from_data.m' within the directory containing the results. This generates an output video.

game_of_life's People

Contributors

karnival avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.