The PDF containing the IN3200 exam questions: /studier/emner/matnat/ifi/IN3200/v20/teaching-material/in3200_home_exam3_v20.pdf
The PDF containing the IN4200 exam questions (slightly different from IN3200): /studier/emner/matnat/ifi/IN3200/v20/teaching-material/in4200_home_exam3_v20.pdf
Question: In problems 2 and 3, are we supposed to program the answers or just explain them?
Answer: For problem 2 and task 3a, you need to explain which OpenMP directive(s) you will use, where to place them and some words on why.
Question: For tasks 4b and 4c, where we sketch algorithms for simulating the disease, can we assume that linked lists (like in Java or in Python) are implemented?
Answer: You decide for yourself, in task 4a, the data structures needed for task 4b (and task 4c), while also considering the efficiency aspect. Of course, you're allowed to choose linked lists (and assume that you can use some "ready-made" implementations of linked lists).
Question: In 3b), is the question asking about the theoretical computation time of the parallelized function sweep, or the serial function? Addition: Assume we are talking about the parallelized function, and we run 48 threads in total. According to the page you linked, there is 33MB L3 cache. By the description on the page, that is shared cache. Dividing this by 48 threads leaves us with very little L3 cache to use per core, and that will definitely impact the number of loads. This makes estimation extremely hard. How should we deal with that?
Answer: Task 3b follows 3a, so you're asked to estimate the theoretical minimum computing of the parallelised function. Yes, shared L3 cache makes the estimate a bit harder, but it is still possible. You're free to add any reasonable assumptions if needed.
Question: Follow-up question about task 3b. Do we need to calculate the computing time, since the exercise is only asking for "how would you estimate the theoretical minimum computing time needed by the function sweep" . Is then sufficient with only explaining how you would compute the time? Or do we actually have to compute a number?
Answer: Yes, given the specific hardware info of the multicore CPU, it is possible to calculate the theoretical minimum computing time. Of course, explaining the idea is more important than the actual numbers.
Question: In problem 4, does the parameter \(f\) refer to the chance of infection per interaction, or is the chance of a person becoming infected always f as long as they interact with at least one infected person?
Answer: \(f\) refers to the chance of being infected per day due to interaction with an ill person. So, for example, if a healthy (non-immune) person interacts with two ill persons, the chance of being infected is \(1-(1-f)^2\) over a day.
Question: In problem 4, can we assume one person can only interact with a specific number of people per day, or do we need to account for any number?
Answer: If you need to limit the max number of interactions per person, please make a clear remark in your answer.