Link to this document's Jupyter Notebook

In order to successfully complete this assignment you need to participate both individually and in groups during class. If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class on Monday April 12. If you are attending asynchronously, turn in your assignment using D2L no later than _11:59pm on Monday April 12.


In-Class Assignment: Hybrid Codes

Picture of a Greek Hydra as an anaylogy to hybrid systems

Image From: https://en.wikipedia.org/wiki/Hydra

Agenda for today's class (70 minutes)

  1. Review Hybrid Codes
  2. How to run Hybrid MPI/OpenMP code on the HPCC
  3. Benchmark

1. Review Hybrid Codes

DO THIS: Examine the Pandemic code in the BCCD directory. Specifically look at the MAKEFILE and see how the hybrid code is implemented/compiled.

DO THIS: Examine the Life code in the BCCD directory. Specifically look at the MAKEFILE and see how the hybrid code is implemented/compiled.

QUESTION: This seems like a lot of work, Why would you every implement a hybrid code?

Put the answer to the above question here.


2. How to run Hybrid MPI/OpenMP code on the HPCC

DO THIS: Write a submission script to run either the hybrid Pandemic or the Life code on the HPCC.

QUESTION: What SLURM settings are needed to control a hybrid code?

Put the answer to the above question here.

QUESTION: How do we know that the submission script is working?

Put the answer to the above question here.


3. Benchmark

DO THIS: Change the inputs to the code such that it will run around 1 minute on a single core.

QUESTION: what did you change and how long did it take to run on a single core?

Put the answer to the above question here.

DO THIS: If we want to try all possible numbers of MPI and OpenMP threads to see what is fastest. If we only do up to 10 each this will be 100 different benchmarks. Instead lets compare 10 threads of MPI, 10 threads of openMP vs 1 thread.

QUESTION: How big should the hybrid code be to have an advantage over an MPI only code?

Put the answer to the above question here.

QUESTION: How big should the hybrid code be to have an advantage over an MPI only code?

Put the answer to the above question here.

QUESTION: How big should the hybrid code be to have an advantage over an OpenMP only code?


Congratulations, we're done!

If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class. If you are attending asynchronously, turn in your assignment using D2L.

Course Resources:

Written by Dr. Dirk Colbry, Michigan State University Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.