HPC Grid Tutorial: How to Run an MPI Job

1. Log on to the Grid.

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

This is the job script:

##      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

##      Check access to MPI locations:

echo Check access with date command at MPI locations:

for i in `cat $PBS_NODEFILE | uniq`; do echo $i; ssh $i date; done

3. Run the MPI job script by typing: qsub mpi_job

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

Notice the Job ID, $PBS_JOBID, and the nodes your job is running on.

5. You can login to any of the nodes that your job is running on by typing: ssh $HOSTNAME where $HOSTNAME is the name of the node your job is running on.

6. When you are running an MPI Job you should ssh to the last node in the list and check to see if your job is running on it. You can check to see how many resources your job is using on the node by typing: top -u $USER where $USER is your AccessID. Hit q to quit top when you're done.

7. When your job is finished you should have an error and an output file in your home directory, simple_job.e$PBS_JOBID and simple_job.o$PBS_JOBID.