Command Line Options

General options

-h

Print minimal help.

$ fred -h

-v

Print version info: number, changeset and build date.

$ fred -v
fred Version 3.0  (028d8d2c3da) - 2019/10/01

-vn

Print the version number only.

$ fred -vn
3.58.7

New in version 3.58.7

-f path

use path as main input file instead of default fred.inp

fred -f waterphantom.f

-i path

Use path as input directory instead of the current working directory.

$ fred -i myInputDir

-o path

Use path as output directory instead of default out.

$ fred -o myOutputDir

-benchmark N

Run the standard benchmark for N primary particles

$ fred -benchmark 1E5

-performance

Run the system performance scan both for CPU and GPU.

-gpusetup

Run the GPU resource locator.

-manage

Manage FRED installed versions: change, delete, move, etc. For system-wide installations it will require root privileges.

-listVers

List available FRED versions installed on the system.

-useVers fredVersion

Switch to fredVersion version temporary (only for current simulation).

$ fred -useVers fred_3.0.18

-colorOutput | -C

Activate color output for ANSI compatible terminals.

-particles

Print information on defined particles.

-materials

Print information on built-in material definitions.

Simulation control

-n

Run simulation in a dry run. No particles will be generated or tracked.

-nprim N

Set number of primary particles per pencil beam. This command overrides any other nprim definition in the input files.

$ fred -nprim 1e5

-nrep N

Repeat the simulation N times. Every time a statistically independent run is performed, so you can afterwards evaluate the statistical fluctuations in the simulated maps.

$ fred -nrep 5

Warning

In order to have different runs, the randSeedRoot must not be defined in the input files or set to 0. In this way the random seed is taken from a high resolution generator connected to the system clock.

Tip

After 5 repetitions, the simulation folder will look like shown below, with out folders for each repetition.

fred.inp
out000/
out001/
out002/
out003/
out004/

Tip

This option can be used in combination with -o option to obtain a numbered sequence of output directories. For instance, the command:

$ fred -nrep 4 -o mytest

will produce:

fred.inp
mytest000/
mytest001/
mytest002/
mytest003/

-repbeg N

Index of the first repetition. For instance, to run 4 repetitions starting from index 15:

$ fred -nrep 4 -repbeg 15

and we get:

fred.inp
...
out015/
out016/
out017/
out018/

-rseed N

Initialize the seed of the random generator. N must be a 64-bit unsigned integer (uint64). This overrides any other randSeedRoot definition in the input files.

$ fred -rseed 4637646287

Execution control

-serial

Single thread execution on a CPU (sequential non-parallel execution). This is a shortcut for -numThreads 1 (see below).

-nogpu

Do not use GPU, if present: run on CPU only.

-gpuonly

Require GPU execution. This will fail if no GPU is available.

-numThreads N

Run with N parallel threads at the CPU level. For instance, if you want to run with 32 threads on the CPU without using any GPU, run:

$ fred -numThreads 32 -nogpu

-nspawn N

Launch N independent copies of the simulation. It is meant to be used in combination with option -nrep, to accelerate repetitions by running them in parallel. This is especially needed when running with a plugin that demands for serial execution.

Warning

Use this option with care. It can easily bring a workstation to its knees by using all computing resources, memory and disk space.

Tip

For instance, if you want to run 1000 repetitions in serial mode (1 thread per simulation) using 10 cores at the same time, you can use:

$ fred -nrep 1000 -serial -nspawn 10

Plugin control

-noplugin

Do not load and use any plugin.

-pluginonly

Run only if at least a plugin is found and loaded.

-plugindir path

Use path as starting directory to search for plugins.

-install-plugin

Create a plugin directory from the built-in template.

$ fred -install-plugin

-update-plugin

Make sure that plugin interface library is aligned with current version of FRED executable.

$ fred -update-plugin