Skip to content

Running a simulation

Simulation user Operator developer

Launchers

Onika installs two launchers in <install-prefix>/bin:

  • onika-exec: the application itself. Source bin/setup-env.sh first, so that it finds its plugins, default input files and data files.
  • onikarun: a wrapper that sources setup-env.sh, then runs onika-exec with the same arguments.

Pass the input file first, then the options:

$ onikarun input.msp --omp_num_threads 4 --profiling-summary

With MPI, use your MPI launcher as usual. Logs come from rank 0 only, unless --logging-parallel is set:

$ source <install-prefix>/bin/setup-env.sh
$ mpirun -n 4 onika-exec input.msp

Options

Every option is an item of the configuration block, written as its YAML path joined with -; the same items can be set in the input file. All of them are listed in the Configuration reference. A boolean option without a value means true.

The ones you will use every day:

Option Use
--omp_num_threads N Number of OpenMP threads. By default OpenMP uses all cores, which is not always the fastest.
--nogpu Runs everything on the CPU: rules out GPU problems.
--debug-graph Prints the operator graph: check that no operator was silently removed.
--profiling-exectime Prints each operator when it finishes: finds the last operator before a crash.
--profiling-summary Prints a time table at the end of the run.
--set-<path> <value> Overrides any value of the input file.

Overriding values of the input file

--set-<path> <value> changes any value of the input file, <path> being the YAML keys joined with -:

$ onikarun print_loop.msp --set-global-nsteps 3

See Overriding values from the command line.

Getting help

$ onika-exec --help <operator>        # slots and documentation of an operator
$ onika-exec --help plugins           # available plugins and their operators
$ onika-exec --help command-line      # every option, with its default
$ onika-exec --help default-config    # the same, as a YAML configuration block

When something goes wrong or is slow, see Debugging and profiling.