Problems:
- monte carlo (computing PI)
- integral (computing integral using trapezoid method)
- matrics multiplication
Sequential and parallel (using MPI) programs.
$ cd c-libs
$ make libs
$ cd integral
$ make
$ cd monte_carlo
$ make
$ cd matrix_multiplication
$ make
Program will not check if input data is correct!
f(x) = e^(-x^2)
-- you can provide another f(x) in lib.c
# a, b - [a, b]
# n - granularity (number of points between a and b)
$ ./seq_app -a -2.5 -b 2.5 -n 100
# np - number of threads
# a, b - [a, b]
# n - granularity (number of points between a and b)
$ ./seq_app -a -2.5 -b 2.5 -n 100
$ mpirun -np 8 par_app -a -2.5 -b 2.5 -n 64
# --pairs - number of points in [0, a] x [0,b]
# --time - print the time of computing
$ ./seq_app --pairs 1024 --time 1
# -np - number of threads
# --pairs - number of points in [0, a] x [0,b]
# --time - print the time of computing
$ mpirun -np 8 par_app --pairs 1024 --time 1
# -a - dimension of A[a, a]
# -x - dimension of x[a, x]
# --size - size = a = x (will overwrite a and x)
# --maxvalue - max value of each number in matrics (values are random)
$ ./seq_app --size 512
# np - number of threads
# -a - dimension of A[a, a]
# -x - dimension of x[a, x]
# --size - size = a = x (will overwrite a and x)
# --maxvalue - max value of each number in matrics (values are random)
$ mpirun -np 8 par_app --size 512