Client/Serverモード

リモートサーバ上でParaView(pvserver)を実行し、描画結果のみを手元のPC(クライアント)で受信することができる。

リモートサーバでのpvserverの実行は、以下のコマンドで行う。

pvserver --use-offscreen-rendering

また、mpirunが利用可能な環境では、下記コマンドにより並列処理も可能である。
ここでは、ノード内4並列でpvserverを実行する例を示す。

mpirun -np 4 pvserver --use-offscreen-rendering

pvserverが正常に実行された場合、以下のような表示が確認できる。
[servername]は、pvserverを実行したサーバ名である。

Waiting for client...
Connection URL: cs://[servername]:11111
Accepting connection(s): [servername]:11111

続いて、クライアント側の接続設定を行う。
ParaViewを通常起動後、File→Connect…から上記サーバを登録する。
Add Serverをクリックし、Name(任意)、Server Type(Client / Server)、Host(サーバ名)、Port(サーバ名の後に併記されたポート番号…11111など)を指定し、Configure後Saveする。
登録したサーバ情報を選択した状態でConnectをクリックすると、先程起動したpvserverに接続できる。

ParaViewの3D描画は通常X Window Systemを介して行われるため、出力先ディスプレイが存在しない環境でpvserverを実行した場合、クライアント側でViewを更新しようとした際にpvserverが不正終了する。スーパーコンピュータなど出力先ディスプレイが存在しない環境でpvserverを実行したい場合は、Mesaライブラリ付きでParaViewをビルドする必要がある。

補足: Windows環境の不具合について

Windows環境でビルド済のParaViewに付属するpvserver.exeを単独実行した場合、以下のようなエラーが表示される。

C:\Program Files\ParaView 4.1.0\bin>pvserver.exe
[servername:07224] [[INVALID],INVALID] ERROR: Failed to identify the local daemon's URI
[servername:07224] [[INVALID],INVALID] ERROR: This is a fatal condition when the binomial router
[servername:07224] [[INVALID],INVALID] ERROR: has been selected - either select the unity router
[servername:07224] [[INVALID],INVALID] ERROR: or ensure that the local daemon info is provided
[servername:07224] [[INVALID],INVALID] ORTE_ERROR_LOG: Fatal in file C:\DBD\pvs-x64\mpi\src\mpi\orte\mca\ess\base\ess_base_std_app.c at line 151
--------------------------------------------------------------------------
Sorry!  You were supposed to get help about:
    orte_init:startup:internal-failure
But I couldn't open the help file:
    C:\DBD\pvs-x64\install\share\openmpi\help-orte-runtime.txt: No such file or directory.  Sorry!
--------------------------------------------------------------------------
[servername:07224] [[INVALID],INVALID] ORTE_ERROR_LOG: Fatal in file C:\DBD\pvs-x64\mpi\src\mpi\orte\mca\ess\singleton\ess_singleton_module.c at line 277
[servername:07224] [[INVALID],INVALID] ORTE_ERROR_LOG: Fatal in file C:\DBD\pvs-x64\mpi\src\mpi\orte\runtime\orte_init.c at line 132
--------------------------------------------------------------------------
Sorry!  You were supposed to get help about:
    orte_init:startup:internal-failure
But I couldn't open the help file:
    C:\DBD\pvs-x64\install\share\openmpi\help-orte-runtime: No such file or directory.  Sorry!
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Sorry!  You were supposed to get help about:
    mpi_init:startup:internal-failure
But I couldn't open the help file:
    C:\DBD\pvs-x64\install\share\openmpi\help-mpi-runtime: No such file or directory.  Sorry!
--------------------------------------------------------------------------
*** The MPI_Init() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
[servername:7224] Abort before MPI_INIT completed successfully; not able to guarantee that all other processes were killed!

原因はMPICH2へのリンクの不具合と思われる。
シングルジョブの場合も以下のようにMPICH2経由で実行することにより、前記不具合を回避できる。

C:\Program Files\ParaView 4.1.0\bin>mpirun.exe -np 1 pvserver.exe
Waiting for client...
Connection URL: cs://[servername]:11111
Accepting connection(s): [servername]:11111

Windowsの場合、都度コマンド入力でParaViewを起動するのは不便である。
下記書式(cd先は各人の環境に応じて修正のこと)をテキストエディタに入力し、ファイル名を‘pvserver.bat’などとしてデスクトップに保存しておけば、ダブルクリックでpvserverが実行できる。

cd "C:\Program Files\ParaView 4.1.0\bin"
mpirun.exe -np 1 pvserver.exe
タグ: , , , , , , , , , , , , , , , , ,

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*