Assignment 8
CSC 410
Due: Sunday Dec 10, 5:00 pm
Turn in:
- Create a document describing each solution
- Format and structure
- Include relevant code, output, and explanations
- Email when complete
Goal: practice, practice, practice
- One problem - multiple solutions
- Develop the following solution styles
- Sequential
- PThread
- MPI
- APO
- Comment on correctness of each solution
- Comment on theoretical success of each solution
- Compare the solutions regarding which are most appropriate to this
problem
Problem: Vector Addition
- Given Vector A, B, and C such that the sizes are compatible
- Define C = A + B as the pairwise addition if elements from A
& B to be stored into C
- For each element: C[i] = A[i] + B[i];
- Your program should implement the function
- C = A + B
- C = VecAdd(A,B)
- VecAdd( C, A, B )
- you get the idea
- Some ideas
- Read the input vectors from files
- Check for size compatibility
- Result vector written to file
- Assume the complete vector will fit in memory
- Demonstration & explanation of correctness
- Completely explain your solution using small vectors
- Show how it would scale to a larger problem
- You should try to do some timing to back up your conclusions
- As needed, add in dummy-loops or other things to slow the code on
small scale problems