Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

MA721: OpenMP programming assignment:

1 . Write a parallel program using Open MP to find the minimum and maximum element in a given
array of large size N.
b. Your code should allow easy changing of parameters like the number of threads, the input size N.
Use random function to generates random numbers.
c. Prepare a brief report of your experiments (for e.g. give tables that show the runtime of the two
programs(serial and parallel) for varying number of processors, input size N, etc).

2. The value of π is computed mathematically as follows:


1
∫ 4 / ( 1+ x 2 ) =ππ
0
Write a open-MP program to compute π. Compare execution time for serial code and parallel code.

3. Write a Open-MP program to compute area under a curve using trapezoidal method.

4. Write Open-MP parallel program to tokenize a given text file. Test using normal function and
thread safety function.

5. Write a openMP parallel program to multiply a matrix with a vector. Tabulate the running time
and efficiency for varying problem size with different number of threads.

*******

You might also like