The following example programs introduce the main concepts of OpenMP step by step.
-
hello-world-parallel.c (the most basic hello world executed in parallel)
-
hello-world-parallel-id.c (similar to 1. but the id of each thread and the total number of threads are also printed)
-
hello-world-parallel-id-func.c (same result as 2. but a function is called to print inside the parallel region)
-
hello-world-parallel-id-scope.c (same result as 2. but data scope is used in the parallel region)
-
table-add1-manual.c (add a number to each element of a table, using manual parallelization)
-
table-add1.c (same result as 5. but with automatic work scheduling)
-
table-add1-combined.c (same result as 6. but with combined parallel region and for construct)
-
table-add1-wrong.c (similar to 6. and 7. but giving wrong answer - find the error in the code!)
-
table-implicit-notpar.c (parallel execution gives wrong answer - find out why!)
-
table-sum.c (computing the sum of all elements in a table)
-
table-sum-wrong.c (similar to 10. but gives wrong answer - find the error in the code!)
2020 Homework on 2D wave equation
2019 Homework on Poisson solvers
poisson-SOR.c Example: ./poisson-SOR -N 400 -M 400 -a 1e-6 -o 1.9
- Tutorial by N. Trifonidis (part 1)
- Tutorial by N. Trifonidis (part 2)
- A brief introduction by A. Kiessling
- Tutorial by S.C. Huang
- Tutorial by Texas A&M
- Tutorial by T. Mattson and L. Meadows
- Online tutorial by B. Barney
- Online tutorial by Y. Yliluoma
- Online list of potential mistakes
- Video tutorial by C. Terboven (part 1)
- Video tutorial by C. Terboven (part 2)
- Video channel by PPCES