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.
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.
|Long form||Short form||Description|
||Path to the configuration file. If not specified, EMOD will look for a file named default-config.json in the current directory.|
||Path to the directory containing input data files. If not specified, EMOD will look for files in the current directory.|
||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.|
||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.
||The IP address of the commissioning/monitoring host. Set to “none” for no IP address.|
||The port of the commissioning/monitoring host. Set to “0” for no port.|
||The unique ID for this simulation. This ID is needed for self-identification to the UDP host. Set to “none” for no simulation ID.|
Open a Command Prompt window and navigate to the working directory, which contains the configuration and campaign files.
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
EMOD will display logging information, including an errors that occur, while running the simulation. See Error and logging files for more information.