You are on page 1of 4

Logging in the HPC

2 Enter student\<Username> (e.g. student\ct54732z,


here I use staff instead of student as I am staff) and
1 Login To gm-hpc2-login01 using putty
Password if requested
Sidenote: In this course I will use <> to indicate something you need to replace e.g. <username> meaning you need to put your username in
Uploading Files to the HPC
ENTER THE HOST NAME (GM-HPC2-LOGIN01) YOUR
LOAD WINSCP, CLICK THE NEW SESSION BUTTON USERNAME (SAME AS PREVIOUSLY WITH STUDENT\
BEFORE) AND PASSWORD, CLICK SAVE AND THEN LOGIN
Uploading Files to the HPC
YOU ARE NOW LOGGED IN USING SFTP, CLICK
THE OPEN DIRECTORY BUTTON TO FIND YOUR YOU CAN ALSO USE FILEZILLA IF YOU PREFER…
FILES
Simply use sftp://gm-hpc02-login01 as the
hostname, it must be sftp as the server won’t
accept unsecure ftp connections.
Lab Task
1) Login to the HPC on putty and WinSCP, load the latest gcc compiler by using: “module load GCC/12.2.0”
2) Upload omp_hello.c and omp_hello.sh
3) Compile and Run omp_hello.c, compile using “gcc omp_hello.c -fopenmp -o omp_hello.out” then
“sbatch omp_hello.sh” this will run the software on the HPC correctly.
4) Using the appropriate run-time library, modify the OpenMP “hello world” program so that it reports the
execution time. (Hint: you can either use time.h or use the omp_get_wtime routine built into openMP)
5) Using your sum of squares code from week 3 and the #pragma omp parallel region construct and
#pragma omp for directive parallelise the for loop
6) Compile and run for different numbers of threads, you will need to modify your slurm script.
7) Try running the code repeatedly for the same number of squares do you always get the same answer?
Why do you think this is?
8) We’ll look at how to fix this next week.

You might also like