Section 0: Getting started with GitHub, the HPCC, and MPI

Part 1: Setup on HPCC

The following is a very quick tutorial on the basics of using HPCC for this class.

  1. Log in to the HPCC gateway:
    ssh <netid>@hpcc.msu.edu
  2. Then log in to the AMD-20 cluster from the gateway:
    module load powertools
    amd20
  3. The default environment and software stack should be sufficient for this exercise, but if you run into issues compiling and running the code try issuing the following commands.
    module purge
    module load intel/2021a
  4. When using the HPCC for development and exercises in this class please do NOT just use the head node, dev-amd20. We will swamp the node and no one will get anything done. Instead, request an interactive job. For example, you can request 4 cores for 90 minutes using the SLURM scheduler:
    salloc -n 4 --time 1:30:00

Part 2: MPI Basics

  1. Join the classroom with the this link. This is our first assignment using GitHub classroom's, so it will ask you to link your GitHub account with your class identifier.
  2. In the project directory you will find a simple "Hello World!" source file in C++. Compile and run the code. E.g.,
    g++ hello.cpp
    ./a.out
  3. Now run the executable a.out using the MPI parallel run command and explain the output:
    mpiexec -n 4 ./a.out
  4. Add the commands MPI_Init and MPI_Finalize to your code. Put three different print statements in your code: one before the init, one between init and finalize, and one after the finalize. Recompile and run the executable, both in serial and with mpiexec, and explain the output.

What to turn in (and how)

Moving forward, you will primarily submit your assignment by pushing the final version of your code to GitHub. Please make sure to check out the link in the repo's readme if you are new to Git or GitHub (we've included a link to a tutorial that will get you started in less than 10 minutes). We might ocassionally ask you to submit your final, working version of the code through GradeScope to verify the program's functionality, but we'll let you know ahead of time.

For this assignment you only need to push the following to your repo: