Due : 11:59pm, Tuesday Decemeber 15, 2015
This is a hard deadline. Homeworks submitted after this time will not be considered.
Assignment:
Parallelize the program using MPI. To do this follow the instructions in
When compiling and running you must NOT use gollum itself but one of the nodes node1 to node12.
For this assignment you are to write programs in either C or C++ using
the MPI message passing library. Your programs must compile without warnings
and execute correctly for full credit. Also, for full credit use good programming
style, including the use of an appropriate amount of comments.
Place the code in a subdirectory called hw5 and submit using the svn.
Use as input file called data which contains the integer array
(ASCII, one element per line).
Before the searching begins have ONLY P0 read in the array elements from
the data file and distribute one fourth to each of the other three processors
and keep one fourth for its own search.
When one processor has found the element 11, it should notify all the other processors using a non-blocking MPI command, then print the index that the 11 was found at and stop.
On receiving the notification the other processors should print out the index they are at at that time and stop searching.
Place the results in a file search.txt and submit to svn with the program.
This assignment is an individual assignment, to be done on your own without help from other persons including other students in the class. If you use materials from any sources other than the class notes, you must reference them explicitly in a comment in the program.
Instructions for submitting the homework using svn are contained in this file.