HPC Grid Tutorial: How to Run a Multicore Job

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

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.sh .

Image

View the contents of your home directory by typing: ls

Image

3. Edit the script using vim by typing: vim multicore.sh

Image

Press i to insert and use the up and down arrow keys to scroll through it. Be sure to change the email address to your own. When finished editing type :wq and Enter to save and quit.

Image

Image

3. Run the multicore job script by typing: sbatch multicore.sh

Image

In Submitted batch job 2626008, 2626008 is the job ID.

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

Image

5. You can log in 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 this example, ssh can be done to node wsu196 by typing: ssh wsu196

Image

You'll be prompted to enter your password. Once you're on the compute node, you can check to see how many resources your job is using by typing: top -u $USER (where $USER is your AccessID)

Image

Hit q to quit top and type exit to leave the compute node.

7. When your job is finished, you will have an error and output file in your home directory. The files are formatted as output_<jobid>.out and error_<jobid>.err. Check by typing: ls

You can check the contents by using the command cat. For this example, it would be cat output_2626008.out

Image

The outputs of the script are the working directory, the hostname, the date, and the number of cores the job is running on.