Batch processing: Introduction

Simulations, script files, post-processing spreadsheets and fatigue analyses can all be run in unattended mode, by using the Calculation | Batch processing menu item. This command opens a form that allows you to set up a list of jobs that are to be run. The list can include any number and mixture of the following types of job:

Note: If you wish to use Excel while OrcaFlex is processing spreadsheets within a batch you must open Excel directly, and then open the file you wish to work on. Do not double-click on an Excel file to open it while OrcaFlex is processing spreadsheets from a batch. If you do, Windows will try to use the copy of Excel already in use by OrcaFlex, resulting in unpredictable failures.

OrcaFlex can auto-save partially-completed dynamic simulations at regular intervals during the batch job. This is useful if your computer is prone to failure (for example because of overnight power failures) since the part-run simulation file can be loaded and continued, rather than having to re-run the whole simulation from scratch.


The batch processing functionality can make use of multiple processor cores. So, for example, if you have a quad-core machine then 4 simulation files can be run concurrently.

Since some batch tasks might depend on the output of other tasks, OrcaFlex processes tasks in a specific order:

The commands in batch script files are processed sequentially, in the order in which they appear in the job list. Consequently any simulations that are initiated with a RunDynamics command cannot be performed in parallel. We recommend, therefore, that you use the SaveData command rather than the RunDynamics command when creating batch scripts. Such a script would create a number of OrcaFlex data files which you could then process in the batch form using all available processor cores.

Python or batch command scripts are also executed sequentially, in the order in which they appear in the job list.

OrcaFlex creates a single dedicated thread for saving the simulation files processed in the batch form. With a high thread count and large simulation files this may not be sufficient to clear the save queue, resulting in the CPU utilisation reducing significantly during the batch run. You can specify additional save threads by adding the following setting to the registry:

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Orcina\OrcaFlex
Name: Batch Save Thread Count Preference
Data: A value between 1 and the core count of the computer.

Limiting the number of dedicated save threads avoids flooding the disk or network with data being saved, and frees the remaining OrcaFlex threads to process the rest of the batch. Be cautious with the value of this setting: for most situations a single save thread is sufficient.

Batch form user interface

Add files

Launches a file browser that allows you to add jobs to the list. The file browser includes an include restart parents option; if you add a restart analysis, then checking this option will result in all preceding parent analyses also being added to the list of jobs, all the way back to the ultimate parent.

Files can also be added by drag and drop. That is, if you are browsing your file system you can highlight files and drag them onto the jobs list. Files can be added whilst a batch is running.

Remove files

Removes any files highlighted in the jobs list.

Check files

OrcaFlex opens each file in the jobs list, checks that they contain valid OrcaFlex data or script commands and reports any errors. When checking OrcaFlex spreadsheet or fatigue files it simply confirms the file exists.

Run batch

Processes the list of jobs. If a job fails then it is abandoned, but other jobs are still attempted. Any errors are reported once all jobs have been processed.

Pause batch

Pauses the currently running batch jobs. This can be useful if you temporarily want another process on your machine to have the processor resource that OrcaFlex is using.

Stop batch

Terminate processing of batch jobs.

Show warnings

Displays a window allowing you to review all warnings generated by OrcaFlex during a calculation. These warnings are suppressed when you are operating in batch mode; this button allows you to review them once the simulation has completed.

Skip dynamics

If checked, dynamics will not be performed for OrcaFlex data files (.dat or .yml), even if dynamics is enabled for the model.

Close program when batch completes

If checked then OrcaFlex will close once the processing of jobs completes. This feature is intended principally for users with networked licences. It allows you to release your claim on an OrcaFlex licence as soon as the batch of jobs is complete.