Hamilton Supercomputer

Using the Hamilton Supercomputer

For GPUs → bede allocated by N8 CIR
Domain decomposition: parallel programming involve splittting a problem into sub and allowing several CPUs cores to tackle diff parts at te same time
to speed up the process diveded btw multiple workers, the problem is the edges and the boundries red by the neighbours
called halo exchange

parallel progs:
hamilton has diff workers and the program emply more than at diff levels
hamilton
vector-based CPU instruction
always test diff jobs size and plot how thier runtime comapres
for any job there is optimal amount of resource

login command: ssh
resource for login process of diff OSs
two dirs:
home dir: /home/hmcw73 with 10GB
data dir: /nobackup/hmcw73 with 300GB
need to design data mangement plan including data transfer, backup and mangament

transfer data: using secure copy command scp
from remote to local:
scp :/home/hmcw73/h8/name of file file_path_dist
scp :/home/hmcw73/h8/name of file ./
Example: scp hmcw73@hamilton8.dur.ac.uk:/home/hmcw73/test/a.txt /home/capture/b

from local to remote:
scp file_path_dist :/home/hmcw73/h8/
Example: scp /home/capture/rosbag2video.py hmcw73@hamilton8.dur.ac.uk:/home/hmcw73/test/

In addition to the scp command described on the login page, files can be transferred between Hamilton and other Linux/Mac machines using the rsync command:
rsync -av <directory> <username>@hamilton8.dur.ac.uk:
useful command:
ls -a: lists all files and directories in the current working directory including hidden files (short version)
ls -l: lists all files and directories in the current working directory including hidden files (long version)
ls —help: gives desription of all avialable options
man ls: manual of the comand ls
pwd: gives the path of current dir
cd: change directory
[hmcw73@login1.ham8 ~]$ cd /nobackup/hmcw73 [hmcw73@login1.ham8 hmcw73]$ pwd /nobackup/hmcw73 [hmcw73@login1.ham8 hmcw73]$ cd /home/hmcw73 [hmcw73@login1.ham8 ~]$ pwd /home/hmcw73
mkdir: make dir
rmdir: remove dir
wget: bring content from internet
nano: editing text file
nano (script command) [hmcw73@login1.ham8 test]$ ls
nano aa.sh [hmcw73@login1.ham8 test]$ ls
date: curent date
date > a.txt [hmcw73@login1.ham8 test]$ cat a.txt Thu 2 May 11:49:55 BST 2024
replace command >:
ls > a.txt [hmcw73@login1.ham8 test]$ cat a.txt aa.sh a.txt dest rosbag2video.py
append command >>:
ls -l >> a.txt [hmcw73@login1.ham8 test]$ cat a.txt aa.sh a.txt dest rosbag2video.py total 28 -rw-r--r-- 1 hmcw73 URP_djb 32 May 2 11:48 aa.sh -rw-r--r-- 1 hmcw73 URP_djb 33 May 2 11:50 a.txt -rw-r--r-- 1 hmcw73 URP_djb 17 May 2 11:11 dest -rwxr-xr-x 1 hmcw73 URP_djb 13374 May 2 11:20
*** ls -tr command in Unix-like operating systems lists the contents of a directory, including files and directories, sorted by the time they were last modified, with the oldest modifications appearing first. The -t option sorts by modification time, and the -r option reverses the order of the sort, so it effectively lists from the oldest to the newest.
Exercise:
[hmcw73@login1.ham8 ~]$ mkdir test_dir [hmcw73@login1.ham8 ~]$ ls test test_dir [hmcw73@login1.ham8 ~]$ cd test_dir/ [hmcw73@login1.ham8 test_dir]$ nano test_file1.txt [hmcw73@login1.ham8 test_dir]$ cat test_file1.txt Hello World
important files:
Hamilton Cheat Sheet CWP_LC.pdf
155.7 kB
RC7 Using the Hamilton Supercomputer_24_01.pdf
8.8 MB
in file how to using python pkgs and R
Finding sw:
list aviable module: module avail or module avail | more
load module: module load (name of module/version) python/3.8.6
[hmcw73@login1.ham8 ~]$ matlab -bash: matlab: command not found [hmcw73@login1.ham8 ~]$ module load matlab/R2023a [hmcw73@login1.ham8 ~]$ matlab -nodisplay
< M A T L A B (R) > Copyright 1984-2023 The MathWorks, Inc. R2023a Update 5 (9.14.0.2337262) 64-bit (glnxa64) July 24, 2023
Screenshot from 2024-05-02 12-09-39.png

What if there isn't a module for my software? If you need a module added or updated, contact the Hamilton team at arc-rcp@durham.ac.uk or through the CIS service desk.

Compiling software Hamilton 8 has modules for a number of compilers:
Screenshot from 2024-05-02 12-13-24.png

Using library modules
Load the compiler module first, then load the library module. The correct flavour of the library will loaded automatically.
module load hdf5/1.10.8
hdf5/1.10.8 depends on one of the module(s) 'gcc llvm intel oneapi aocc’
module load gcc/13.2 hdf5/1.10.8
Linear algebra library modules
Exercise • Type ‘R --version’. • List all available modules and find the ‘r’ modules. • Load an ‘r’ module and then repeat ‘R --version’. • Locate any modules relevant to your research, then check that you can load them and run the commands you expect to find. • If you intend to compile software during your research, load the gcc module and compile some test code, such as the example C program at http://bit.ly/arc_helloworld.


Running Jobs:
Running computations

SLURM
Screenshot from 2024-05-02 12-24-43.png
to chack the batch file : more command
more name_of_batch_file.sh
sbach gives msg summbmitted with assoicated job no
after that ls gives slurm.out file
then can view it by more command
Monitoring jobs
Exercise • Use nano to create a job script ‘myjob1.sh’ that: Requests 1 CPU core, 2 GB memory and a time limit of 3 minutes. Loads the gcc module and the hdf5 module Executes the command gcc --version • Submit your script using sbatch. • Use squeue -u <your username> to check that it has run. • Check that you have a file slurm-<job_id>.out in your current directory and that it contains the output from ‘gcc --version’. • If you have time, edit myjob1.sh so that the time limit is 5 days, and resubmit it. What happens?
Cancel a job with scancel <job_id>
Interactive jobssrun -c 2 -p tes
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.