User Tools

Site Tools


cs415pdc:lab2

Lab 2 - MPI Broadcast and Reduce

The MPI trapezoid rule program is in the set at }Message Passing using MPI. Download from the MPI_examples link to get the program files. Be sure to read the description of this program (and the others) on this website. You will use other files from this set for Project 1.

When the instructions say to run the program and record the results, you need to record the average of multiple runs. Sometimes a spike in network traffic or CPU load can make one run last longer than it might otherwise. For this reason, always run the same command at least 3 times and record the average of the runs. NOTE: If one run is an outlier (say, 3 times larger or smaller than the others), don't include it in the average. Throw the result out and run again.

  1. Unzip the archive and change directory to MPI_Examples/trapIntegration/mpi_trap
  2. Type make to build the program
  3. Using either mpiexec or mpirun, run the program on one process, with a million trapezoids. Record the result in a file. For example:
    • mpiexec -n 1 ./mpi_trap 1000000
  4. Repeat the run on a single machine using 2, 4, 8, and 16 processes. Record the results; label each result with the process count
  5. Repeat your program runs, but on 4 processors by using the -f host_file option. Make sure you have an appropriate host_file in the directory with your executable program. You will need to modify it each time to ensure the proper number of cores are being used per host. Record these results as well.
  6. Graph the speedup versus number of processors twice, once for each set of runs. Is the communication overhead a significant factor?
cs415pdc/lab2.txt · Last modified: 2017/10/02 21:04 by scarl