Giter Site home page Giter Site logo

temp3rr0r / infectiousdiseasemodelling Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 1.24 MB

Parallel computing: Infectious Disease Modeling with OpenMP. Agent based modelling on Undirected Acyclic graphs.

C++ 99.29% Makefile 0.71%
infectious-diseases openmp parallel boost-graph-library undirected-acyclic-graphs openmp-parallelization agent-based-modeling agent-based-simulation boost

infectiousdiseasemodelling's Introduction

Parallel computing: Infectious Disease Modeling with OpenMP

Modeling the spread of infectious diseases with computer simulations is an important and useful step in learning how populations could respond to hypothetical treatments or predict pandemics. The focus of this assignment is a simplified model of an infectious disease spreading over a population. This assignment is inspired by the work of Eubank et al. [1]. The individ- uals are moving around in a random fashion over a graph that represents spatial locations. Spreading of the disease is possible whenever an infected and a healthy individual share the same location. Design and implement a parallel algorithm for the above simulation. Write code in C/C++ and use OpenMP for parallelization.

Implementation

Three versions of the source code where created:

  1. Serial Naive: Undirected Acyclic Graph algorithm, utilizing map look-up tables, native C++ 11, using STD, STL and Boost Graph library[4].
  2. Serial: Undirected Acyclic Graph algorithm, utilizing map look-up tables, native C++ 11, using STD, STL and Boost Graph library. Some algorithmic optimizations were applied:
    • Breaking an inner for-loop that was comparing if a susceptible individuals got infected individuals.
    • Skipping iteration loops for individuals that are already infected.
  3. Parallel: Undirected Acyclic Graph algorithm, utlizing map look-up tables, native C++ 11, using STD, STL, Boost Graph library and OpenMP version 4.1 (most of the features). Also the optimizations mentioned above were applied.

Documentation

Documentation comparing the speed-up between the serial and parallel versions: https://onedrive.live.com/redir?resid=F3C315EB7F683B03!20269&authkey=!AG_HeLbTwupstY0&ithint=file%2cpdf

References

  1. Eubank et al., Modelling disease outbreaks in realistic urban social networks, Nature 429, 180-184 (13 May 2004) - http://www.nature.com/nature/journal/v429/n6988/full/nature02541.html
  2. 32 OpenMP Traps For C++ Developers - http://www.viva64.com/en/a/0054/
  3. FIRSTPRIVATE Clause - https://computing.llnl.gov/tutorials/openMP/FIRSTPRIVATE
  4. Exploring the Boost Graph Library - http://www.ibm.com/developerworks/aix/library/au-aix-boost-graph/
  5. Learning the OpenMP framework with GCC - http://www.ibm.com/developerworks/aix/library/au-aix-openmp-framework/

infectiousdiseasemodelling's People

Contributors

temp3rr0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

oindrillabose

infectiousdiseasemodelling's Issues

Debug assertion failed. Expression vector subscript out of range

I've installed boost, linked it with the project and debugged the whole code till it at least runs in visual studio. However, I'm getting an error in an inbuilt file which i have not touched. Due to this its not going beyond the "Running Serial..."

Program:
....tiousDiseaseModelling\x64\Debug\InfectiousDiseaseModelling.exe
File: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\vector
Line: 1455

Expression: vector subscript out of range

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.