Updated documentation
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: Interactive Jobs
|
||||
title: Running Interactive Jobs
|
||||
#tags:
|
||||
keywords: interactive, X11, X, srun
|
||||
last_updated: 22 October 2019
|
||||
last_updated: 23 January 2020
|
||||
summary: "This document describes how to run interactive jobs as well as X based software."
|
||||
sidebar: merlin6_sidebar
|
||||
permalink: /merlin6/interactive-jobs.html
|
||||
@@ -11,7 +11,10 @@ permalink: /merlin6/interactive-jobs.html
|
||||
## Running interactive jobs
|
||||
|
||||
There are two different ways for running interactive jobs in Slurm. This is possible by using
|
||||
the ``srun`` or the ``salloc`` commands.
|
||||
the ``salloc`` and ``srun`` commands:
|
||||
|
||||
* **``salloc``**: to obtain a Slurm job allocation (a set of nodes), execute command(s), and then release the allocation when the command is finished.
|
||||
* **``srun``**: is used for running parallel tasks.
|
||||
|
||||
### srun
|
||||
|
||||
@@ -143,65 +146,9 @@ For other non officially supported graphical access (X11 forwarding):
|
||||
* For Windows clients, please follow [{Accessing Merlin -> Accessing from Windows Clients}](/merlin6/connect-from-windows.html)
|
||||
* For MacOS clients, please follow [{Accessing Merlin -> Accessing from MacOS Clients}](/merlin6/connect-from-macos.html)
|
||||
|
||||
#### Enable SSH Keys authentication
|
||||
|
||||
For running ``srun`` with **X11** support (``srun --x11``) , you need to setup RSA keys properly.
|
||||
|
||||
1. Generate the RSA keys as follows:
|
||||
|
||||
```bash
|
||||
ssh-keygen -t rsa
|
||||
```
|
||||
|
||||
You will be requested for an *optional* passphrase. Entering it, provides more security (if somebody steals your private key he will
|
||||
need to know the passphrase, however every time you use RSA keys you will need to type it). Whether to set a passphrase or not is up
|
||||
to the users.
|
||||
|
||||
2. Add the public key to the ``~/.ssh/authorized_keys`` file
|
||||
|
||||
```bash
|
||||
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||||
```
|
||||
|
||||
3. Ensure that ``~/.ssh/authorized_keys`` has proper permissions:
|
||||
|
||||
```bash
|
||||
chmod 600 ~/.ssh/authorized_keys
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>[Show 'ssh-keygen' example]: Generate RSA keys with default key filenames</summary>
|
||||
<pre class="terminal code highlight js-syntax-highlight plaintext" lang="plaintext" markdown="false">
|
||||
(base) [caubet_m@merlin-l-001 .ssh]$ ssh-keygen -t rsa
|
||||
Generating public/private rsa key pair.
|
||||
Enter file in which to save the key (/psi/home/caubet_m/.ssh/id_rsa):
|
||||
Enter passphrase (empty for no passphrase):
|
||||
Enter same passphrase again:
|
||||
Your identification has been saved in /psi/home/caubet_m/.ssh/id_rsa.
|
||||
Your public key has been saved in /psi/home/caubet_m/.ssh/id_rsa.pub.
|
||||
The key fingerprint is:
|
||||
SHA256:AMvGhBWxXs1MXHvwTpvXCOpjUZgy30E+5V38bcj4k2I caubet_m@merlin-l-001.psi.ch
|
||||
The key's randomart image is:
|
||||
+---[RSA 2048]----+
|
||||
| o*o ...o . ...|
|
||||
| .+ + =. O o .o|
|
||||
| * o * + Xo..+|
|
||||
| o . . + B.*oo+|
|
||||
| . S + =.oo.|
|
||||
| . .E.+ |
|
||||
| +. . . |
|
||||
| . . |
|
||||
| |
|
||||
+----[SHA256]-----+
|
||||
|
||||
(base) [caubet_m@merlin-l-001 .ssh]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||||
(base) [caubet_m@merlin-l-001 .ssh]$ chmod 600 ~/.ssh/authorized_keys
|
||||
</pre>
|
||||
</details>
|
||||
|
||||
### 'srun' with x11 support
|
||||
|
||||
Once RSA keys are setup, you can run any windows based application. For that, you need to
|
||||
Merlin5 and Merlin6 clusters allow running any windows based applications. For that, you need to
|
||||
add the option ``--x11`` to the ``srun`` command. In example:
|
||||
|
||||
```bash
|
||||
@@ -243,7 +190,7 @@ exit
|
||||
|
||||
### 'salloc' with x11 support
|
||||
|
||||
Once RSA keys are setup, you can run any windows based application. For that, you need to
|
||||
**Merlin5** and **Merlin6** clusters allow running any windows based applications. For that, you need to
|
||||
add the option ``--x11`` to the ``salloc`` command. In example:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user