Command line syntax
Ocean may be used either with a Graphical User Interface (GUI) or in console mode. This is controlled via command line parameters, which offers various possibilities.
General command line interface
ocean.exe [input-files] [options]
GUI vs Console
If the -gui option is given, or if the program is launched without any argument, the program will run in GUI mode. If any option or input file is set, and if the -gui option is not given, the program will run in console mode.
In console mode, the working directory is the current command-line path. Each input scene file will be simulated sequentially. A halt condition must have been properly set in the file, otherwise the simulation will never finish and the result will not be saved. Ocean raw result files cannot be opened in console mode.
Multiple input files may be passed using the * and ? wildcards. * matches a variable number of characters, and ? matches a single character.
- -o output-file Output file name (Console only)
- This parameter sets the output file name for the simulation. The file format is automatically chosen from the file extension, see file formats for more details.
- When multiple input files are given and simulated sequentially, setting this option to a file name will cause the result file to be overwritten when each simulation is done. You may use the "*" wildcard instead, it will be replaced by the input file name. For instance : -o *.jpg.
- -s [port] Server mode (Console and GUI)
- This parameter starts Ocean in server mode. The optional port value is the network port to be opened, between 1 and 65535. If omitted, the value set in the preferences of GUI mode (11878 by default) is used. See network simulation for more details.
- -sr host1,host2,... Connect to remote Ocean servers (Console and GUI)
- This parameter tells Ocean to connect to remote Ocean servers for network simulation. Multiple server hosts may be added by separating them with commas, or by adding multiple -sr arguments.host can be any valid network name or IP address. Port is specified in the host:port format. This option is ignored in server mode.
- -sl Connect to internal Ocean server (Console and GUI)
- This parameter tells Ocean to create and connect to an internal server. This is the default behavior (non networked simulation), but this option must be used if remote servers were added and if the client should work too. This option is ignored in server mode.
- -v or --verbose (Console and GUI)
- Displays (much) more information in the log
- Forces the GUI mode even if command-line parameters are passed
- --showinputfiles Just display the list of input files
- This option just prints a list of input scene files with their full path, and do not start any simulation. This is useful for solving issues related to input file wildcards (* or ?) and relative paths.