1 / 14

Assignment 5

Assignment 5. Using Paraguin to Create Parallel Programs. Hello World Program. Program is given to you You simply need to compile it and run it You will simply run it on your Ubuntu virtual machine Produce documentation of compiling and running the program.

harvellw
Télécharger la présentation

Assignment 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assignment 5 Using Paraguin to Create Parallel Programs

  2. Hello World Program • Program is given to you • You simply need to compile it and run it • You will simply run it on your Ubuntu virtual machine • Produce documentation of compiling and running the program

  3. Compiling using the Paraguin submission page • http://babbage.cis.uncw.edu/~cferner/compoptions.html

  4. Compiling using the Paraguin submission page Browse for a source file on your local machine. Leave default options. Submit for Compilation.

  5. Compiling using the Paraguin submission page • Download the Zip file which contains: • Resulting source file “.out.c” • Compiler Warning/Error/Warning messages Clean up your files or the subsequent zip file will contain all the old files.

  6. Cluster at UNCW $ ls hello.c.files.zip $ unzip hello.c.files.zip Archive: hello.c.files.zip extracting: hello.c.err.txt inflating: hello.out.c $ cat hello.c.err.txt $ mpicc hello.out.c –o hello.out $ mpirun –np 4 hello.out Error file is empty Compiling Running

  7. Matrix Multiplication • Matrix Multiplication Includes: • Use the Matrix Addition program on the slides as a template. • You’ll need to: • Broadcast the b matrix instead of scattering it • Change the computation loop to do matrix multiplication instead of addition

  8. Matrix Multiplication • Compile using the Paraguin submission page and run on your Virtual Box as with hello world • May want to start with 5x5 matrices where you can verify the answers • Next go to input2x512x512Doubles • Redirect output to a file: • mpirun –np # matrix.out input2x512x512Doubles > output • Use diff command to compare results with output512x512mult

  9. Matrix Multiplication • Upload the .out.c file to one of the clusters • Compile with mpicc • Run (use the job scheduler if using UNCW cluster) on 1,4,8,12,16,20,24,28,32 processors (or to the largest number you can) • Record elapse times • Produce a graph of the execution time and speedup as a function of the number of processors

  10. Heat Distribution • Using the stencil pattern, model the distribution of heat in a room that has a fireplace along one wall

  11. Producing a Visual of the Output Produced with X11 Graphics Produced with Excel

  12. Producing a Visual of the Output • See the document http://coitweb.uncc.edu/~abw/ITCS4145F13/Assignments/X11GraphicsNotes.pdf for help with creating graphics using X11. • The Excel Graph is a surface plot

  13. Monte Carlo Estimation of π(required for Graduates/optional for Undergraduates) • Scatter/Gather pattern, but uses broadcast and reduce • This is not a workflow pattern • π can also be estimated by integrating the function , but you aren’t asked to do this.

  14. Questions?

More Related