2. コマンドライン引数

コマンドライン引数を使用すると、ランタイム時のアプリケーションの動作や設定を制御でき、スクリプトや自動化されたパイプラインとの統合も容易になります。1.3 章 で詳述されているすべての ParaView 実行ファイルは共通のコマンドラインオプションセットを共有していますが、それぞれのプログラムは機能に固有の引数もサポートしています。

以下の基本的な構文ルールは、すべての ParaView 実行ファイルに適用されます。

  • オプションの値はスペースまたは等号の後に指定できます。

    • --option value--option=value と同等です。

  • 複数の値を受け付けるオプション(--moption TYPE ... のように表記)では、オプションを複数回指定するか、値をカンマで区切って指定することができます。

    • --moption=foo --moption=bar--moption=foo,bar と同等です。

  • オプションは特定の型の値を要求する場合があります。

    • TEXT: テキスト文字列

    • INT: 整数値

    • FLOAT: 浮動小数点値

    • ENUM: あらかじめ定義された値のいずれか

2.1. 共通オプション

以下のオプションは、すべての ParaView 実行ファイル(paraviewpvpythonpvbatchpvserverpvdataserverpvrenderserver)に共通です。

一般オプション:

  • -h--help: ヘルプメッセージを表示して終了します。

  • -V--version: バージョン番号を表示して終了します。

  • -v--verbosity ENUM:verbosity: stderr に出力されるログの詳細度を制御します。[-9, 9] の範囲の整数値、または INFOWARNINGERROROFF のいずれかを使用できます。デフォルトは INFO(0) です。

  • -d--dr--disable-registry: ユーザー固有のアプリケーション設定および構成オプションをスキップします。

  • --print-monitors: モニタ情報を表示して終了します。このオプションは Windows でのみ利用可能です。

  • --venv TEXT: 指定したパスの仮想環境で Python を初期化します。

デバッグおよびログオプション:

  • --enable-bt: クラッシュ時に可能であればスタックトレースを生成します。

  • --cslog TEXT: ClientServerStream ログを生成する際に使用するファイル名を指定します。

  • -l--log TEXT[,ENUM:verbosity] ...: 追加のログファイルを生成します。複数回指定することが可能です。デフォルトではログの詳細度は INFO(0) に設定されていますが、サフィックスとして ,verbosity を追加することでファイルごとに上書きできます。verbosity の値は --verbosity 引数で指定できるものと同じです。

MPIオプション:

  • --mpi: 必要でない場合でも、現在のプロセスに対して MPI を初期化します。

    • 除外: --no-mpi

  • --no-mpi: 必要がなければ現在のプロセスで MPI の初期化をスキップします。

    • Excludes: --mpi.

  • --use-mpi-ssend: Use MPI_SSend instead of MPI_Send, whenever possible. Useful for debugging race conditions in distributed environments.

    • This setting can also be configured via the PARAVIEW_USE_MPI_SSEND environment variable.

Plugin options:

  • --plugins TEXT ...: Specify plugins to load on startup.

  • --plugin-search-paths TEXT ...: Specify search paths for plugins when resolving plugin names.

Connection options:

  • --connect-id INT: An identifier used to match client-server connections. Non-zero values require the client and server to use the same identifier. Default is 0.

  • --hostname TEXT: Override the hostname used for connecting to this process. By default, the hostname is determined using appropriate system calls.

Rendering options (for all but pvdataserver):

  • --force-offscreen-rendering: If supported by the build and platform, creates headless (offscreen) render windows for rendering results.

    • Excludes: --force-onscreen-rendering.

  • --force-onscreen-rendering : If supported by the build and platform, creates on-screen render windows.

    • Excludes --force-offscreen-rendering.

    • This setting can also be configured via the PV_DEBUG_REMOTE_RENDERING environment variable.

  • --opengl-window-backend ENUM Specify the OpenGL window backend to use. Supported values are GLX, EGL, OSMesa, Win32. This option is only relevant for pvbatch, pvpython, pvserver, and pvrenderserver.

    • If not specified, the default backend is determined by the build and hardware configuration.

Display environment options (for all but pvdataserver):

  • --disable-xdisplay-test: Skips all X-display tests and OpenGL version checks. This is only applicable on systems with X. Use this if you're confident that your X environment and OpenGL support are set up correctly (experimental).

  • --displays TEXT ...: Specify a list of rendering display or device ids. For X-based systems, this can be the value to set for the DISPLAY environment. For EGL-based systems, these are the available EGL device indices. When specified these are distributed among the number of rendering ranks using --displays-assignment-mode specified.

  • --displays-assignment-mode ENUM: Specify how to assign displays (specified using --displays=) among rendering ranks. Supported values are round-robin (default) and contiguous.

    • Needs: --displays.

