Pirana supports interaction with Linux-based remote hosts on which NONMEM and/or PsN are installed. The Job-schedulers Sun Grid Engine (SGE) and Torque are supported along with SSI-type host managers such as MOSIX. Connecting to a host is established using the SSH protocol or any method that can be invoked from the command line. Two methods are available for using Pirana with a remote system, which involve installation of Pirana either on the local system or directly on the remote server. The following paragraphs discuss these two separate methods.
Note: Single-system image managers such as MOSIX, openMOSIX, and Kerrighed distribute processes automatically across nodes, and therefore no alternative setup is required in Pirana.
Additional information is available on the following topics:
Method 1: Server-based installation
Installing public and private authentication keys
Setting up and working with a host over SSH
Method 1: Server-based installation
When using this approach, Pirana is only installed on the remote host-server, not on the local machine. Pirana is executed from the local machine using X-over-SSH window tunneling. This has the advantage of requiring only one central installation of Pirana for the entire modeling group, and Pirana and other modeling software is installed in a controllable environment. A disadvantage is that the interface is usually a bit slower. Especially when using this method over larger distances (i.e., across the internet), the performance of Pirana may be impaired due to the server-client transmission of the full GUI, but this of course depends on the bandwidth of your connection and can be tested easily. Also, all auxiliary software (Office suite, HTML-browser, R and an R-GUI, etc.) resides on the remote host.
On the local machine it is necessary to have an X window system installed. For Linux users this is likely already installed. Mac OSX users need to install the XQuartz system. For Windows, a good X window manager is Xming, which can be obtained for free from http://sourceforge.net/projects/xming. After installation of Xming, start the Xming X window server. An alternative to Xming is Cygwin/X.
If everything is set up correctly, and the X window server is started, Pirana on the remote host can be accessed through SSH, by using the SSH client. If you get an error saying that the display cannot be started on localhost, you may have to enable X window forwarding in OpenSSH or in PuTTY. When using PuTTY, it is essential to use the PuTTY terminal directly, and not plink.exe. The latter program can cause Pirana to crash often, probably due to terminal incompatibility. OpenSSH can also be used.
The other method is to install Pirana on the local machine, and connect to the remote host using Pirana and third-party SSH software. This installation approach offers a more stable interface (independent of network speed), and does not require installation of auxiliary software on the remote host. It will, however, require a few additional local installations.
First, you need to mount the remote host drive with your data on your local PC (using sshfs on Linux/Mac or ExpanDrive on Windows). For example, ExpanDrive could be used to connect to the remote host through SFTP. While ExpanDrive technically supports use on Mac, experience indicates that sshfs shows much better performance than ExpanDrive. Therefore, sshfs is recommended when using Mac. Refer to https://github.com/osxfuse/osxfuse/wiki/SSHFS. Alternatively, if a Samba server is installed on the remote host, a connection can be established by giving the following command:
NET USE Z: \ \server_name\<name> /user:<name> /persistent:yes
Both on Windows and Linux, the mounted remote disk space and the local location need to be specified through the Pirana Settings dialog (under NONMEM > Hosts > <remote host name>), as these settings are used by Pirana to translate local paths to paths on the remote host.
Secondly, an SSH client needs to be installed, which is typically already available on Linux or Mac. On Windows, PuTTY (http://www.chiark.greenend.org.uk/∼sgt) and OpenSSH (download from http://sshwindows.sourceforge.net/) are good choices.
Installing public and private authentication keys
Either on Windows or Linux, type in a shell/console window: (If you use PuTTY instead of OpenSSH, use the Keypair generator program instead.)
ssh-keygen -t rsa
When asked for a passphrase, press <Enter>. Now a public and a private key have been created in c:\Users\<<username>\AppData\Local\.ssh (Windows) or /home/username/.ssh (Linux). In your home directory on the remote host, if it does not exist already, create the folder .ssh. In this folder, create the file authorized_keys (no extension) and add the contents of id_rsa.pub to that file and save it. Now you should be able to login without being asked for a password. If SSH asks if you want to accept the grid as a valid host, accept. Keep your private key secret. In the Pirana Settings dialog (under NONMEM > Hosts > <remote host name>), specify the username to connect to the remote host (ssh_login).
Tip: If you experience delays (about 5 secs) when logging in to the server by SSH, this may be caused by a reverse DNS lookup. You can circumvent this by adding useDNS no to the file /etc/ssh/sshd_config on the server. Restart the ssh server for the changes to take effect:
sudo /etc/init.d/ssh restart.