GithubHelp home page GithubHelp logo

epihiper's Introduction

Documentation Status

EpiHiper

EpiHiper version 2.0.0. Is an agent based epidemic simulator

Obtain Code

git clone https://github.com/NSSAC/EpiHiper.git

Dependencies

Requirements for building EpiHiper:

  • C++ 11 compatible compiler, e.g. gcc 7.1.0
  • Cmake version 3.11 or above
  • PostgreSQL library (provided by package: libpq5)
  • PostgreSQL header (provided by package: postgresql-devel)

All other dependencies are provided through git submodules, which are automatically retrieved during configuration and compiled during make. These dependencies are:

Building a single threaded executable

From the root directory of the repository execute:

mkdir build
cd build
cmake -G "Unix Makefiles" -DENABLE_MPI=OFF -DENABLE_OMP=OFF -DENABLE_LOCATION_ID=OFF ..
make -j

Building an MPI (multi-process) executable

Additional dependencies:

  • OpenMPI version 3.14 and above (provided by package: openmpi3)
  • OpenMPI header files (provided by package: openmpi3-devel)

From the root directory of the repository execute:

mkdir build
cd build
cmake -G "Unix Makefiles" -DENABLE_MPI=ON -DENABLE_OMP=OFF -DENABLE_LOCATION_ID=OFF ..
make -j

Building an OpenMP (multi-threaded) executable

Additional dependencies:

  • OpenMP run time library (provided by package: libgomp1)

From the root directory of the repository execute:

mkdir build
cd build
cmake -G "Unix Makefiles" -DENABLE_MPI=OFF -DENABLE_OMP=ON -DENABLE_LOCATION_ID=OFF ..
make -l

Note: It is possible to combine OpenMP and MPI

Configuration options:

Option Values Default Description
-DCMAKE_BUILD_TYPE Debug | Release Release Enable debug build.
-DENABLE_LOCATION_ID ON | OFF ON Enable location Id support for networks.
-DENABLE_MPI ON | OFF ON Enable MPI parallelization.
-DENABLE_OMP ON | OFF ON Enable OpenMP parallelization.
-DENABLE_LOGLEVEL_TRACE ON | OFF OFF Enable support for log level trace.

Example

This repository contains a small example which can be run in seconds on regular laptop or desktop. The config.json file is the single file which must be provided to EpiHiper in the command line. To avoid installing a PostgreSQL database the example does not use the person trait database, i.e., initialization and intervention do not rely on additional demographic information of the individuals in the network. Nevertheless the example directory contains such a data base in order to illustrate the format. The example initializes 2 nodes with infections and vaccinates 3 other with a 90% effective vaccine (see susceptibility of state V in the disease model). The example uses a fixed seed in order to create a verifiable result. The expected result is created with a single threaded executable and thus can only be recreated with a single threaded simulation.

The format of the configuration files is defined through JSON schema which can be found here. Alongside the schema there are more complex example in the test directory

Running the example creates multiple output files:

  • stateTransistions.csv which records all health state changes of the individuals
  • output.csv which provides aggregate state numbers.
  • status.json which provides the current completion status of EpiHiper (important for long running processes)
  • EpiHiper.*.log where each thread creates its individual log file.

Runing example as a single threaded executable

From the root directory of the repository execute:

build/src/EpiHiper --config example/config.json

Runing as multi-threaded multi-process executable

From the root directory of the repository execute:

mpirun -np #MPI --bind-to none -x OMP_NUM_THREADS=#OMP build/src/EpiHiper --config example/config.json

Here #MPI is the number of MPI tasks and #OMP is the number of threads per task.

epihiper's People

Contributors

shoops avatar chenj-uva avatar dmachi avatar henningmortveit avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar Bryan Lewis avatar  avatar Srini Venkatramanan avatar

epihiper's Issues

EpiHiper build issue on ArchLinux

EpiHiper build fails on Archlinux with the following error.

/home/parantapa/scratch/EpiHiper/src/EpiHiperConfig.h:32:10: fatal error: git-commit.h: No such file or directory
32 | #include "git-commit.h"
| ^~~~~~~~~~~~~~
compilation terminated.

". . .[error] [1:0] [-1] CActionQueue: Failed to add action." when testing example with single thread build

~/git_repos/EpiHiper> lsb-release -a
LSB Version:    n/a
Distributor ID: openSUSE
Description:    openSUSE Tumbleweed
Release:        20230607
Codename:       n/a
~/git_repos/EpiHiper> uname -a
Linux kore32ram64 6.3.6-1-default #1 SMP PREEMPT_DYNAMIC Mon Jun  5 07:58:35 UTC 2023 (f583ba4) x86_64 x86_64 x86_64 GNU/Linux
~/git_repos/EpiHiper> build/src/EpiHiper --config example/config.json | head
EpiHiper Version 2.0.0 (build: Jun  9 2023, commit: 4c880db, MPI: OFF, OpenMP: OFF, LID: OFF, LOGLEVEL TRACE: OFF)
[2023-06-09 17:09:11.781170] [error] [1:0] [-1] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.781219] [error] [1:0] [-1] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.781437] [error] [1:0] [-1] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.781462] [error] [1:0] [-1] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.781483] [error] [1:0] [-1] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.781846] [error] [1:0] [0] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.781868] [error] [1:0] [0] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.782180] [error] [1:0] [1] CActionQueue: Failed to add action.
[2023-06-09 17:09:11.782202] [error] [1:0] [1] CActionQueue: Failed to add action.

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.