cluster computing

Zamknięty Opublikowano Oct 28, 2014 Płatność przy odbiorze
Zamknięty Płatność przy odbiorze

------>For each question, parallelize the program using OpenMP. When compiling and running you must NOT use gollum itself but one of the nodes node1 to node8. Present the results for each as a table of run time and scalability (wrt sequential and OpenMP on 1 thread). Comment on the results.

The preferred way to time the codes is to use omp_set_num_threads(number) to set the threads and omp_get_wtime() to time the relevant part e.g.

omp_set_num_threads(s);

start = omp_get_wtime();

#pragma omp parallel ...

PUT PARALLEL CODE HERE

end = omp_get_wtime();

printf("time=:%.16g number of threads: %d\n",end - start, s);

The three questions are as follows:

Use OpenMP to parallelize the algorithm described in the lectures for calculating pi by integration 4/1+x*x from 0 to 1. Use 10,000,000 slices.

Run the code sequentially and using OpenMP on a gollum node using 1, 2, 3, 4, 5, 6, 7, 8 and 12 threads and time the results.

Modify the code to run similar tests using dynamic and guided scheduling.

List the various run times and scalibility in seperate tables for each type of scheduling and comment on the scalability of each scheduling type and draw conclusions as to which is preferable (and in what circumstances).

Note: when timing the output remember not to print anything while timing.

Write code to use the Monte Carlo method to compute pi, and parallelize it using OpenMP. Use 1,000,000 tests. Run it sequentially and using OpenMP on 1, 2, 3, 4, and 8 threads and time the results, on a gollum node.

Recall the discussion about thread safe libraries and the need to ensure that the pseudo-random sequences used by different threads are in fact different. Comment on the results.

Implement and check the time to do a matrix-matrix product of a 1500x900 matrix with a 900x1200 matrix of doubles sequentially and using 1,2,3,4,5,6, 7 and 8 threads on a gollum node.

Note that to implement this program you will need to increase the default stack size for both the original thread and the OMP threads. If you do not you will get a segmentation error. To do this you need to execute shell commands similar to:

ulimit -s unlimited

export OMP_STACKSIZE=16M

The Intel complier is recommended for this example.

Present a table of the run times and scalability and comment on the results.

Programowanie w C++ OpenGL

Numer ID Projektu: #6654896

O projekcie

2 ofert Zdalny projekt Aktywny Dec 4, 2014

2 freelancerów złożyło ofertę za $83 w tym projekcie

qiangjin2014

Dear, client! I read your descriptoin. I have ever done parallel computing by using MPI library. I think your task is similar MPI. I can do your task. Thanks.

$111 USD w ciągu 1 dnia
(2 Oceny)
1.5
abhijits2014

This can be done. I have 6 years of experience including 4 years of experience developing algorithms and programming in c and c++. Do let me know in case of further interest.

$55 USD w ciągu 7 dni
(0 Oceny)
0.0