Console

The console program can be used for submitting jobs for processing, listing the status of queued jobs, or setting the priority and availability of a named Distributed OrcaFlex Client from a command line or script.

Hardware requirements

The hardware requirements for dofcmd.exe are the same as that for the viewer program.

Settings

The settings for dofcmd.exe are stored in the system registry. The dofcmd.exe program shares its settings with the viewer program. For ease of use, you may wish to either add the Distributed OrcaFlex installation folder to your PATH environment variable or copy dofcmd.exe from there to a location already on your PATH.

Using the console program

Just typing the following at the console with no parameters will display help:

dofcmd

List all jobs

To list jobs in the queue, type the following command into a console window:

dofcmd -list [OPTIONS]

The output from this command is the jobs queue in either csv or yaml format, depending on the following [OPTIONS]:

-csv Output in csv format (this is the default).
-yaml Output in yaml format.

The output for both formats consists of the following fields:

Note: File names and any status text containing commas will be enclosed in double quotes.

For csv format, there is one job per line, with each line consisting of comma separated values. For yaml format the same information is presented as a sequence of mappings.

The job ID is a unique identifier used by Distributed OrcaFlex, the other items are explained in more detail here.

Add jobs

To add jobs for processing use the following command:

dofcmd –add [OPTIONS] <filename1> … <filenameN>

This will add the files listed to the Distributed OrcaFlex queue using the following [OPTIONS]:

-dllname=<filename> <filename> specifies the full path of the OrcFxAPI DLL. If this option is missing then the default DLL will be used.
-autosave=<n> <n> is the autosave interval in minutes. If this option is missing then the default autosave time will be used.
-wait Wait until all jobs have completed before returning.
-skipdynamics Dynamics will not be performed even if dynamics is enabled in the analysis data of the data file.
-respectrestarts Restart dependencies will be analysed to ensure that child models are run after the parent model has completed.
-includeparents Restart parents will be automatically added to the submitted list of files. This also sets the -respectrestarts option.

The files to be added can be OrcaFlex data or simulation files (*.dat, *.yml or *.sim). Alternatively, a text file containing a list of OrcaFlex data or simulation files (with the full path) can be specified.

A return value of 0 means the call was successful, a value of 1 means that an error message was generated and sent to stdout.

Cancel jobs

Jobs can be removed with the following command:

dofcmd –cancel <filename1> … <filenameN>

The files to be removed are specified in the same way as for adding files. The program will match the specified files with jobs in the job list that are running or pending, and cancel these.

Change processors

To change the number of available processors for a Distributed OrcaFlex client, use the following command:

dofcmd –machine=<name> -processors=<n>

Where:

-machine=<name> <name> is the name of the client machine as it appears in the Viewer program Machine column of the Clients page.
-processors=<n> <n> is the number of processors available for running jobs. Use 0 to disable the client (the equivalent of choosing None in the viewer program or from the task bar icon).

Change priority

To modify the machine priority value of a client, to change its relative position in the scheduling queue, use this command:

dofcmd –machine=<name> -priority=<n>

Where:

-machine=<name> <name> is the name of the client machine as it appears in the Viewer program Machine column of the Clients page.
-priority=<n> <n> is the priority value to use when the scheduler is ranking clients relative to each other. The highest priority is 1, the lowest 3.

Clear completed jobs

Completed jobs can be cleared from the server job list with the following command:

dofcmd –clearjobs=<owner>

Where:

–clearjobs=<owner> <owner> is the name of the job owner (as displayed in the Viewer program under the owner column). Alternatively, use all to clear every completed job from the job list.