Connecting to clusters with restricted access
MDsrv is meant to be deployed on local supercomputer clusters where MD data will be hosted and streamed. However, sometimes one might require to access MD data hosted at big supercomputers with specific security restrictions (e.g. dual authentication/National Supercomputers). In these particular cases, MD trajectories can be accessed by a classical approach, namely mounting a remote file system. We explain below how to do so.
Note that you need to have installed the MDsrv on your local machine. Please keep your and your HPC center security guidelines in mind!
UNIX: sshfs - FUSE
This tutorial is tested for Linux and Mac OS systems. We use sshfs, a FUSE module to mount the remote file system. If it is not already installed, do so:
sudo apt-get install sshfs
Create a local directory in which to mount the remote file system:
mkdir /dir/to/mounted/system
Now connect to the HPC center and view the current simulation using MDsrv:
sshfs username@cluster:/work/username/ /dir/to/mounted/system
cd /dir/to/mounted/system/projects/sims/
mdsrv gs_1.part0010.gro gs_1.part0001.xtc
You can easily unmount it if you do not need it anymore with this command:
fusermount -u /dir/to/mounted/system
Note that this provides only a temporary mount point. If the virtual server or local machine is powered off or restarted, you will need to use the same process to mount it again. You can overcome this by mounting it permanently (see below).
Speed it up!
To speed up the connection, you need to change the synchronization by using one of those options:
sshfs username@cluster:/work/username/ /dir/to/mounted/system -o Ciphers=arcfour
sshfs username@cluster:/work/username/ /dir/to/mounted/system -oauto_cache,reconnect
further sshfs_opts="-o auto_cache -o cache_timeout=115200 -o attr_timeout=115200
-o entry_timeout=1200 -o max_readahead=90000 -o large_read
-o big_writes -o no_remote_lock"
Permanently mounting
In order to set up a permanent mount point, you need to edit the /etc/fstab file on the local machine to automatically mount the file system each time the system is booted. Therefore add the following entry to your /etc/fstab at the bottom of the file and reboot afterwards:
sshfs#root@xxx.xxx.xxx.xxx:/ /dir/to/mounted/system
Please note that permanently mounting your HPC file system locally is a potential security risk. If your local machine is compromised it allows for a direct route to your HPC file system. Therefore it is not recommended to setup permanent mounts on production servers.
Windows: sshfs - FUSE
sshfs also offers the possibility for Windows users to mount remote file systems. We have not tested this but refer to this tutorial.