ENCCS / openmp-gpu

Lesson material for OpenMP-GPU workshop
https://enccs.github.io/openmp-gpu/
Creative Commons Attribution 4.0 International
11 stars 8 forks source link

resources and inspiration #15

Open wikfeldt opened 3 years ago

wikfeldt commented 3 years ago
jussienko commented 3 years ago

Just to note that the CSC OpenACC repo https://github.com/csc-training/openacc has both exercises (under "exercises" :-) ) and slide material in .md format in under "docs".

Some more resources:

qianglise commented 3 years ago

more code examples from official OpenMP https://github.com/OpenMP/Examples

wikfeldt commented 3 years ago

code examples from Intel: https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2B/Jupyter/OpenMP-offload-training

mabraham commented 3 years ago

miniWeather and heat-equation assume we want to teach MPI+X, but since we aren't requiring knowledge of MPI from the students we should find something simpler. We simply don't have the time to talk about what MPI calls are doing, and without that even students familiar with MPI will struggle to find meaning in the examples or exercises. Plus now the students need a working MPI environment on top of everything else.

heat-equation also assumes the student has libpng installed for making nice graphs of the output, but that's rather tangential

A similar heat equation example here https://github.com/UoB-HPC/openmp-tutorial/blob/master/heat.c looks usefully simple to explain to and motivate the students, but does not have a fortran version at the moment. How do you feel about making one of those, @qianglise ?

jussienko commented 3 years ago

Amount of MPI in heat-equation is minimal and can be easily removed from the basic exercises. In the end part of the course we will in any case discuss using multiple GPUs, so some MPI will be presented.

So far, requiring libpng has not been problem in any of the courses we have used the code, and providing also nice visual view of the results has been useful. Requirement can of course be made optional (e.g. via conditional compilation), but I do not think that is necessary.

mabraham commented 3 years ago

Thanks for the thoughts!

Sure, a later exercise with MPI is fine. Students can cope with not getting much from that if they don't know much about MPI.

I am concerned that our main teaching example needs introduction in epside 2, and it's a lot to have to explain

Then giving them time to build and run and perhaps finishing up with teasers about where we might use OpenMP later.

If the students are running on e.g. Puhti, then even if the headers for libpng are available, they going to have to scp them back to their own machine to view them, and that might be more distraction than it is worth.

I will have a go at removing the MPI from heat-equation and see how it looks.

mabraham commented 3 years ago

I will have a go at removing the MPI from heat-equation and see how it looks.

OK done at https://github.com/cschpc/heat-equation/pull/5. It seems easier for students to grapple with now!

mabraham commented 3 years ago

Lesson with serial miniapp is now available at https://enccs.github.io/openmp-gpu/miniapp/