Python3 library and command line tool to help starting and connecting to remote Linux ParaView servers. It sets up the required ssh tunnels to establish a forward or reverse connection to a remote host and launches the paraview pvserver process. The client supports Windows, MacOS and Linux but is designed to connect to Linux based remote servers. For the current release of ParaviewConnect, Windows users are recommneded to use WSL.
- Your local machine has python with the latest version of pip installed
- Your local machine and remote server have matching versions of paraview and paraview server installed, and you know the location of the Paraview Server binary (pvserver) on the remote host. See below for application specific configuration tips.
Currently zCFD is using paraview 5.10
- You have passwordless ssh set up to the remote server, allowing you to connect to the remote host without entering a password
You can install the package from PyPi using pip with pip install paraview-connect
You can install directly from Github using pip with pip install git+https://github.com/zenotech/ParaViewConnect.git
If installation fails with errors installing/building the cyptography package, please ensure you are using the latest release of pip.
Configure paraview-connect by running paraview-connect configure
. This will then prompt you to enter details of your first connection and save it with a profile name. All confiuration is stored in ~/.paraview-connect/config by default. You will be presented with the following prompts, values in brackets are shown as the default entries. This example will set up a connection to joe.blogs@login1.server.com
Paraview Connect
----------------
Configuring Paraview Connect
Hostname or IP to connect to: login1.server.com
Username on remote system: joe.blogs
Certificate to connect with [~/.ssh/id_rsa]:
Is cerfiticate passphrase protected? [y/N]:
Local port to use for connection [11111]:
Number of MPI processes to use [1]:
Paraview server command [pvserver]:
Pre script to run before paraview server [None]:
Name of profile to store config as: myFirstConfiguration
If you want to add another connection or update the existing one simply run paraview-connect configure
again. You can store multiple profiles in the configuration file.
By default Paraview-connect does not read any of the settings in an ssh config file. If you want to enable this then set the value of load_ssh_configs
to True in ~/.paraview-connect/config
.
When configuring for vanilla paraview, ensure you have a version of Paraview installed on the remote machine you intend to use.
Note here the version on the server MUST be the linux binary, as you may be directed to a different download page depending on your operating system. The Paraview Server for Headless Machines binaries are sufficient for Paraview-Connect.
Once this is installed, ensure either :
pvserver
is added to the path, in which case the Paraview server command is justpvserver
- The Paraview server command reflects the path to your paraview binaries, e.g.
/apps/paraview/bin/./pvserver
When configuring for zCFD you can use the paraview-connect to run the zCFD activate script to prepare your remote environment. To do this add it as a pre-script. For example if zCFD was installed in /apps/zcfd/zCFD-icc-sse-impi-2020.12.116-Linux-64bit/ then your pre-sript would be . /apps/zcfd/zCFD-icc-sse-impi-2020.12.116-Linux-64bit/bin/activate
. Your pvserver command would then just be pvserver
.
When configuring for OpenFoam you can use the paraview-connect to source the OpenFoam environment script to prepare your remote environment. To do this add it as a pre-script. For example if OpenFoam was installed in /apps/OpenFoam/OpenFoam-v1806/ then your pre-sript would be . /apps/OpenFoam/OpenFoam-v1806/etc/bashrc
.
To launch paraview connect to use a profile created with paraview-connect configure
simply run paraview-connect run <profile-name>
. This will launch the client with the configuration specified for that profile. From within Paraview you can then File->Connect and add/load a server configration connection. The server configration should always connect to your localmachine (localhost) but the port and connection type will depend on your paraview-connection configuration.
The following fields are what are typically required for a paraview-connect connection from within the local paraview client.
Field | Value |
---|---|
Name | myFirstConfiguration |
Server Type | Client/ Server |
Host | localhost |
Port | 11111 |
You can also launch sessions directly without using a config file if you run paraview-connect connect
. Check the command help for the list of switches.
The following settings are defined in the ~/.paraview-connect/config file created by configure. Any settings in the DEFAULT section can be overridden in each profile section if required.
Setting | Description | Default |
---|---|---|
cert | Location of your SSH private key | ./.ssh/id_rsa |
remote_host | Hostname or IP or remote machine to connect to | |
username | Username to connect with | |
pvserver_command | Name of pvserver binary to launch | pvserver |
pre_script | Custom script to setup env before launching pvserer | None |
direction | Type of Paraview Server connection, reverse or forward | forward |
cluster | Launch pvserver onto a batch cluster | False |
local_port | Port on localmachine to create connections on | 11111 |
remote_port_range | Paraview-connect will search for an unused port on the remote machine to use, this is the range it checks | 12000:13000 |
nprocs | How many MPI processes to launch paraview with. For values > 1 mpiexec must be available on the remote host. | 1 |
load_ssh_configs | Make use of any local ssh configuration files. If false then the only private key that will be tried is defined as cert | False |