Build EMOD from source code

You can build the Eradication.exe for Windows 10, Windows Server 12, and Windows HPC Server 12 (64-bit) using Microsoft Visual Studio or SCons. You can build the Eradication binary for CentOS 7.1 on Azure using SCons.

If you want full debugging support, you must build using Visual Studio. However, Visual Studio is only capable of a monolithic build that includes all supported simulation types.

EMOD supports the following simulation types for modeling a variety of diseases:

  • Generic disease (GENERIC_SIM)
  • Vector-borne diseases (VECTOR_SIM)
  • Malaria (MALARIA_SIM)
  • Tuberculosis (TB_SIM)
  • Sexually transmitted infections (STI_SIM)

If you want to create a disease-specific build, you must build using SCons. However, SCons builds build only the release version without extensive debugging information.

Build a monolithic Eradication.exe with Visual Studio

You can use the Microsoft Visual Studio solution file in the EMOD source code repository to build the monolithic version of the EMOD executable (Eradication.exe), which can be either a release or debug build. Visual Studio 2015 (Professional, Premium, or Ultimate) is the currently supported version.


Visual Studio creates a debug build by default. However, you must use a release build to commission simulations to COMputational Platform Service (COMPS); attempting to use a debug build will result in an error.

  1. Open the EradicationKernel solution in Visual Studio.
  2. From the Solution Configurations ribbon, select Debug or Release.
  3. On the Build menu, select Build Solution.

Eradication.exe will be in a subdirectory of the Eradication directory.

Build Eradication.exe or Eradication binary with SCons

SCons is a software construction tool that is an alternative to the well-known “Make” build tool. It is implemented in Python and the SCons configuration files, SConstruct and SConscript, are executed as Python scripts. This allows for greater flexibility and extensibility, such as the creation of custom SCons abilities just for EMOD. For more information on Scons, see SCons 2.5.0 is the currently supported version.


EMOD will not build if you use the --Debug flag. To build a debug version, you must use Visual Studio.

  1. Open a command window.

  2. Go to the directory where EMOD is installed:

    cd C:\IDM\EMOD
  3. Run the following command to build Eradication.exe:

    • For a monolithic build:

      scons --Release
    • For a disease-specific build, specify one of the supported disease types using the --Disease flag:

      scons --Release --Disease=Vector
  4. The executable will be placed, by default, in the subdirectory build\x64\Release\Eradication\ of your local EMOD source.

Additionally, you can parallelize the build process with the --jobs flag. This flag indicates the number of jobs that can be run at the same time (a single core can only run one job at a time). For example:

scons --Release --Disease=Vector --jobs=4