run_fred

Executes the FRED program in the current directory.

Synopsis

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

Description

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.

Options

-d

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

-p

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

-s

The starting run number. Default is 1.

-n

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

Returns

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

Examples

This will provide one or more examples for the command.

# some code

Errors

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.

Notes

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