Slurm » History » Version 5
Kerstin Paech, 09/18/2013 11:25 AM
1 | 1 | Kerstin Paech | h1. How to run jobs on the euclides nodes |
---|---|---|---|
2 | 1 | Kerstin Paech | |
3 | 1 | Kerstin Paech | Use slurm to submit jobs to the euclides nodes (node1-8), ssh login access to those nodes is not possible. |
4 | 1 | Kerstin Paech | |
5 | 1 | Kerstin Paech | h2. alexandria |
6 | 1 | Kerstin Paech | |
7 | 1 | Kerstin Paech | *Please do not use alexandria as a compute node* - it's hardware is different from the nodes. It hosts our file server and other services that are important to us. |
8 | 1 | Kerstin Paech | |
9 | 1 | Kerstin Paech | You should use alexandria to |
10 | 1 | Kerstin Paech | - transfer files |
11 | 1 | Kerstin Paech | - compile your code |
12 | 1 | Kerstin Paech | - submit jobs to the nodes |
13 | 1 | Kerstin Paech | |
14 | 1 | Kerstin Paech | If you need to debug, please start an interactive job to one of the nodes using slurm. For instructions see below. |
15 | 1 | Kerstin Paech | |
16 | 1 | Kerstin Paech | h2. euclides nodes |
17 | 1 | Kerstin Paech | |
18 | 1 | Kerstin Paech | Job submission to the euclides nodes is handled by the slurm jobmanager (see http://slurm.schedmd.com and https://computing.llnl.gov/linux/slurm/). |
19 | 1 | Kerstin Paech | *Important: In order to run jobs, you need to be added to the slurm accounting system - please contact Kerstin* |
20 | 1 | Kerstin Paech | |
21 | 4 | Kerstin Paech | All slurm commands listed below have very helpful man pages (e.g. man slurm, man squeue, ...). |
22 | 4 | Kerstin Paech | |
23 | 4 | Kerstin Paech | If you are already familiar with another jobmanager the following information may be helpful to you http://slurm.schedmd.com/rosetta.pdf. |
24 | 1 | Kerstin Paech | |
25 | 1 | Kerstin Paech | h3. Scheduling of Jobs |
26 | 1 | Kerstin Paech | |
27 | 1 | Kerstin Paech | <some more information will appear here as we figure out how to organize the scheduling> |
28 | 1 | Kerstin Paech | |
29 | 1 | Kerstin Paech | h3. Running an interactive job with slurm |
30 | 1 | Kerstin Paech | |
31 | 1 | Kerstin Paech | To run an interactive job with slurm (for example for debug purposes) |
32 | 1 | Kerstin Paech | |
33 | 1 | Kerstin Paech | <pre> |
34 | 1 | Kerstin Paech | srun -u bash -i |
35 | 1 | Kerstin Paech | </pre> |
36 | 1 | Kerstin Paech | |
37 | 1 | Kerstin Paech | As soon as a slot is open, slurm will log you in to an interactive session on one of the nodes. |
38 | 1 | Kerstin Paech | |
39 | 5 | Kerstin Paech | h3. Running a simple once core batch job with slurm |
40 | 1 | Kerstin Paech | |
41 | 1 | Kerstin Paech | * To see what queues are available to you (called partitions in slurm), run: |
42 | 1 | Kerstin Paech | <pre> |
43 | 1 | Kerstin Paech | sinfo |
44 | 1 | Kerstin Paech | </pre> |
45 | 1 | Kerstin Paech | |
46 | 1 | Kerstin Paech | * To run slurm, create a myjob.slurm containing the following information: |
47 | 1 | Kerstin Paech | <pre> |
48 | 1 | Kerstin Paech | #!/bin/bash |
49 | 1 | Kerstin Paech | #SBATCH --output=slurm.out |
50 | 1 | Kerstin Paech | #SBATCH --error=slurm.err |
51 | 1 | Kerstin Paech | #SBATCH --mail-user <put your email address here> |
52 | 1 | Kerstin Paech | #SBATCH --mail-type=BEGIN |
53 | 1 | Kerstin Paech | |
54 | 1 | Kerstin Paech | /bin/hostname |
55 | 1 | Kerstin Paech | </pre> |
56 | 1 | Kerstin Paech | |
57 | 1 | Kerstin Paech | * To submit a batch job use: |
58 | 1 | Kerstin Paech | <pre> |
59 | 1 | Kerstin Paech | sbatch myjob.slurm |
60 | 1 | Kerstin Paech | </pre> |
61 | 1 | Kerstin Paech | |
62 | 1 | Kerstin Paech | * To see the status of you job, use |
63 | 1 | Kerstin Paech | <pre> |
64 | 1 | Kerstin Paech | squeue |
65 | 1 | Kerstin Paech | </pre> |
66 | 1 | Kerstin Paech | |
67 | 1 | Kerstin Paech | * For some more information on your job use |
68 | 1 | Kerstin Paech | <pre> |
69 | 1 | Kerstin Paech | scontrol show job <jobid> |
70 | 1 | Kerstin Paech | </pre> |
71 | 1 | Kerstin Paech | the <jobid> you can get from using squeue. |