Skip to content

alpaka-group/alpaka-workshop-slides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Links

The outline of the alpaka and openPMD hands-ons

Section I: Introduction to Alpaka

1. Introduction: What is alpaka, where it is used?

  • Support for heterogeneous architectures (e.g., CPUs, GPUs, FPGAs).
  • Write once, run anywhere—alpaka abstracts hardware specifics for parallel computing.

2. Hands-on 1: Installing alpaka and running an example (LUMI)

  • Install alpaka with correct cmake backend options
  • Compile and run an alpaka example from the repository.
  • Verify it runs on the available hardware (CPU, GPU, etc.).

3. Parallel programming concepts and portable parallelization by alpaka

  • Grid Structure and WorkDivision
  • Data Parallelism
  • Indexing

4. Hands-on 2: HelloIndex kernel which prints indexes

Section II: Alpaka Features in Action - 2D Heat Equation

1. Memory management for 1D and 2D data

  • Memory Allocation, Padding and Pitch

2. Filling buffers in parallel

  • Use indexing to match thread to data

3. Hands-on 3: Kernel to fill initial conditions of heat equation

4. Heat Equation

  • Double accelerator-buffers method to solve Heat Equation

5. Preparing stencil kernel

  • Difference Equation as a stencil operation

6. Hands-on 4: Heat Equation stencil kernel

7. alpaka programming features and data-structures

  • Accelerator, Device, Queue, Task
  • Buffers and Views: Managing memory across devices
  • alpaka mdspan
  • Setting work division manually

8. Usability and optimization

  • Hands-on 5: Using alpaka mdspan for easier indexing
  • Hands-on 6: Domain Decomposition, chunking or tiling
  • Hands-on 7: Using multiple Queues to increase performance. Explore overlap between computation and data transfer
  • Hands-on 8: Using Shared Memory for chunksExplore overlap between computation and data transfer

Timing Runs

  • Measure the performance of your kernels and analyze the timing with and without shared memory

Section III: OpenPMD

This session will introduce the participants to the scientific metadata format openPMD. The practical sessions and exercises will include the basic modeling of scientific data via the openPMD-api, possibilities for visualizing openPMD data, streaming I/O workflows, data compression, parallel I/O and more.

9. Hands-On 9: OpenPMD Basic Object Model

10. Hands-On 10: Metadata

11. Hands-On 11: OpenPMD Visualisation and Json-Toml

12. Hands-On 12: Streaming IO

13. Hands-On 13: OpenPMD Streaming IO Solution

14. Hands-On 14: OpenPMD Viewer Compression

15. Hands-On 15: Span API

16. Hands-On 16: Span API Solution

17. Hands-On 17: Constant Components Python Example

18. Hands-On 18: Parallel Python Example

19. Hands-On 19: Parallel Python Example Solution