HPC Grid Tutorial: How to Run a Multicore Job

Follow these steps to run a multicore job on the Grid.

Watch the video tutorial here!

1. Log on to the Grid.

2. From your home directory, copy the multicore job script to your home directory by typing: cp /wsu/el7/scripts/tutorial/multicore_job .

3. Run the multicore job script by typing: qsub multicore_job

4. Check to see that your job is running by typing: qme

Notice the Job ID, $PBS_JOBID in red boxes, and the Node, $HOSTNAME in blue box, your job is running on.

5. You can login to the node that your job is running on by typing: ssh $HOSTNAME (where $HOSTNAME is the name of the node your job is running on). In the example taken in the screenshot, ssh can be done to node wsu44 by typing ssh wsu44

6. You can check to see how many resources your job is using by typing: top -u $USER (where $USER is your AccessID. Hit q to quit top). In the example taken in the screenshot, top can run for user 'zz9991' by typing: top -u zz9991

7. When your job is finished, you should have an error and an output file in your home directory, check by typing: ls 

In the example the files which were generated are named as multicore_job.e343449 and multicore_job.o343449

8. The contents of the multicore_job file can be viewed by typing:

vi multicore_job

This is the contents of the multicore_job file:

#!/bin/bash

## Script is submitted to this Queue:

#PBS -q wsuq

## Eight cores and 1GB of RAM selected:

#PBS -l select=1:ncpus=8:mem=1GB:mpiprocs=8

## Commands to be executed:

## Provides date: echo Date job ran:

date

## Provides hostname: echo Host:

echo $HOSTNAME

## Provides location of processes:

echo Location of processes: cat $PBS_NODEFILE

## Sleep for 5 minutes:

sleep 300