Introduction to Parallel Computing (CMSC416/CMSC818X)

Assignment 0: Using the Linux Shell on HPC Clusters

Due: Monday September 27, 2020 @ 11:59 PM Eastern Time

The purpose of this programming assignment is to gain experience in using a Linux shell and shell commands for tasks such as compiling a program, editing it, submitting a batch job, and submitting your assignments as tarballs. You will find this MIT course useful.

Steps to Follow

  • Download cpi.c, an MPI program that calculates the value of Pi in parallel to deepthought2. You can do this using wget.
  • Compile cpi.c using mpicc. Also, get familiar with using make. A sample Makefile is here.
  • Run the code by submitting a batch job using sbatch and a batch script on 1 and 16 processes.
  • Run the code as an interactive job using sinteractive on 1 and 16 processes.
  • Compress your directory with the code, Makefile and outputs on 1 and 16 processes into a tarball using: tar -cvzf <tarname>.tar.gz <dirname>
What to Submit

You must submit the following files and no other files in a single tarball with extension .tar.gz (delete the executable before using tar):

  • cpi.c
  • Makefile that will compile your code successfully on deepthought2 when using mpicc or mpicxx.
  • Output files from running the batch job on 1 and 16 processes.
You should put the code, Makefile and output files in a single directory (named LastName-FirstName-assign0), compress it to .tar.gz (LastName-FirstName-assign0.tar.gz) and upload that to ELMS.



This assigment is for 0 points. However, all students are required to complete the assignment.