Supercomputing Applications
Lab 09 Report Form - MPI Programming #5
Parallel Programming Application 1
Searching a large collection of numbers for a target value

  1. Your name: __________________________________, Period: _____, Date __________

  2. Run your code on this data file of numbers: nums.txt

    This is searching for the number 10 (the first number in the file).

    Here's an example file in C that reads a file of unknown length. Remember in this lab, the FIRST number in the file is the one you are searching for in the rest of the numbers.

    readfile.c

  3. Paste in your results. In your output you need to include both the position(s) in the file of the target value and the process number that is finding this particular position of the target value.
    
    
    Here's a sample output (For an "easy version" print to screen from each process):
    
      P 1,  56
      P 2,  181
      P 2,  182
      P 3,  291
      P 3,  298
    
    (Process 1 finds the value at index 56, process 2 finds the value at 181 and 182 etc.)
    
    
    
    
    
    

  4. Paste in your code