Executes the FRED program in the current directory.


usage: run_fred -d dir -p main.fred -s start_run -n end_run


This command performs multiple realizations (runs) of the FRED program in the local directory. Each run uses a distinct seed for the random number generator, so the results will vary from run to run. The random seed for each run is set based on the both the seed value set in the FRED program and on the assigned run number, so a collection of FRED runs can be executed in any order with the same results.



The directory relative to the current directory where run output should be stored. Default is OUT.


The FRED program file to run. Defaults to main.fred.


The starting run number. Default is 1.


The ending run number. Default is 1. Note that this is not the number of runs to perform, but rather the final run number.


This command exits with a 0 value on success, and a non-zero value if an error occurs.


This will provide one or more examples for the command.

# some code


This command runs fred_compile on the program, so errors or warnings detected by the FRED compiler are output as part of this command.

It is an error if -d specifies an invalid directory, or if -p specifies a non-existent program file.


Typically, modelers do not use this command directly. Instead, the fred_job command is used, which uses run_fred and creates additional files to help manage your work. It may be a good idea to use run_fred when initially developing or debugging a model. If you have errors, check the output files in the OUT directory.

See Also

fred_compile, fred_job