Remote computations¶
Instructions for remote computations¶
By remote computation we mean execution of a SHIPFLOW computation on a host that must be a Linux server from a client that can be either a Windows or Linux platform. The computation is initiated from the client. The command and offset files are transferred over to the remote host where the computation is carried out. The output and CGNS files are then transferred back to the client.
Data files are synchronized instead of copied to avoid unnecessary copying. Synchronization is done with the program rsync using SSH (Secure Shell protocol). SSH is also used for controlling the execution of SHIPFLOW on the host. A password free connection is needed to enable SHIPFLOW Design to use the remote computation.
The rshipflow script in the bin directory contains a few variables that must be given the right values for the client / host set up. These are
| Variable | Description |
|---|---|
RHOST |
User and host address of the remote host, e.g. [email protected] |
RWDIR |
Name of the working directory on the remote host. |
RSHIPFLOW |
Location of the shipflow script on the remote host, e.g. /opt/shipflow/bin/shipflow |
Files are copied from the client to a location under the RWDIR directory on the Linux host using the full directory path to avoid name conflicts. The data files are located under the directory cygdrive in the RWDIR for Windows clients. It is recommended to use unique names of RWDIR if the RHOST is accessed from several clients.
To start a remote computation, run the rshipflow command in the working directory:
To use rshipflow in SHIPFLOW Design, replace shipflow by rshipflow in the Computation editor.
Windows specifics¶
The rshipflow.bat script assumes that cwRsync has been installed. This program also installs a version of SSH. See cwRsync.
The Linux host needs the dos2unix tools in order to convert the command and offset files from DOS to Unix format.
The SHIPFLOW script for remote computations is a batch file located in the bin directory, rshipflow.bat.
Linux specifics¶
Client. The SHIPFLOW script for remote computations is a bash script located in the bin directory, rshipflow.sh.
Host. The host must have SSH service set up and made accessible for the clients. It also needs an authorization mechanism set up to allow password free access. Typically this is achieved with public key authentication.
SSH public key authentication¶
This section outlines the basic steps to set up a password free connection from the client to the server using public keys. More details are found in the documentation of the Linux distribution.
- Generate a key pair on the client. Run
ssh-keygen -t rsaand do not enter any password (just type Enter on all questions). The programssh-keygenis found in the installation directory of cwRsync. - Copy the public key
id_rsa.pubto the Linux host and append it to the file.ssh/authorized_keysin the remote user's home directory.
Example for Windows: open a Command Prompt, then type:
Known limitations¶
- The
rshipflowscript must be started in the directory where the command file is located (current working directory). - Don't use spaces or
..in the path or name of the command and offset files.