====== How to connect to the VSC from a windows machine ====== At first a vpn-connection to your university has to be established. The ZID help pages of the respective university explain how a vpn client can be installed. There are several different ways how to connect to the Cluster. ==== File transfer ==== Files can be transferred to your home directory on the cluster using the tool [[https://filezilla-project.org|FileZilla]]. Due to the two-factor identification, "quick connect" does not work and the connection has to be established by means of the site manager, the icon of which is located at the top left side of FileZilla (compare Figure 1.a). In the first window * server name (VSC 3: vsc3.vsc.ac.at, VSC4: vsc4.vsc.ac.at) * port: 22 * user name: which you have created on VSC, and * Logon Type needs to be set to: interactive have to be specified. After clicking the button "connect", you will be asked for the * password: which you have created on VSC, * and the OTP. Alternatively, you may use [[http://winscp.net/|winscp]], see also Figure 1.b: * host name (VSC 3: vsc3.vsc.ac.at, VSC4: vsc4.vsc.ac.at), * port: 22, * user name and password can be skipped here and provided later together with the OTP. {{ :doku:win2cluster:filezilla_10.png |}} **Figure 1.a:** [[https://filezilla-project.org|FileZilla]]. VSC-3: vsc3.vsc.ac.at | VSC-4: vsc4.vsc.ac.at. {{ :doku:win2cluster:winscp.png |}} **Figure 1.b:** [[http://winscp.net/|winscp]]. ==== Terminal connection ==== A terminal connection to the cluster opens on your windows machine by taking advantage of the tool [[http://www.putty.org|PuTTY]]. PuTTY, compare Figure 2, requires * host name (VSC 3: vsc3.vsc.ac.at, VSC 4: vsc4.vsc.ac.at), * port: 22, * connection type: SSH, after clicking //open// you will be asked for your user name, password, and OTP. Here, the usual linux commands apply, e.g., [@l21 ~]$ pwd [gives back the current path] [@l21 ~]$ ls [lists all directories and files which are in the directory] [@l21 ~]$ mkdir [make directory] [@l21 ~]$ cp [copy in ] [@l21 ~]$ mv [move in ] In this terminal, your application can be (re-)compiled. Batch jobs are submitted under [[doku:slurm|SLURM]]. {{ :doku:win2cluster:putty.png |}} **Figure 2:** [[http://www.putty.org|PuTTY]]. ==== The job file: text editors on the Cluster ==== Create a job file as described in the section [[doku:slurm|Submitting batch jobs (SLURM)]]. You have to submit a remote job, it is not allowed to run your application directly on the login nodes. Editors in //Windows// may add additional invisible characters to the job file which render it unreadable and, thus, it is not executed. It can be quite cumbersome to find and remove these additional characters. Therefore, it is advisable to write the job file directly on the VSC linux cluster. Available editors on the VSC include [[http://www.nedit.org|NEdit]], see Figure 3. //NEdit// opens if you enter [@l41 ~]$ nedit & [+ return] on the command line. This editor works similar to //ms windows// applications. **Note:** You have to connect via X-forwarding to use it The **&** is used to open the application in the background and to be able to continue to work in the terminal. Alternatively to //NEdit// the [[http://www.vim.org/docs.php|vim]] editor may be used. The command [@l41 ~]$ vim [+ return] calls the application //vim// and the file is opened if it exists already, otherwise it is created. //vim// in general has 2 different modi, one editing mode where you can write and a command mode. A file is always opened in command mode. There are several commands to switch to the editing mode, e.g., typing the letter **i** switches to //insert// or **R** to //replace//. A more detailed documentation to //vim// can be found in [[http://www.vim.org/docs.php|vim]]. In order to switch from editing mode to command mode, the //esc// key has to be hit. The editor can be quit in command mode by, e.g., **:q!** (file is not saved) or **:wq** (file is saved). At first sight, //vim// does not seem to work intuitively, however, once one is used to it, it is a very powerful program which allows for faster file manipulation than with a graphical editor. Here, a quick [[http://tnerual.eriogerg.free.fr/vimqrc.pdf|vim reference manual]] can be found. {{ :doku:win2cluster:nedit.png |}} **Figure 3:** [[http://www.nedit.org|NEdit]].