Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before you can access Viking you will to create a Viking account. The process can take a couple of days please complete the following steps

...

titleClick here to see the steps
  1. Before logging into Viking please ensure your project supervisor fills in this form to request a project code.
  2. The user then needs to fill in this form to request an account once they have a project code. 
  3. Accounts should take no longer than 24 hours to be created. You will receive an email on creation of your account.

See /wiki/spaces/RCS/pages/39158623 for more information


Table of Contents
maxLevel2

...

Expand
titleHere we will outline the main commands to load software on Viking

To view all available software run

Section


Column
width50%


Code Block
languagebash
[abc123@login1(viking) ~]$ module avail



Column
width50%


If you want to see the versions of a particular software run:

Section


Column
width50%


Code Block
languagebash
[abc123@login1(viking) ~]$ module avail Kraken2



Column
width50%


The module spider string command allows you to search for modules matching the string.

Section


Column
width50%


Code Block
languagebash
[abc123@login1(viking) ~]$ module spider Kraken2



Column
width50%



To load a module type module load <module name>. You can append a version number to load a specific instance of a package. Note the <tab> key can be used to complete the command.

Code Block
languagebash
[abc123@login1(viking) ~]$ module load lang/Bison <tab> <tab>
lang/Bison Bison/3.0.4-GCCcore-8.1.0
lang/Bison/3.0.4
[abc123@login1(viking) ~]$ module load lang/Bison/3.0.4-GCCcore-8.1.0

To list currently loaded modules type module list

Code Block
languagebash
[abc123@login1(viking) ~]$ module list

Run module purge to unload all loaded modules.

Code Block
languagebash
[abc123@login1(viking) ~]$ module purge

To unload a specific module use

Code Block
languagebash
[abc123@login1(viking) ~]$ module unload

If you need to have a program installed on Viking please email itsupport@york.ac.uk with the details.

See /wiki/spaces/RCS/pages/39159178 for more information.

Running your workloads on Viking

Running your workloads on Viking
Section
bordertrue

Viking uses a queuing system called Slurm to ensure that your jobs are fairly scheduled to run on Viking.

What is Slurm and what is a scheduler?

Slurm is a  job scheduling system for small and large clusters. As a cluster workload manager, Slurm has three key functions.

  1. Lets a user request a resources on a compute node to run their workloads
  2. Provides a framework (commands) to start, cancel, and monitor a job
  3. Keeps track of all jobs to ensure everyone can efficiently use all computing resources without stepping on each others toes.

When a user submits a job Slurm will decide when to allow the job to run on a compute node.  This is very important for shared machines such as the Viking cluster so that the resources are shared as fairly between users so one persons jobs does not dominate.

Resource allocation

In order to interact with the job/batch system (SLURM), the user must first give some indication of the resources they require. At a minimum these include:   

  • how long does the job need to run for  
  • on how many processors to run the job

The default resource allocation for jobs can be found /wiki/spaces/RCS/pages/39159441.

Armed with this information, the scheduler is able to dispatch the jobs at some point in the future when the resources become available. A fair-share policy is in operation to guide the scheduler towards allocating resources fairly between users. 

Slurm commands

Before submitting a job to Viking it is useful to be introduced to useful Slurm commands. 

Slurm Command Summary

The following are common commands that can be used on Viking.  We will be using some of these commands in the examples going forward.

CommandDescription
squeuereports the state of jobs (it has a variety of filtering, sorting, and formatting options), by default, reports the running jobs in priority order followed by the pending jobs in priority order
srun

used to submit a job for execution in real time

sallocallocate resources for a job in real time (typically used to allocate resources and spawn a shell, in which the srun command is used to launch parallel tasks)
sbatchsubmit a job script for later execution (the script typically contains one or more srun commands to launch parallel tasks)
sattachattach standard input, output, and error to a currently running job , or job step
scancelcancel a pending or running job
sinforeports the state of partitions and nodes managed by Slurm (it has a variety of filtering, sorting, and formatting options)
sacctreport job accounting information about active or completed jobs

Running Slurm commands on Viking

Expand
titleExercise 3

Login to Viking.  Run the following command.  What do you see?

Code Block
languagebash
[abc123@login1(viking) ~]$ squeue


Expand
titlesqueue

You should see a list of jobs.  Each column describes the status of each job

ColumnDescription
JOBIDA number used to uniquely identify your job within SLURM
PARTITIONThe partition the job has been submitted to
NAMEThe job's name
USERThe username of the job owner
STCurrent job status: R (running), PD (pending - queued and waiting)
TIMEThe time the job has been running
NODESThe number of nodes used by the job
NODELIST (REASON)
The nodes used by the job or reason the job is not running

When you start to run your jobs

Code Block
languagebash
[abc123@login1(viking) ~]$ squeue -u abc123

or

Code Block
languagebash
[abc123@login1(viking) ~]$ squeue -j JOBID

Will provide information on the jobs you have queued or are running. 


...