Stereo rendering options (for all but pvdataserver):

  • --stereo: Enables stereo rendering.

  • --stereo-type INT: Specify the stereo type to use. Possible values are Crystal Eyes, Red-Blue, Interlaced, Dresden, Anaglyph, Checkerboard, or SplitViewportHorizontal.

    • Needs: --stereo.

  • --eye-separation FLOAT: Specify eye separation distance.

    • Needs: --stereo.

2.2. paraview-Specific Options

Arguments controlling actions on application launch:

  • filenames TEXT ...: Positional arguments that may be used to pass either data, state, or script files. .pvsm files are treated as state files, .py are treated as scripts and all others are treated as data files.

    • Excludes: --state, --script, --data.

  • --state TEXT State file (.pvsm or .py) to load when the application starts.

    • Excludes: --script, --data, filenames.

  • --script TEXT: Python script to execute when the application starts.

    • Excludes: --script, --data, filenames.

  • --data TEXT ...: Load the specified data file(s) when the client starts. For file series, replace the numeral with a dot (e.g., my0.vtk, my1.vtk...myN.vtk becomes my..vtk).

    • Excludes: --state, --script, filenames.

  • --live INT: Connect to Catalyst Live session at the specified port number. Default is -1.

Testing specific options:

  • --baseline-directory TEXT: Directory where the test recorder will store baseline images.

    • Can also be set via the PARAVIEW_TEST_BASELINE_DIR environment variable.

  • --test-directory TEXT: Directory for temporary test results and files.

    • Can also be set via the PARAVIEW_TEST_DIR environment variable.

  • --data-directory TEXT: Directory containing input data files for tests.

    • Can also be set via the PARAVIEW_DATA_ROOT environment variable.

  • --test-script TEXT ...: Test scripts to execute, in the order specified on the command line.

  • --test-baseline TEXT: ...: Specify baseline for test scripts provided.

  • --test-threshold FLOAT ...: Test image comparison threshold for test scripts provided.

  • --exit: Exits application when tests are finished.

Options affecting connections between client/server processes:

  • --url, --server-url TEXT: Specify the server connection URL. On startup, the client will connect to the server using the URL specified.

    • Excludes: --server.

  • -s, --server TEXT: Specify the server resource name for client connection.

    • Excludes: --url

  • --servers-file TEXT ...: Additional servers configuration file(s) (.pvsc) to use.

  • --multi-servers: (Experimental) Enables the client to connect to multiple independent servers at the same time.

2.3. pvpython-Specific Options

Connection options: These are the same as the connection options in the paraview-Specific Options.

2.4. pvbatch-Specific Options

一般オプション:

  • -s, --sym, --symmetric: When specified, the python script is processed symmetrically on all processes.

2.5. pvserver-Specific Options

Options affecting connections between client/server processes:

  • --client-host TEXT: Specify the hostname for reverse-connection mode. Default is localhost.

  • -r, --rc, --reverse-connection: Uses reverse connection mode, where instead of the client connecting to the server(s), the server(s) will connect back to the client. Default is 0.

  • -p, --sp, --server-port INT: Port number to use to listen for connections from the client. In reverse-connection mode, this is the port number on which the client is listening for connections. Default is 11111.

  • --bind-address TEXT: Specifies the address to bind the server socket to. Default is 0.0.0.0.

  • --timeout INT: Specifies the timeout in minutes for a server connection. Default is 0.

  • --timeout-command TEXT: Command for the server to periodically check remaining connection time. When executed, the command should write an integer value to stdout.

  • --timeout-command-interval INT: Interval in seconds between consecutive calls to the timeout command. Default is 60.

    • Needs: --timeout-command.

Tile-display specific options:

  • --tdx, --tile-dimensions-x INT: Number of displays in the horizontal direction.

  • --tdy, --tile-dimensions-y INT: Number of displays in the vertical direction.

  • --tmx, --tile-mullion-x INT: Size of the gap in pixels between displays in the horizontal direction.

  • --tmy, --tile-mullion-y INT: Size of the gap in pixels between displays in the vertical direction.

CAVE specific options:

  • --pvx TEXT: ParaView CAVE configuration file (typically a .pvx file) that provides the configuration for screens in a CAVE.

2.6. pvdataserver-Specific Options

接続オプション: これらは pvserver-Specific Options と同じですが、-p, --sp, --server-port フラグは次のものに置き換えられます。

  • -p--dsp--data-server-port INT: クライアントからの接続を待ち受けるために使用するポート番号。リバース接続モードでは、これはクライアントが接続を待ち受けているポート番号になります。デフォルトは 11111 です。

2.7. pvrenderserver 固有のオプション

Tile DisplayCAVE接続オプションpvserver-Specific Options にあるものと同じですが、-p, --sp, --server-port 接続オプションは次のものに置き換えられます。

  • -p--rsp--render-server-port INT: クライアントからの接続を待ち受けるために使用するポート番号。リバース接続モードでは、これはクライアントが接続を待ち受けているポート番号になります。デフォルトは 22221 です。