wmi-parprog/07_OpenMP/desc

25 lines
605 B
Plaintext
Raw Normal View History

2024-05-06 13:28:29 +02:00
Excercise 1
This is our quick tutorial.
2024-05-06 14:06:04 +02:00
Compile the code and see whether you get the same results.
2024-05-06 13:59:49 +02:00
Hints:
* add -fopenmp to gcc compiler
* add -lgomp (in Linux) to linker
2024-05-13 15:44:17 +02:00
Or in the console one can run the command:
$ gcc -fopenmp openmp1.c -lgomp
And the file 'a.out' should be created. Execute this file.
2024-05-06 13:28:29 +02:00
Excercise 2
Implement in OpenMP the search of the maximum value in an array with randomly generated numbers. Check the speed up from 1 up to X threads.
Why there is no speed up at some point?
Excercise 3
Implement bubble sort in OpenMP. Can you make it faster than 1 threaded quicksort?