In order to successfully complete this assignment you must do the required reading, watch the provided videos and complete all instructions. The embedded survey form must be entirely filled out and submitted on or before 11:59pm on Sunday February 7. Students must come to class the next day prepared to discuss the material covered in this assignment.
I really like this Intel OpenMP set of videos made publicly available by Intel. Feel free to watch them all. However, I have selected a few specific ones to watch for the next class.
✅ DO THIS: Watch the following video about OpenMP
from IPython.display import YouTubeVideo
YouTubeVideo("6jFkNjhJ-Z4",width=640,height=360)
✅ QUESTION: What is the difference between concurrency and parallelism?
Put your answer to the above question here.
✅ DO THIS: On the HPC create a C++ file with the following contents.
#include "omp.h"
int main()
{
#pragma omp parallel
{
int ID = omp_get_thred_num();
print("hello(%d)",ID);
print(" world(%d) \n",ID);
}
}
✅ DO THIS: Compile the program with gcc
with the -fopenmp
flag and run the program (Debug as needed).
When you get it working and outputig without errors watch the following video.
✅ DO THIS: Watch the the next video on OpenMP
from IPython.display import YouTubeVideo
YouTubeVideo("x0HkbIuJILk",width=640,height=360)
✅ QUESTION: What is a race condition as described in this video?
Put your answer to the above question here.
✅ QUESTION: According to this video, how do you prevent a race condition?
Put your answer to the above question here.
Please fill out the form that appears when you run the code below. You must completely fill this out in order to receive credits for the assignment!
If you have trouble with the embedded form, please make sure you log on with your MSU google account at googleapps.msu.edu and then click on the direct link above.
✅ Assignment-Specific QUESTION: According to these videos, how do you prevent a race condition?
Put your answer to the above question here
✅ QUESTION: Summarize what you did in this assignment.
Put your answer to the above question here
✅ QUESTION: What questions do you have, if any, about any of the topics discussed in this assignment after working through the jupyter notebook?
Put your answer to the above question here
✅ QUESTION: How well do you feel this assignment helped you to achieve a better understanding of the above mentioned topic(s)?
Put your answer to the above question here
✅ QUESTION: What was the most challenging part of this assignment for you?
Put your answer to the above question here
✅ QUESTION: What was the least challenging part of this assignment for you?
Put your answer to the above question here
✅ QUESTION: What kind of additional questions or support, if any, do you feel you need to have a better understanding of the content in this assignment?
Put your answer to the above question here
✅ QUESTION: Do you have any further questions or comments about this material, or anything else that's going on in class?
Put your answer to the above question here
✅ QUESTION: Approximately how long did this pre-class assignment take?
Put your answer to the above question here
from IPython.display import HTML
HTML(
"""
<iframe
src="https://cmse.msu.edu/cmse401-pc-survey"
width="100%"
height="500px"
frameborder="0"
marginheight="0"
marginwidth="0">
Loading...
</iframe>
"""
)
To get credit for this assignment you must fill out and submit the above survey from on or before the assignment due date.
Written by Dr. Dirk Colbry, Michigan State University
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.