Home > Articles

  • Print
  • + Share This
This chapter is from the book

4.6 Exercises

  1. We noted that the track_progress routine introduces a penalty for the periodic array copies that it initiates. However, the output itself is only a small portion of the full array. Can you utilize the data directive’s array-shaping options to minimize this superfluous copy?
  2. The sample problem is small by most measures. But it lends itself easily to scaling. How large a square plate problem can you run on your accelerator? Do so, and compare the speedup relative to the serial code for that case.
  3. This code can also be scaled into a 3D version. What is the largest 3D cubic case you can accommodate on your accelerator?
  4. We have focused only on the main loop. Could you also use OpenACC directives on the initialize and output routines? What kinds of gains would you expect?
  5. If you know OpenMP, you may see an opportunity here to speed up the host (CPU) version of the code and improve the serial performance. Do so, and compare to the speedup achieved with OpenACC.
  • + Share This
  • 🔖 Save To Your Account