Run a simulation using the command line

Using command-line options is the simplest way to run an EMOD simulation. This topic describes the commands available for running simulations.

The EMOD executable (Eradication.exe) and Eradication binary also provide commands that provide information about the version of EMOD that is installed, such as available parameters and simulation types. For more information, see Generate a list of all available parameters (a schema). The examples below show the Windows Eradication.exe, but the options are the same for the Eradication binary on CentOS on Azure.

Command options

The following command-line options are available for running EMOD simulations. Paths can be absolute or relative to the directory you are in when running the commands, unless otherwise specified.

Simulation options
Long form Short form Description
--config -C Path to the configuration file. If not specified, EMOD will look for a file named default-config.json in the current directory.
--input-path -I Path to the directory containing input data files. If not specified, EMOD will look for files in the current directory.
--output-path -O Path to the directory where output files will be written. If not specified, EMOD will create an “output” directory and overwrite any previous output in that directory.
--dll-path -D Path to the EMODule root directory. For more information, see Custom reporters.

The following options are for monitoring the progress of simulations running on an high-performance computing (HPC) cluster. They are optional for any simulation, but they must be used together. To monitor progress, listen for User Datagram Protocol (UDP) messages on the specified host and port.

HPC cluster options
Long form Description
--monitor_host The IP address of the commissioning/monitoring host. Set to “none” for no IP address.
--monitor_port The port of the commissioning/monitoring host. Set to “0” for no port.
--sim_id The unique ID for this simulation. This ID is needed for self-identification to the UDP host. Set to “none” for no simulation ID.

Usage

  1. Open a Command Prompt window and navigate to the working directory, which contains the configuration and campaign files.

  2. Enter a command like the one illustrated below, substituting the appropriate paths and file names for your simulation:

    ../Eradication.exe -C config.json -I C:\|EMOD_s|\InputFiles -O Sim1Output
    

    If you do not specify anything when invoking Eradication.exe, it will not execute with all defaults, but will instead tell you how to invoke the --help command.

  3. EMOD will display logging information, including an errors that occur, while running the simulation. See Error and logging files for more information.