1. Write a short C/C++ program that prints out the number of cores available.
2. Write a short C/C++ program that executes as many threads as there are cores and prints the thread number of each.
3. Write a short C/C++ program that executes 4 threads and prints the thread number of each.
4. Write a short C/C++ program that executes as many threads as there are cores and sums up the thread numbers plus 1 in a variable and prints that out.
5. Study the program "4-parallel for.txt". What is parallelized here? What would collapse do?
6. Study "5-critical,nowait,barrier.txt" and try out the different options. How are they different?
7. Write a program which initializes an array of size N (defined as variable in the program) to the numbers from 0 to N-1 and then calculate the sum of those numbers. Make the calculation parallel. Make sure there are no problems here with the parallel calculation.
8. Write a program where a number of threads increment a variable and then only the first thread prints out the result.
9. "8-locks.txt" demonstrated locks and compares them to critical.
10. Write an OpenPM program which guarantees that a statement is printed exactly four times.