Project

General

Profile

Slurm » History » Version 8

Kerstin Paech, 09/18/2013 12:03 PM

1 1 Kerstin Paech
h1. How to run jobs on the euclides nodes
2 1 Kerstin Paech
3 7 Kerstin Paech
Use slurm to submit jobs to the euclides nodes (node1-8), ssh login access to those nodes will be restricted in the near future.
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 8 Kerstin Paech
#SBATCH -p normal
54 1 Kerstin Paech
55 1 Kerstin Paech
/bin/hostname
56 1 Kerstin Paech
</pre>
57 1 Kerstin Paech
58 1 Kerstin Paech
* To submit a batch job use:
59 1 Kerstin Paech
<pre>
60 1 Kerstin Paech
sbatch myjob.slurm
61 1 Kerstin Paech
</pre>
62 1 Kerstin Paech
63 1 Kerstin Paech
* To see the status of you job, use 
64 1 Kerstin Paech
<pre>
65 1 Kerstin Paech
squeue
66 1 Kerstin Paech
</pre>
67 1 Kerstin Paech
68 1 Kerstin Paech
* For some more information on your job use
69 1 Kerstin Paech
<pre>
70 1 Kerstin Paech
scontrol show job <jobid>
71 1 Kerstin Paech
</pre>
72 1 Kerstin Paech
the <jobid> you can get from using squeue.
73 6 Kerstin Paech
74 6 Kerstin Paech
h3. Batch script for running a multi-core job
75 6 Kerstin Paech
76 6 Kerstin Paech
To run a 4 core job you can use
77 6 Kerstin Paech
<pre>
78 6 Kerstin Paech
#!/bin/bash
79 6 Kerstin Paech
#SBATCH --output=slurm.out
80 6 Kerstin Paech
#SBATCH --error=slurm.err
81 6 Kerstin Paech
#SBATCH --mail-user <put your email address here>
82 6 Kerstin Paech
#SBATCH --mail-type=BEGIN
83 6 Kerstin Paech
#SBATCH -n 4
84 6 Kerstin Paech
85 6 Kerstin Paech
mpirun <executable>
86 6 Kerstin Paech
87 6 Kerstin Paech
</pre>
Redmine Appliance - Powered by TurnKey Linux