AUTH's THMMY "Parallel and distributed systems" course assignments.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

123456789101112131415161718192021222324252627282930313233
  1. Parallel & Distributed Computer Systems HW2
  2. December 6, 2024
  3. Write a distributed program that sorts $N$ integers in ascending order, using MPI. The inter-process communications should be defined by the Bitonic sort algorithm as presented in our class notes.
  4. The program must perform the following tasks:
  5. - The user specifies two positive integers $q$ and $p$.
  6. - Start $2^p$ processes with an array of $2^q$ random integers is each processes.
  7. - Sort all $N = \left ( 2^{(q + p)} \right)$ elements int ascending order.
  8. - Check the correctness of the final result.
  9. Your implementation should be based on the following steps:
  10. - Start p processes, each process gets n/p data and sorts (ascending or descending depending on the process id) them using sort from any library. Use two buffers, to sort from one to the other, to send from one and receive in the other.
  11. - Repeat $O((log_2(p))^2)$:
  12. * Exchange data with the corresponding partner and keep the min or max elements, depending on the process id and phase of the computation
  13. * Sort locally the bitonic sequence using a modification of merge sort, starting from the "elbow" of the bitonic.
  14. You may use the C standard library function stdlib qsort() to check the correctness of your results and as the initial local sorting routine for each process.
  15. You must deliver:
  16. - A report (about $3-4$ pages) that describes your parallel algorithm and implementation.
  17. - Your comments on the speed of your parallel program compared to the serial sort, after trying you program on aristotelis for $p = [1:7]$ and $q = [20:27]$.
  18. - The source code of your program uploaded online.
  19. Ethics: If you use code found on the web or by an LLM, you should mention your source and the changes you made. You may work in pairs; both partners must submit a single report with both names.
  20. Deadline: 7 January, $2025$.