Perform a single run of a FRED program.


usage: FRED -p program -r run_number -d output_directory [ -c ]


Run the FRED program in the current working directory. While job control commands such as fred_job are normally used, FRED programs can also be run directly with this command. By default, this command creates a directory OUT where results are stored, and a report is written to the file OUT/RUN1/out1.csv. Log messages are printed on the screen, although these can be redirected to a file as shown in the examples.



The main program file, or main.fred by default.


The run number to assign to the program, or \(1\) by default.


The directory for program output, or OUT by default. This directory is created if it does not exist.


If provided, the command will run the FRED compiler instead of running the simulation. Warnings and errors discovered are printed to the screen.


This command returns a \(0\) exit code on success, and a non-zero value otherwise.


The following command runs the model specified in the main.fred file as run number \(1\) and stores the results in the directory OUT. Log messages are redirected into the file Log.txt.

$ FRED > Log.txt

This same command could also be specified as follows.

$ FRED -p main.fred -r 1 -d OUT > Log.txt


If the -c option is specified, then errors and warnings are written to the screen. Otherwise, any runtime problems will result in an error message on the screen and the program will exit with a non-zero value.

A complete list of errors and warnings issued by FRED is not available at this time.

See Also

fred_compile, fred_job, fred_run, run_fred