- Created by Emma Barnes, last modified on 06, Oct, 2021
The following is a quick start guide on access Viking and running a basic job. Please refer to the documentation for more in depth examples.
Viking Account Creation
- Before logging into Viking please ensure your project supervisor fills in this form to request a project code.
- The user then needs to fill in this form to request an account once they have a project code.
- Accounts should take no longer than 24 hours to be created. You will receive an email on creation of your account.
See VK1) How to access Viking for more information
Login into Viking
Viking has a Linux Operating system therefore how you access Viking will depend on what your operating system is on your local machine.
Before You Login
If you have not changed your IT Services password since August 2013 then you must do so before you will be able to login. All user password changes are manage via the My IT Account web page. Click on the Password Management (IDM) link in the Manage Your Password field to change your password. You may be given the option to 'synchronise' your password; please use this option if you do not want to change your password. The password change (or synchronisation) may take a few minutes before it is visible to the servers.
Accessing Viking off campus
To access the Viking off campus you can either use the Virtual Private Network - VPN or the SSH gateway service (registration required). The instructions below should work if you log on through the VPN; the SSH service works slightly differently.
Access from a Windows desktop
Command-line access using PuTTY
PuTTY is available on all IT Services Managed Windows systems. It is pre-installed on Classroom PCs; on Office PCs you can install it from Run Advertised Programs / Software Center. It appears under "Internet Tools" on the start menu.
On unmanaged PCs you can download the installer from the PuTTY Website.
Configuring PuTTY to connect to Viking
Open PuTTY and configure it to connect to Viking:
- Add the name "viking.york.ac.uk" to the 'Host Name' field
- Check the 'Connection Type' to SSH
- Type the name "Viking" in 'Saved Sessions'
- Click 'Save'
- Expand the 'SSH' tab from the 'Category' list
- Choose 'X11' from 'SSH' list
- Check 'Enable X11 Forwarding'
Connecting to Viking
- Start PuTTY
- Select 'Viking' from the 'Saved Sessions'
- Click 'Open'
A terminal window should appear. Log in with your university username and password. The first time you connect you will get a security alert showing the fingerprint of the server, labeled as 'ssh-rsa' or 'ssh-ed25519'.
If you are successful this is what you will see:
Whilst it is possible to configure X11 forwarding through PuTTY, X11 forwarding will only work on the Viking login nodes, which means that you won't be able to run graphical applications e.g. MATLAB on the Viking compute nodes using X11 forwarding. Details about virtual desktop sessions on Viking are provided in the Virtual Desktop section of this document.
Access from a Mac
Go to the Finder on your Mac, find Applications, open the Utilities folder in Applications and then start the Terminal app from the Utilities folder. (You may wish to add Terminal to your Dock.) Then type the following, using your university username (abc123). You do not need to type the $; this is an example of a prompt, which tells us the terminal is ready for us to type something. You should see something similar when you open Terminal, though it may be a bit longer (it may show your username for example). Just type anything from after the $.
[bash-4.1]$ ssh -X abc123@viking.york.ac.uk
Access from a UNIX server or desktop
To log in from a terminal emulator, use the following command:
[bash-4.1]$ ssh abc123@viking.york.ac.uk
where abc123
is your IT Services username. You will be prompted for your IT Services password. Please note, X11 forwarding will only work on the Viking login nodes, which means that you won't be able to run graphical applications e.g. MATLAB on the Viking compute nodes using X11 forwarding. Details about virtual desktop sessions on Viking are provided in the Virtual Desktop section of this document.
If you require X forwarding, type:
[bash-4.1]$ ssh -X abc123@viking.york.ac.uk
See How to log in to Viking for more information
Storing your data and programs
When you first login to Viking this is what you should see
Viking uses a Linux operating system there you will need to navigate using the Linux command line.
If you are new to Linux command line I recommend running through the examples in An Introduction to Research Computing at York wiki course to get you started.
Storing data
There are two areas you have access to. Your home folder where you land on first logging in and your scratch folder.
Here is a breakdown on the different areas and what they provide.
Home | scratch |
---|---|
50GB space limit | 3TB initial quota more on request |
Backed up | Not backed up |
Slower performance | Lustre High performance filesystem. |
We recommend running all jobs from your scratch folder. Any data you need to keep long term should be moved to a backed up storage area. Further details on storage options can be found here.
Loading software
We have an entire suite of software available on Viking. We use Easybuild to install the software and a module system to help you navigate what is available.
To view all available software run
[abc123@login1(viking) ~]$ module avail
If you want to see the versions of a particular software run:
[abc123@login1(viking) ~]$ module avail Kraken2
The module spider string command allows you to search for modules matching the string.
[abc123@login1(viking) ~]$ module spider Kraken2
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.
[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
[abc123@login1(viking) ~]$ module list
Run module purge to unload all loaded modules.
[abc123@login1(viking) ~]$ module purge
To unload a specific module use
[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 VK2) Modules and the user environment for more information.
Running a basic Job
Viking uses a queuing system called Slurm to ensure that your jobs are fairly scheduled to run on Viking.
To submit a job to the queue you will need to create a submit script.
#!/bin/bash #SBATCH --job-name=simple # Job name #SBATCH --mail-type=BEGIN,END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL) #SBATCH --mail-user=abc123@york.ac.uk # Where to send mail #SBATCH --ntasks=1 # Run on a single CPU #SBATCH --mem=1gb # Job memory request #SBATCH --time=00:01:00 # Time limit hrs:min:sec #SBATCH --output=basic_job_%j.log # Standard output and error log #SBATCH --partition=nodes # Job queue #SBATCH --account=PROJECTCODE # Project account module purge # purge any loaded modules module load lang/Python/3.7.0-foss-2018b # Load a module within a job script echo My working directory is `pwd` echo Running job on host: echo -e '\t'`hostname` at `date` echo echo echo Job completed at `date`
To Submit a job run
[abc123@login1(viking) ~]$ sbatch simple.job
To see your job in the queue run the squeue commnd. The job running below has a jobid of 147875
[abc123@login1(viking) scratch]$ squeue -u abc123 JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 147875 nodes simple.j abc123 R 0:04 1 node170
To delete a job from the queue use the scancel [options] <jobid> command, where jobid is a number referring to the specified job (available from squeue).
[abc123@login1(viking) scratch]$ scancel 147876
A user can delete all their jobs from the batch queues with the -u option:
$ scancel -u=<userid>
To look at your job history run sacct -j jobid
[abc123@login1(viking) scratch]$ sacct -j 147876 JobID JobName Partition Account AllocCPUS State ExitCode ------------ ---------- ---------- ---------- ---------- ---------- -------- 147876 simple.job nodes dept-proj+ 1 CANCELLED+ 0:0 147876.batch batch dept-proj+ 1 CANCELLED 0:15
See VK3) Submitting Jobs to Viking and VK4) Job script configuration for more information.
Copying your data to and from Viking
You may have data stored elsewhere that you wish to copy to Viking. There are different ways to do this
There are different ways to copy your data dependent on which operating system you use on your local machine.
Copying Files To/From a Windows Desktop
WinSCP is an open source free SFTP client, SCP client, FTPS client and FTP client for Windows. Its main function is file transfer between a local and a remote computer. WinSCP is available on IT Services supported desktops or can be downloaded from http://winscp.net/eng/index.php.
Run WinSCP from the Start menu or double clicking on the icon on the desktop;
A login window will appear. Fill in the hostname and your username:
Running WinSCP
You can click the "Save" button to save the session details for future use:
Return to the login window and click the "Login" button. Some hosts may present you with an information window:
You will then be prompted for your password:
The file manager window will be displayed:
The drag-and-drop interface is a similar to Windows file manager and its use should be intuitive.
Copying Files To/From a Linux/MacOS desktop
There are a number of ways to copying files and directories using Linux command line.
you can copy your data from any Linux device to Viking using the following commands
- scp
- rsync
Here are a couple of examples.
scp
This is recommended for a small number of files.
You wish to copy your data from local machine to your scratch area on Viking. Run the following commands on your local machine in the terminal.
[bash-4.1]$ #For an individual file [bash-4.1]$ scp afile abc123@viking.york.ac.uk:~/scratch [bash-4.1]$ #For a folder with lots of files [bash-4.1]$ scp -r adir abc123@viking.york.ac.uk:~/scratch
What if you want to copy files from your scratch area on Viking to your local machine? Run the following commands on your local machine.
[bash-4.1]$ #For an individual file [bash-4.1]$ scp abc123@viking.york.ac.uk:~/scratch/afile . [bash-4.1]$ #For a folder with lots of files [bash-4.1]$ scp -r abc123@viking.york.ac.uk:~/scratch/adir .
There are many options you can use with scp. To view these options either run
man scp
on the device you are using scp on or have a look at this scp wiki page.
RSYNC
Rsync is another command that will let you copy files and folders to the Viking. If you have a large number of files it is always best to use Rsync.
To copy a folder adir from your local machine to your scratch area on Viking, run the following command on your local machine.
[bash-4.1]$ rsync -avz adir abc123@viking.york.ac.uk:~/scratch
There are many options you can use with rsync. To view these options either run
man rsync
on the device you are using rsync on or consult the rsync webpage.
See VK7) Copying and moving your data to Viking. for more information.
Help and support
In the first instance check our wiki pages or email itsupport@york.ac.uk where one of our team will be in touch.
- No labels