Q: What is HPC and what does it do?
A: Here is a powerpoint presentation on a brief introduction to HPC on campus.
Q: Who can request for HPC account and how do I get it?
A: Faculty and staff can directly apply for HPC account. Students who wish to use HPC for course work and research need faculty support to apply for accounts. Here is the link to the account request form. In addition, This video shows you how to apply for an account.
You need flash player installed on your computer and make sure that sound is not muted.
Q: What software do I need to connect to HPC?
A: For Linux, Unix or Mac users, you can use secure shell client (ssh) to connect to HPC from terminal. It is usually already installed on your system.
For Windows users, you may download and install PuTTY or cygwin. Here is a video that shows you how to download and install PuTTY.
Optionally, you may also want to install Xming, which is a free X window forwarding program for the Windows system. With Xming, you can remotely control an application window (e.g. emacs, matlab on HPC, because the application window is forwarded to your local Windows desktop. Here is the Xming download link.
Q: How do I connect to HPC from windows system?
A: Here is a tutorial on how to use PuTTY to connect to HPC, and this tutorial video shows you how to launch Xming with Putty to enable X window forwarding.
Q: How do I run my work on HPC?
A: You need to submit your work as a "job" to the SGE (Sun grid engine) system. SGE manages resources on HPC. Your job(s) will be dispatched once the resource requested is available.
To run a single processor job
For example, here is my code called hello.c:
bai@slotnick~/tmp> more hello.c
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int main()
{
char hname[50];
size_t len;
gethostname( hname, len );
printf("Hello, my job runs on %s.\n", hname);
}
Compile the program and generate an executable called hello:
bai@slotnick~/tmp> gcc -o hello hello.c
To submit and run hello, you'll need to
bai@slotnick~/tmp> more job.run
/home/bai/tmp/hello
bai@slotnick~/tmp> qsub -q fast.q -cwd -j y -o output job.run
Press the return key and you'll see something like this:
Your job 168774 ("job.run") has been submitted.
Some useful options for qsub command:
bai@slotnick~/tmp> more output
Hello, my job runs on sn47.
To run MPI (parallel) job
Assume you already have a MPI program and compiled it. You'll need two scripts to submit parallel jobs. You may copy our templates and adjust them to accomadate your needs.
bai@slotnick~/tmp> more mpi.run
#!/bin/sh
cwd=`pwd`
IFS=": "
cat $PE_HOSTFILE | sort | while read host count garbage
do
echo "$host:$count"
done > .machine
nprocs=0
while read host count
do
nprocs=$[$nprocs+$count]
done < .machine
echo "`hostname`: $nprocs"
mpirun -np $nprocs -machinefile .machine your_executable
bai@slotnick~/tmp> more mpi.submit
#!/bin/sh
echo -n "# of processes [2]: "
read n
if [ -z "$n" ]; then n=2; fi
echo -n "Queue (Big/Medium/Small) [s]:"
read q
if [ -z "$q" ]; then q="s"; fi
case "$q" in
[Bb]*) queue="big" ;;
[Mm]*) queue="medium" ;;
[Ss]*|*) queue="small" ;;
esac
echo "Submitting job to $queue queue for $n processors..."
qsub -j y -r y -o output_filename -cwd -pe $queue $n path_of_mpi.job
You can use command qstat to check the job queue. Use qstat -f to view a full format display of information. For example,
bai@slotnick~/tmp> qstat
job-ID prior name user state submit/start at queue slots
ja-task-ID
-----------------------------------------------------------------------------------------------------------------
168148 0.56000 runxwien gpzhang r 12/13/2008 17:13:44
small.q@sn29 17
168147 0.56000 runxwien gpzhang r 12/09/2008 19:02:52
small.q@sn40 17
168747 0.51000 Ne4A arthur r 03/03/2009 21:17:32 medium.q@sn10 4
168771 0.51000 Neon7c arthur r 03/05/2009 17:20:30 medium.q@sn17 4
168751 0.51000 Neon5B arthur r 03/04/2009 10:58:32
medium.q@sn9 4
168773 0.51000 neo7b arthur r 03/06/2009 09:31:10
medium.q@sn9 4
168775 0.00000 Neon7a arthur qw 03/06/2009 11:41:45 4
To delete a job
Use qdel to delete a job. You need to know your job id using qstat, then type qdel job_id.
Q: I am new to Linux and HPC. Can you provide some tutorial?
A: This is a very good link for Linux/Unix beginners. We highly recommend it for new Linux users. The online manual is also very helpful to learn Linux commands.
If you are not familiar with the concept of high performance computing and parallel computing, this is an excellent tutorial for beginners.
In addition, here are some links that may help you on advanced Linux features and parallel programming.
Q: Can I contact you if I have more questions and problems?
A: Yes, we provide programming and system support for HPC on campus. You may call us at 2678 for programming support or 8361 for system support, or email us for troubleshooting. You are also welcome to visit our office at Normal Hall 301. Customized tutorial session can be arranged by appointment.